You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I've been using this project for a few months now, and it has been very helpfull. Thank you!
There seems to be an issue when calling some snake_case aliasses of DirectGui objects. Specifically when the gui-object is passed to a function. It seems to choose the wrong signature of the function. I am using version 0.3.3 of types-panda3d and Pycharm as IDE. I hope the example below illustrates the issue.
class GuiTest(ShowBase):
def __init__(self):
super().__init__()
button = DirectGui.DirectButton(
text="test"
)
# works as it should
button.set_pos(0.1, 0.1, 0.1)
button.reparent_to(base.render)
self.button_test(button)
def button_test(self, button: DirectGui.DirectButton):
# complains about the arguments
button.set_pos(0.1, 0.1, 0.1)
# expects:
# def set_pos(self,
# const_NodePath_self: Any,
# const_LVecBase3f_pos: Any) -> None
# instead of def set_pos(self, pos: Vec3Like) -> None:
button.reparent_to(base.render)
# expects:
# def reparent_to(self,
# const_NodePath_self: Any,
# const_NodePath_other: Any,
# int_sort: Any,
# Thread_current_thread: Any) -> None
# works as it should
button.setPos(0.1, 0.1, 0.1)
button.reparentTo(base.aspect2dp)
The text was updated successfully, but these errors were encountered:
Hi! I've been using this project for a few months now, and it has been very helpfull. Thank you!
There seems to be an issue when calling some snake_case aliasses of DirectGui objects. Specifically when the gui-object is passed to a function. It seems to choose the wrong signature of the function. I am using version 0.3.3 of types-panda3d and Pycharm as IDE. I hope the example below illustrates the issue.
The text was updated successfully, but these errors were encountered: