this is for your mouseover/out functions:
button.accept(button.guiItem.getEnterEvent(), yourFunctionMouseOver)
button.accept(button.guiItem.getExitEvent(),yourFunctionMouseOut)
set the frameSize:
b = DirectButton(text="bla")
b["frameSize"]=(-.2, .2, -.2, .2)
or just give the button an image of your desired size, then call
b.resetFrameSize()
and remove the image afterwards
b["image"]=None
to calculate the scale of the button for your desired pixelsize i used this:
(substitute 768.0 with your screenheight)
def calcImgScale(pixel):
imgScale = pixel/768.0
return imgScale
b["scale"] = calcImgScale(130,130)
you maybe have to resetFrameSize(), i am not sure
greets, kampfgnu