mirror of
				https://github.com/Zelda64Recomp/Zelda64Recomp.git
				synced 2025-10-30 08:03:03 +00:00 
			
		
		
		
	Fix controller nav issues in config menu, bump version to 1.2.0-rc9
This commit is contained in:
		
							parent
							
								
									85aa954fd7
								
							
						
					
					
						commit
						be64f837e9
					
				
					 4 changed files with 8 additions and 4 deletions
				
			
		|  | @ -69,6 +69,7 @@ namespace recompui { | |||
|     }; | ||||
| 
 | ||||
|     void set_config_tab(ConfigTab tab); | ||||
|     int config_tab_to_index(ConfigTab tab); | ||||
|     Rml::ElementTabSet* get_config_tabset(); | ||||
|     Rml::Element* get_mod_tab(); | ||||
|     void set_config_tabset_mod_nav(); | ||||
|  |  | |||
|  | @ -48,7 +48,7 @@ | |||
| 
 | ||||
| #include "../../lib/rt64/src/contrib/stb/stb_image.h" | ||||
| 
 | ||||
| const std::string version_string = "1.2.0-rc8"; | ||||
| const std::string version_string = "1.2.0-rc9"; | ||||
| 
 | ||||
| template<typename... Ts> | ||||
| void exit_error(const char* str, Ts ...args) { | ||||
|  |  | |||
|  | @ -22,7 +22,7 @@ Rml::DataModelHandle sound_options_model_handle; | |||
| // True if controller config menu is open, false if keyboard config menu is open, undefined otherwise
 | ||||
| bool configuring_controller = false; | ||||
| 
 | ||||
| static int config_tab_to_index(recompui::ConfigTab tab) { | ||||
| int recompui::config_tab_to_index(recompui::ConfigTab tab) { | ||||
|     switch (tab) { | ||||
|     case recompui::ConfigTab::General: | ||||
|         return 0; | ||||
|  | @ -472,7 +472,7 @@ class ConfigTabsetListener : public Rml::EventListener { | |||
|     void ProcessEvent(Rml::Event& event) override { | ||||
|         if (event.GetId() == Rml::EventId::Tabchange) { | ||||
|             int tab_index = event.GetParameter<int>("tab_index", 0); | ||||
|             bool in_mod_tab = (tab_index == config_tab_to_index(recompui::ConfigTab::Mods)); | ||||
|             bool in_mod_tab = (tab_index == recompui::config_tab_to_index(recompui::ConfigTab::Mods)); | ||||
|             if (in_mod_tab) { | ||||
|                 recompui::set_config_tabset_mod_nav(); | ||||
|             } | ||||
|  |  | |||
|  | @ -589,7 +589,10 @@ void ModMenu::create_mod_list() { | |||
|         install_mods_button->set_nav_manual(NavDirection::Up, mod_tab_id); | ||||
|     } | ||||
| 
 | ||||
|     recompui::set_config_tabset_mod_nav(); | ||||
|     Rml::ElementTabSet* tabset = recompui::get_config_tabset(); | ||||
|     if (tabset && tabset->GetActiveTab() == recompui::config_tab_to_index(ConfigTab::Mods)) { | ||||
|         recompui::set_config_tabset_mod_nav(); | ||||
|     }        | ||||
| 
 | ||||
|     // Add one extra spacer at the bottom.
 | ||||
|     ModEntrySpacer *spacer = context.create_element<ModEntrySpacer>(list_scroll_container); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Mr-Wiseguy
						Mr-Wiseguy