mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	help extensions now can use addSelItem and color
This commit is contained in:
		
							
								
								
									
										9
									
								
								help.cpp
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								help.cpp
									
									
									
									
									
								
							| @@ -928,8 +928,13 @@ void showHelp() { | |||||||
|     dialog::addHelp(help); |     dialog::addHelp(help); | ||||||
|     } |     } | ||||||
|    |    | ||||||
|   for(auto& he: help_extensions) |   for(auto& he: help_extensions) { | ||||||
|     dialog::addItem(he.text, he.key); |     if(he.subtext != "") | ||||||
|  |       dialog::addSelItem(he.text, he.subtext, he.key); | ||||||
|  |     else | ||||||
|  |       dialog::addItem(he.text, he.key); | ||||||
|  |     dialog::lastItem().color = he.color; | ||||||
|  |     } | ||||||
|    |    | ||||||
|   dialog::display(); |   dialog::display(); | ||||||
|    |    | ||||||
|   | |||||||
							
								
								
									
										6
									
								
								hyper.h
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								hyper.h
									
									
									
									
									
								
							| @@ -3868,7 +3868,11 @@ extern ld scalef; | |||||||
| struct help_extension { | struct help_extension { | ||||||
|   char key; |   char key; | ||||||
|   string text; |   string text; | ||||||
|  |   string subtext; | ||||||
|  |   color_t color; | ||||||
|   reaction_t action; |   reaction_t action; | ||||||
|  |   help_extension() { color = forecolor; } | ||||||
|  |   help_extension(char k, string t, reaction_t a) : key(k), text(t), action(a) { color = forecolor; } | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
| extern vector<help_extension> help_extensions; | extern vector<help_extension> help_extensions; | ||||||
| @@ -4020,5 +4024,7 @@ void virtualRebaseSimple(heptagon*& base, transmatrix& at); | |||||||
|  |  | ||||||
| extern bool game_active, playerfound; | extern bool game_active, playerfound; | ||||||
|  |  | ||||||
|  | string bygen(reaction_t h); | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue