tobspr / LUI

Lightweight User Interface for Panda3D
MIT License
84 stars 24 forks source link

LUISpriteButton doesn't work #22

Open Minthos opened 8 years ago

Minthos commented 8 years ago

Trying to make one gives me the error message: File "/home/user/Downloads/LUI-master/Builtin/LUISpriteButton.py", line 15, in __init__ self._button_sprite.width = width NameError: global name 'width' is not defined I had hoped that class would let me create a clickable sprite, but I'll have to read more of the source before I figure out how to do that.

tobspr commented 7 years ago

Hi, first of all, sorry for the super late response.

can you try changing line 15 and 16 of Builtin/LUISpriteButton.py to:

    self.width = self._button_sprite.width
    self.height = self._button_sprite.height
Minthos commented 7 years ago

I'll see if I remember it when I have time. I don't even remember what I used it for.