Skip to content

Commit

Permalink
Merge pull request #75971 from mqrause/imgui_mouse_scrolling
Browse files Browse the repository at this point in the history
move NoScrollbar and NoScrollWithMouse flags from cataimgui::window to uilist_impl
  • Loading branch information
akrieger authored Aug 28, 2024
2 parents 9dfc660 + b3dce05 commit 3e39d80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/cata_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,7 @@ cataimgui::window::window( int window_flags )

this->window_flags = window_flags | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoNavFocus |
ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoScrollbar |
ImGuiWindowFlags_NoScrollWithMouse;
ImGuiWindowFlags_NoBringToFrontOnFocus;
}

cataimgui::window::window( const std::string &id_, int window_flags ) : window( window_flags )
Expand Down
6 changes: 4 additions & 2 deletions src/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ class uilist_impl : cataimgui::window
uilist &parent;
public:
explicit uilist_impl( uilist &parent ) : cataimgui::window( "UILIST",
ImGuiWindowFlags_NoTitleBar ), parent( parent ) {
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse ),
parent( parent ) {
}

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

cataimgui::bounds get_bounds() override {
Expand Down

0 comments on commit 3e39d80

Please sign in to comment.