Skip to content

Commit ce43561

Browse files
authored
Add updatePlatformWindows and renderPlatformWindowsDefault (#30)
1 parent d498de7 commit ce43561

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

src/gui.zig

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,10 +1801,10 @@ pub fn comboFromEnum(
18011801

18021802
var item: i32 =
18031803
switch (@typeInfo(EnumType)) {
1804-
.optional => if (current_item.*) |tag| field_name_to_index.get(@tagName(tag)) orelse -1 else -1,
1805-
.@"enum" => field_name_to_index.get(@tagName(current_item.*)) orelse -1,
1806-
else => unreachable,
1807-
};
1804+
.optional => if (current_item.*) |tag| field_name_to_index.get(@tagName(tag)) orelse -1 else -1,
1805+
.@"enum" => field_name_to_index.get(@tagName(current_item.*)) orelse -1,
1806+
else => unreachable,
1807+
};
18081808

18091809
const result = combo(label, .{
18101810
.items_separated_by_zeros = item_names,
@@ -3697,6 +3697,12 @@ pub const Viewport = *opaque {
36973697
};
36983698
pub const getMainViewport = zguiGetMainViewport;
36993699
extern fn zguiGetMainViewport() Viewport;
3700+
3701+
pub const updatePlatformWindows = zguiUpdatePlatformWindows;
3702+
extern fn zguiUpdatePlatformWindows() void;
3703+
3704+
pub const renderPlatformWindowsDefault = zguiRenderPlatformWindowsDefault;
3705+
extern fn zguiRenderPlatformWindowsDefault() void;
37003706
//--------------------------------------------------------------------------------------------------
37013707
//
37023708
// Mouse Input

src/zgui.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2573,6 +2573,14 @@ extern "C"
25732573
p[1] = sz.y;
25742574
}
25752575

2576+
ZGUI_API void zguiUpdatePlatformWindows() {
2577+
ImGui::UpdatePlatformWindows();
2578+
}
2579+
2580+
ZGUI_API void zguiRenderPlatformWindowsDefault() {
2581+
ImGui::RenderPlatformWindowsDefault();
2582+
}
2583+
25762584
//--------------------------------------------------------------------------------------------------
25772585
//
25782586
// Docking

0 commit comments

Comments
 (0)