Skip to content

Commit

Permalink
Added table_setup_scroll_freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Jun 1, 2024
1 parent a40e1e9 commit ec6d86d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions example/example.script
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ local function update_tab1(self)
end

if imgui.begin_table("table_example", 3) then
imgui.table_setup_scroll_freeze(1, 1)
imgui.table_setup_column("FIRST NAME")
imgui.table_setup_column("LAST NAME")
imgui.table_setup_column("AGE")
Expand Down
10 changes: 10 additions & 0 deletions imgui/api/imgui.script_api
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,16 @@
- name: init_width_or_weight
type: number

#*****************************************************************************************************

- name: table_setup_scroll_freeze
type: function

parameters:
- name: columns
type: number
- name: rows
type: number

#*****************************************************************************************************

Expand Down
11 changes: 11 additions & 0 deletions imgui/src/extension_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,17 @@ static int imgui_TableNextRow(lua_State* L)
}


static int imgui_TableSetupScrollFreeze(lua_State* L)
{
DM_LUA_STACK_CHECK(L, 0);
imgui_NewFrame();
int freeze_cols = luaL_checkinteger(L, 1);
int freeze_rows = luaL_checkinteger(L, 2);
ImGui::TableSetupScrollFreeze(freeze_cols, freeze_rows);
return 0;
}


// ----------------------------
// ----- TOOLTIP ---------
// ----------------------------
Expand Down

0 comments on commit ec6d86d

Please sign in to comment.