mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	draw crosshair even if nohud
This commit is contained in:
		| @@ -918,6 +918,8 @@ EX void showEuclideanMenu() { | ||||
|   if(stretch::applicable()) { | ||||
|     dialog::addSelItem(XLAT("stretched geometry"), fts(stretch::factor), 'S'); | ||||
|     dialog::add_action([] { | ||||
|       stretch::mstretch = false; | ||||
|       ray::reset_raycaster(); | ||||
|       dialog::editNumber(stretch::factor, -1, 9, 0.1, 0, XLAT("stretched geometry"), | ||||
|         XLAT( | ||||
|           "Stretch the metric along the fibers. This can currently be done in rotation spaces and in 8-cell, 24-cell and 120-cell. " | ||||
|   | ||||
							
								
								
									
										33
									
								
								hud.cpp
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								hud.cpp
									
									
									
									
									
								
							| @@ -386,8 +386,25 @@ EX int hud_margin(int side) { | ||||
|   return 0; | ||||
|   } | ||||
|  | ||||
| EX void draw_crosshair() { | ||||
|   auto& cd = current_display; | ||||
|   auto xc = cd->xcenter; | ||||
|   auto yc = cd->ycenter; | ||||
|    | ||||
|   flat_model_enabler fme; | ||||
|  | ||||
|   if(crosshair_color && crosshair_size > 0) { | ||||
|     initquickqueue(); | ||||
|     vid.linewidth = 1; | ||||
|     queueline(shiftless(tC0(atscreenpos(xc - crosshair_size, yc, 1))), shiftless(tC0(atscreenpos(xc + crosshair_size, yc, 1))), crosshair_color).prio = PPR::SUPERLINE; | ||||
|     queueline(shiftless(tC0(atscreenpos(xc, yc - crosshair_size, 1))), shiftless(tC0(atscreenpos(xc, yc + crosshair_size, 1))), crosshair_color).prio = PPR::SUPERLINE; | ||||
|     quickqueue(); | ||||
|     } | ||||
|   return; | ||||
|   } | ||||
|    | ||||
| EX void drawStats() { | ||||
|   if(nohud || vid.stereo_mode == sLR) return; | ||||
|   draw_crosshair(); | ||||
|   if(callhandlers(false, hooks_prestats)) return; | ||||
|   if(viewdists && show_distance_lists)  | ||||
|     expansion.view_distances_dialog(); | ||||
| @@ -402,10 +419,6 @@ EX void drawStats() { | ||||
|    | ||||
|   { | ||||
|    | ||||
|   auto& cd = current_display; | ||||
|   auto xc = cd->xcenter; | ||||
|   auto yc = cd->ycenter; | ||||
|  | ||||
|   if(vid.radarsize > 0 && h) | ||||
|   #if CAP_RACING | ||||
|     if(!racing::on) | ||||
| @@ -415,15 +428,7 @@ EX void drawStats() { | ||||
|       draw_radar(cornermode); | ||||
|  | ||||
|   flat_model_enabler fme; | ||||
|    | ||||
|   if(crosshair_color && crosshair_size > 0) { | ||||
|     initquickqueue(); | ||||
|     vid.linewidth = 1; | ||||
|     queueline(shiftless(tC0(atscreenpos(xc - crosshair_size, yc, 1))), shiftless(tC0(atscreenpos(xc + crosshair_size, yc, 1))), crosshair_color).prio = PPR::SUPERLINE; | ||||
|     queueline(shiftless(tC0(atscreenpos(xc, yc - crosshair_size, 1))), shiftless(tC0(atscreenpos(xc, yc + crosshair_size, 1))), crosshair_color).prio = PPR::SUPERLINE; | ||||
|     quickqueue(); | ||||
|     } | ||||
|    | ||||
|  | ||||
|   if(haveMobileCompass()) { | ||||
|     initquickqueue(); | ||||
|     using namespace shmupballs; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue