raygui: Revert property parameters back to i32s (#131)

This commit is contained in:
Not-Nik 2024-10-02 22:19:14 +02:00
parent a087398387
commit 855ab9cd70
No known key found for this signature in database
GPG Key ID: E95F679E3CDD9784
3 changed files with 8 additions and 8 deletions

View File

@ -174,8 +174,8 @@ _fix_enums_data = [
("flags", "Gesture", r"SetGesturesEnabled"), ("flags", "Gesture", r"SetGesturesEnabled"),
("button", "GamepadButton", r".*GamepadButton.*"), ("button", "GamepadButton", r".*GamepadButton.*"),
("button", "MouseButton", r".*MouseButton.*"), ("button", "MouseButton", r".*MouseButton.*"),
("control", "GuiState", r"Gui.etStyle"), ("control", "GuiControl", r"Gui.etStyle"),
("property", "GuiControlProperty", r"Gui.etStyle"), # ("property", "GuiControlProperty", r"Gui.etStyle"),
] ]
def fix_enums(arg_name, arg_type, func_name): def fix_enums(arg_name, arg_type, func_name):
if func_name.startswith("rl"): if func_name.startswith("rl"):

View File

@ -13,8 +13,8 @@ pub extern "c" fn GuiSetState(state: c_int) void;
pub extern "c" fn GuiGetState() c_int; pub extern "c" fn GuiGetState() c_int;
pub extern "c" fn GuiSetFont(font: rl.Font) void; pub extern "c" fn GuiSetFont(font: rl.Font) void;
pub extern "c" fn GuiGetFont() rl.Font; pub extern "c" fn GuiGetFont() rl.Font;
pub extern "c" fn GuiSetStyle(control: rgui.GuiState, property: rgui.GuiControlProperty, value: c_int) void; pub extern "c" fn GuiSetStyle(control: rgui.GuiControl, property: c_int, value: c_int) void;
pub extern "c" fn GuiGetStyle(control: rgui.GuiState, property: rgui.GuiControlProperty) c_int; pub extern "c" fn GuiGetStyle(control: rgui.GuiControl, property: c_int) c_int;
pub extern "c" fn GuiLoadStyle(fileName: [*c]const u8) void; pub extern "c" fn GuiLoadStyle(fileName: [*c]const u8) void;
pub extern "c" fn GuiLoadStyleDefault() void; pub extern "c" fn GuiLoadStyleDefault() void;
pub extern "c" fn GuiEnableTooltip() void; pub extern "c" fn GuiEnableTooltip() void;

View File

@ -513,13 +513,13 @@ pub fn guiGetFont() Font {
} }
/// Set one style property /// Set one style property
pub fn guiSetStyle(control: GuiState, property: GuiControlProperty, value: i32) void { pub fn guiSetStyle(control: GuiControl, property: i32, value: i32) void {
cdef.GuiSetStyle(control, property, @as(c_int, value)); cdef.GuiSetStyle(control, @as(c_int, property), @as(c_int, value));
} }
/// Get one style property /// Get one style property
pub fn guiGetStyle(control: GuiState, property: GuiControlProperty) i32 { pub fn guiGetStyle(control: GuiControl, property: i32) i32 {
return @as(i32, cdef.GuiGetStyle(control, property)); return @as(i32, cdef.GuiGetStyle(control, @as(c_int, property)));
} }
/// Load style file over global style variable (.rgs) /// Load style file over global style variable (.rgs)