tobspr / LUI

Lightweight User Interface for Panda3D

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LUISpriteButton doesn't work

Minthos opened this issue · comments

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.

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

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