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