Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move NoScrollbar and NoScrollWithMouse flags from cataimgui::window to uilist_impl #75971

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/cata_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@
}
auto it = std::find_if( io_typefaces.begin(),
io_typefaces.end(), []( const std::string & io_typeface ) {
std::filesystem::path path( io_typeface );

Check failure on line 274 in src/cata_imgui.cpp

View workflow job for this annotation

GitHub Actions / build (src)

Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. [cata-u8-path,-warnings-as-errors]

Check failure on line 274 in src/cata_imgui.cpp

View workflow job for this annotation

GitHub Actions / Clang 14, macOS 12, Tiles, Sound, x64 and arm64 Universal Binary

'path' is unavailable: introduced in macOS 10.15

Check failure on line 274 in src/cata_imgui.cpp

View workflow job for this annotation

GitHub Actions / Clang 14, macOS 12, Tiles, Sound, x64 and arm64 Universal Binary

'~path' is unavailable: introduced in macOS 10.15

Check failure on line 274 in src/cata_imgui.cpp

View workflow job for this annotation

GitHub Actions / Clang 14, macOS 12, Tiles, Sound, x64 and arm64 Universal Binary

'path' is unavailable: introduced in macOS 10.15
return std::filesystem::exists( path );

Check failure on line 275 in src/cata_imgui.cpp

View workflow job for this annotation

GitHub Actions / Clang 14, macOS 12, Tiles, Sound, x64 and arm64 Universal Binary

'exists' is unavailable: introduced in macOS 10.15
} );
std::string existing_typeface = *it;
io.FontDefault = io.Fonts->AddFontFromFileTTF( existing_typeface.c_str(), fontheight, nullptr,
Expand Down Expand Up @@ -537,8 +537,7 @@

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
Loading