So Im working with BGUI and writing code into my system to make it so widgets/frames are grab-able and can be moved, heres my code
mPos = mouse.position
LMB = mouse.events[bge.events.LEFTMOUSE]
if LMB == 2:
print(mPos)
self.menu.position = [mPos[0], mPos[1]]
Now this works fine for moving the X pos of the widget but the Y pos is messed up. Lemme explain, the Y for widgets is 0.0-1.0 starting at the bottom for those of you who havent worked with BGUI, but the Y for mouse is 1.0 - 0.0 , starting at the bottom. In short they’re completely opposite! and this does not work hehe. Anyone know how I can get the widget Y to respond correctly?