mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +00:00
draw crosshair even if nohud
This commit is contained in:
parent
1ac2805b7f
commit
4bddeedaf8
@ -918,6 +918,8 @@ EX void showEuclideanMenu() {
|
|||||||
if(stretch::applicable()) {
|
if(stretch::applicable()) {
|
||||||
dialog::addSelItem(XLAT("stretched geometry"), fts(stretch::factor), 'S');
|
dialog::addSelItem(XLAT("stretched geometry"), fts(stretch::factor), 'S');
|
||||||
dialog::add_action([] {
|
dialog::add_action([] {
|
||||||
|
stretch::mstretch = false;
|
||||||
|
ray::reset_raycaster();
|
||||||
dialog::editNumber(stretch::factor, -1, 9, 0.1, 0, XLAT("stretched geometry"),
|
dialog::editNumber(stretch::factor, -1, 9, 0.1, 0, XLAT("stretched geometry"),
|
||||||
XLAT(
|
XLAT(
|
||||||
"Stretch the metric along the fibers. This can currently be done in rotation spaces and in 8-cell, 24-cell and 120-cell. "
|
"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;
|
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() {
|
EX void drawStats() {
|
||||||
if(nohud || vid.stereo_mode == sLR) return;
|
draw_crosshair();
|
||||||
if(callhandlers(false, hooks_prestats)) return;
|
if(callhandlers(false, hooks_prestats)) return;
|
||||||
if(viewdists && show_distance_lists)
|
if(viewdists && show_distance_lists)
|
||||||
expansion.view_distances_dialog();
|
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(vid.radarsize > 0 && h)
|
||||||
#if CAP_RACING
|
#if CAP_RACING
|
||||||
if(!racing::on)
|
if(!racing::on)
|
||||||
@ -415,15 +428,7 @@ EX void drawStats() {
|
|||||||
draw_radar(cornermode);
|
draw_radar(cornermode);
|
||||||
|
|
||||||
flat_model_enabler fme;
|
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()) {
|
if(haveMobileCompass()) {
|
||||||
initquickqueue();
|
initquickqueue();
|
||||||
using namespace shmupballs;
|
using namespace shmupballs;
|
||||||
|
Loading…
Reference in New Issue
Block a user