mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:32:44 +00:00 
			
		
		
		
	HackStudio: Fix cpp-gui template
This commit is contained in:
		
							parent
							
								
									f2da577e77
								
							
						
					
					
						commit
						406dff16d1
					
				
					 3 changed files with 3 additions and 3 deletions
				
			
		|  | @ -4,7 +4,7 @@ echo > $2/Makefile <<-EOF | ||||||
| PROGRAM = $1 | PROGRAM = $1 | ||||||
| OBJS = main.o | OBJS = main.o | ||||||
| CXXFLAGS = -g -std=c++2a | CXXFLAGS = -g -std=c++2a | ||||||
| LDFLAGS = -lgui | LDFLAGS = -lgui -lgcc_s | ||||||
| 
 | 
 | ||||||
| all: \$(PROGRAM) | all: \$(PROGRAM) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ int main(int argc, char** argv) | ||||||
|     auto button = GUI::Button::construct(); |     auto button = GUI::Button::construct(); | ||||||
|     button->set_text("Click me!"); |     button->set_text("Click me!"); | ||||||
|     button->on_click = [&](auto) { |     button->on_click = [&](auto) { | ||||||
|         GUI::MessageBox::show(window, "Hello friends!", ":^)"); |         GUI::MessageBox::show(window, "Hello friends!"sv, ":^)"sv); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     window->set_main_widget(button); |     window->set_main_widget(button); | ||||||
|  |  | ||||||
|  | @ -28,7 +28,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto button = TRY(main_widget->try_add<GUI::Button>("Click me!")); |     auto button = TRY(main_widget->try_add<GUI::Button>("Click me!")); | ||||||
|     button->on_click = [&](auto) { |     button->on_click = [&](auto) { | ||||||
|         GUI::MessageBox::show(window, "Hello friends!", ":^)"); |         GUI::MessageBox::show(window, "Hello friends!"sv, ":^)"sv); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     window->show(); |     window->show(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 NoahR02
						NoahR02