mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-11-01 02:58:12 +08:00 
			
		
		
		
	- Added exit button to homescreen example (#819)
This commit is contained in:
		| @@ -490,15 +490,24 @@ int main() { | ||||
|       }, | ||||
|       &tab_index); | ||||
|  | ||||
|   auto exit_button = Button( | ||||
|       "Exit", [&] { screen.Exit(); }, ButtonOption::Animated()); | ||||
|  | ||||
|   auto main_container = Container::Vertical({ | ||||
|       tab_selection, | ||||
|       tab_content, | ||||
|     Container::Horizontal({ | ||||
|         tab_selection, | ||||
|         exit_button, | ||||
|     }), | ||||
|     tab_content, | ||||
|   }); | ||||
|  | ||||
|   auto main_renderer = Renderer(main_container, [&] { | ||||
|     return vbox({ | ||||
|         text("FTXUI Demo") | bold | hcenter, | ||||
|         tab_selection->Render(), | ||||
|         hbox({ | ||||
|             tab_selection->Render() | flex, | ||||
|             exit_button->Render(), | ||||
|         }), | ||||
|         tab_content->Render() | flex, | ||||
|     }); | ||||
|   }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 faizan171997
					faizan171997