Skip to content

Commit

Permalink
Merge pull request #1 from db48x/rebalance-ui
Browse files Browse the repository at this point in the history
just turn off NavInputs in uilist windows entirely
  • Loading branch information
CLIDragon authored Sep 16, 2024
2 parents 955456a + 01ef9cd commit 8848788
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ class uilist_impl : cataimgui::window
uilist &parent;
public:
explicit uilist_impl( uilist &parent ) : cataimgui::window( "UILIST",
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse ),
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse |
ImGuiWindowFlags_NoNavInputs ),
parent( parent ) {
}

uilist_impl( uilist &parent, const std::string &title ) : cataimgui::window( title,
ImGuiWindowFlags_None | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse ),
ImGuiWindowFlags_None | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse |
ImGuiWindowFlags_NoNavInputs ),
parent( parent ) {
}

Expand Down Expand Up @@ -90,8 +92,7 @@ void uilist_impl::draw_controls()

float entry_height = ImGui::GetTextLineHeightWithSpacing();
ImGuiStyle &style = ImGui::GetStyle();
if( ImGui::BeginChild( "scroll", parent.calculated_menu_size, false,
ImGuiWindowFlags_NavFlattened ) ) {
if( ImGui::BeginChild( "scroll", parent.calculated_menu_size, false ) ) {
if( ImGui::BeginTable( "menu items", 3, ImGuiTableFlags_SizingFixedFit ) ) {
ImGui::TableSetupColumn( "hotkey", ImGuiTableColumnFlags_WidthFixed,
parent.calculated_hotkey_width );
Expand Down

0 comments on commit 8848788

Please sign in to comment.