Skip to content

Regression with gui_set_style in 5.5.0.3 #186

Description

@sshane

when I do this:

DEFAULT_TEXT_COLOR = rl.WHITE
rl.gui_set_style(rl.GuiControl.DEFAULT, rl.GuiControlProperty.TEXT_COLOR_NORMAL, rl.color_to_int(DEFAULT_TEXT_COLOR))

I get this:

batman@workstation-shane:~/openpilot$ ./selfdrive/ui/ui.py 
RAYLIB STATIC 5.5.0.3 LOADED
Traceback (most recent call last):
  File "/home/batman/openpilot/./selfdrive/ui/ui.py", line 24, in <module>
    main()
  File "/home/batman/openpilot/./selfdrive/ui/ui.py", line 10, in main
    gui_app.init_window("UI")
  File "/home/batman/openpilot/openpilot/system/ui/lib/application.py", line 170, in init_window
    self._set_styles()
  File "/home/batman/openpilot/openpilot/system/ui/lib/application.py", line 347, in _set_styles
    rl.gui_set_style(rl.GuiControl.DEFAULT, rl.GuiControlProperty.TEXT_COLOR_NORMAL, rl.color_to_int(DEFAULT_TEXT_COLOR))
  File "/home/batman/openpilot/.venv/lib/python3.11/site-packages/pyray/__init__.py", line 94, in wrapped_func
    result = original_func(*args)
             ^^^^^^^^^^^^^^^^^^^^
OverflowError: can't convert negative number to unsigned

on 5.5.0.2 and 5.5.0.3 the input arguments are the same:

>>> print('params', rl.GuiControl.DEFAULT, rl.GuiControlProperty.TEXT_COLOR_NORMAL, rl.color_to_int(DEFAULT_TEXT_COLOR))
params 0 2 -1

Looks like it's this: #180

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions