Use proper enums for GuiGetStyle/GuiSetStyle (#125)

This commit is contained in:
Not-Nik 2024-07-27 23:27:00 +02:00
parent 6efc03f6fe
commit c96627f91a
Failed to generate hash of commit
4 changed files with 17 additions and 7 deletions

View file

@ -104,7 +104,9 @@ def add_namespace_to_type(t: str) -> str:
t = t[6:]
pre += "const "
if t[0].isupper():
if t.startswith("Gui"):
t = "rgui." + t
elif t[0].isupper():
t = "rl." + t
elif t in ["float3", "float16"]:
t = "rlm." + t
@ -168,6 +170,8 @@ _fix_enums_data = [
("flags", "Gesture", r"SetGesturesEnabled"),
("button", "GamepadButton", r".*GamepadButton.*"),
("button", "MouseButton", r".*MouseButton.*"),
("control", "GuiState", r"Gui.etStyle"),
("property", "GuiControlProperty", r"Gui.etStyle"),
]
def fix_enums(arg_name, arg_type, func_name):
if func_name.startswith("rl"):