Skip to content

Commit

Permalink
raygui: Revert property parameters back to i32s (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
Not-Nik committed Oct 2, 2024
1 parent a087398 commit 855ab9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/generate_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def fix_pointer(name: str, t: str):
("flags", "Gesture", r"SetGesturesEnabled"),
("button", "GamepadButton", r".*GamepadButton.*"),
("button", "MouseButton", r".*MouseButton.*"),
("control", "GuiState", r"Gui.etStyle"),
("property", "GuiControlProperty", r"Gui.etStyle"),
("control", "GuiControl", r"Gui.etStyle"),
# ("property", "GuiControlProperty", r"Gui.etStyle"),
]
def fix_enums(arg_name, arg_type, func_name):
if func_name.startswith("rl"):
Expand Down
4 changes: 2 additions & 2 deletions lib/raygui-ext.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pub extern "c" fn GuiSetState(state: c_int) void;
pub extern "c" fn GuiGetState() c_int;
pub extern "c" fn GuiSetFont(font: rl.Font) void;
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 GuiGetStyle(control: rgui.GuiState, property: rgui.GuiControlProperty) c_int;
pub extern "c" fn GuiSetStyle(control: rgui.GuiControl, property: c_int, value: c_int) void;
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 GuiLoadStyleDefault() void;
pub extern "c" fn GuiEnableTooltip() void;
Expand Down
8 changes: 4 additions & 4 deletions lib/raygui.zig
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,13 @@ pub fn guiGetFont() Font {
}

/// Set one style property
pub fn guiSetStyle(control: GuiState, property: GuiControlProperty, value: i32) void {
cdef.GuiSetStyle(control, property, @as(c_int, value));
pub fn guiSetStyle(control: GuiControl, property: i32, value: i32) void {
cdef.GuiSetStyle(control, @as(c_int, property), @as(c_int, value));
}

/// Get one style property
pub fn guiGetStyle(control: GuiState, property: GuiControlProperty) i32 {
return @as(i32, cdef.GuiGetStyle(control, property));
pub fn guiGetStyle(control: GuiControl, property: i32) i32 {
return @as(i32, cdef.GuiGetStyle(control, @as(c_int, property)));
}

/// Load style file over global style variable (.rgs)
Expand Down

0 comments on commit 855ab9c

Please sign in to comment.