Skip to content

Commit

Permalink
Removed "USE_IMGUI" option, removed legacy popup and keybindings UI c…
Browse files Browse the repository at this point in the history
…ode. (#72937)
  • Loading branch information
katemonster33 authored Apr 11, 2024
1 parent eb3b3c1 commit e46636b
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 707 deletions.
10 changes: 6 additions & 4 deletions src/cata_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,13 @@ cataimgui::window::window( const std::string &id_, int window_flags ) : window(

cataimgui::window::~window()
{
ImGui::ClearWindowSettings( id.c_str() );
p_impl.reset();
if( !ui_adaptor::has_imgui() ) {
ImGui::GetIO().ClearInputKeys();
GImGui->InputEventsQueue.resize( 0 );
if( GImGui ) {
ImGui::ClearWindowSettings( id.c_str() );
if( !ui_adaptor::has_imgui() ) {
ImGui::GetIO().ClearInputKeys();
GImGui->InputEventsQueue.resize( 0 );
}
}
}

Expand Down
398 changes: 2 additions & 396 deletions src/input_context.cpp

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions src/input_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,6 @@ class input_context
*/
std::vector<std::string> filter_strings_by_phrase( const std::vector<std::string> &strings,
std::string_view phrase ) const;

action_id display_menu_legacy( bool permit_execute_action );
action_id display_menu_imgui( bool permit_execute_action );
};

class hotkey_queue
Expand Down
10 changes: 3 additions & 7 deletions src/main_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,7 @@ void main_menu::init_strings()
vSettingsSubItems.emplace_back( pgettext( "Main Menu|Settings", "A<u|U>topickup" ) );
vSettingsSubItems.emplace_back( pgettext( "Main Menu|Settings", "Sa<f|F>emode" ) );
vSettingsSubItems.emplace_back( pgettext( "Main Menu|Settings", "Colo<r|R>s" ) );
if( get_options().has_option( "USE_IMGUI" ) && get_option<bool>( "USE_IMGUI" ) ) {
vSettingsSubItems.emplace_back( pgettext( "Main Menu|Settings", "<I|i>mGui Demo Screen" ) );
}
vSettingsSubItems.emplace_back( pgettext( "Main Menu|Settings", "<I|i>mGui Demo Screen" ) );

vSettingsHotkeys.clear();
for( const std::string &item : vSettingsSubItems ) {
Expand Down Expand Up @@ -920,10 +918,8 @@ bool main_menu::opening_screen()
} else if( sel2 == 4 ) { /// Colors
all_colors.show_gui();
} else if( sel2 == 5 ) { /// ImGui demo
if( get_options().has_option( "USE_IMGUI" ) && get_option<bool>( "USE_IMGUI" ) ) {
demo_ui demo;
demo.run();
}
demo_ui demo;
demo.run();
}
break;
case main_menu_opts::WORLD:
Expand Down
4 changes: 0 additions & 4 deletions src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1753,10 +1753,6 @@ void options_manager::add_options_interface()
this->add_empty_line( "interface" );
};

add( "USE_IMGUI", "interface", to_translation( "Use ImGui UI" ),
to_translation( "Use new ImGui-based user interface (WARNING: EXPERIMENTAL)." ),
false );

add_empty_line();

add( "USE_LANG", "interface", to_translation( "Language" ),
Expand Down
Loading

0 comments on commit e46636b

Please sign in to comment.