1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-06-09 09:54:06 +00:00

shift+f2 to shift+f4 can now disable HUD, FPS, and the map

This commit is contained in:
Zeno Rogue 2018-07-09 18:10:28 +02:00
parent 92f6521e42
commit 770dd20613
6 changed files with 27 additions and 3 deletions

View File

@ -1049,6 +1049,8 @@ void saveHighQualityShot(const char *fname, const char *caption, int fade) {
#endif #endif
drawfullmap(); drawfullmap();
drawStats();
callhooks(hooks_hqshot, &glbuf); callhooks(hooks_hqshot, &glbuf);
if(fade < 255) if(fade < 255)

View File

@ -259,6 +259,9 @@ void initConfig() {
addsaver(gp::param.first, "goldberg-x", gp::param.first); addsaver(gp::param.first, "goldberg-x", gp::param.first);
addsaver(gp::param.second, "goldberg-y", gp::param.second); addsaver(gp::param.second, "goldberg-y", gp::param.second);
addsaver(nohud, "no-hud", false);
addsaver(nofps, "no-fps", false);
#if CAP_SHMUP #if CAP_SHMUP
shmup::initConfig(); shmup::initConfig();
#endif #endif

View File

@ -801,6 +801,21 @@ void handle_event(SDL_Event& ev) {
if(needConfirmation() && !(cmode & sm::MISSION)) showMissionScreen(); if(needConfirmation() && !(cmode & sm::MISSION)) showMissionScreen();
else quitmainloop = true; else quitmainloop = true;
} }
if(sym == SDLK_F4 && anyshift) {
nomap = !nomap;
sym = 0;
}
if(sym == SDLK_F2 && anyshift) {
nohud = !nohud;
sym = 0;
}
if(sym == SDLK_F3 && anyshift) {
nofps = !nofps;
sym = 0;
}
handlekey(sym, uni); handlekey(sym, uni);
} }

View File

@ -35,6 +35,7 @@ int ticks;
int frameid; int frameid;
bool camelotcheat; bool camelotcheat;
bool nomap;
eItem orbToTarget; eItem orbToTarget;
eMonster monsterToSummon; eMonster monsterToSummon;
@ -5486,7 +5487,7 @@ void drawfullmap() {
} */ } */
clearaura(); clearaura();
drawthemap(); if(!nomap) drawthemap();
if(!inHighQual) { if(!inHighQual) {
if((cmode & sm::NORMAL) && !rug::rugged) { if((cmode & sm::NORMAL) && !rug::rugged) {
if(multi::players > 1) { if(multi::players > 1) {

View File

@ -46,7 +46,10 @@ vector<string> extra_keys = {
"ctrl + mousewheel = change zoom", "ctrl + mousewheel = change zoom",
"ctrl + shift + mousewheel = change both projection and zoom", "ctrl + shift + mousewheel = change both projection and zoom",
"ctrl + hold middle button = move the screen", "ctrl + hold middle button = move the screen",
"shift + middle button = reset position" "shift + middle button = reset position",
"shift + F2 = disable the HUD",
"shift + F3 = disable the FPS",
"shift + F4 = disable the map"
}; };
void buildHelpText() { void buildHelpText() {

View File

@ -3044,7 +3044,7 @@ static const int max_vec = (1<<14);
string helptitle(string s, int col); string helptitle(string s, int col);
pair<int, int> cell_to_pair(cell *c); pair<int, int> cell_to_pair(cell *c);
extern bool nohud, nofps; extern bool nohud, nofps, nomap;
template<class T> array<T, 3> make_array(T a, T b, T c) { array<T,3> x; x[0] = a; x[1] = b; x[2] = c; return x; } template<class T> array<T, 3> make_array(T a, T b, T c) { array<T,3> x; x[0] = a; x[1] = b; x[2] = c; return x; }
template<class T> array<T, 2> make_array(T a, T b) { array<T,2> x; x[0] = a; x[1] = b; return x; } template<class T> array<T, 2> make_array(T a, T b) { array<T,2> x; x[0] = a; x[1] = b; return x; }