1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-18 20:08:06 +00:00

improved cheating in the Overview

This commit is contained in:
Zeno Rogue
2017-10-09 00:21:39 +02:00
parent c10b18f77d
commit 77212e59e5
4 changed files with 52 additions and 32 deletions

View File

@@ -532,8 +532,6 @@ namespace dialog {
string disp(ld x) { if(ne.intval) return its((int) (x+.5)); else return fts(x); }
typedef function<void()> reaction_t;
reaction_t reaction;
void affect(char kind) {
@@ -655,8 +653,8 @@ namespace dialog {
if(ne.help != "") {
addHelp(ne.help);
bool scal = !ISMOBILE && !ISPANDORA && size(ne.help) > 160;
if(scal) lastItem().scale = 30;
// bool scal = !ISMOBILE && !ISPANDORA && size(ne.help) > 160;
// if(scal) lastItem().scale = 30;
}
if(ne.editwhat == &vid.alpha) {
@@ -808,4 +806,16 @@ namespace dialog {
ne.intbuf = x; ne.intval = &x; ne.s = its(x);
}
void helpToEdit(int& x, int vmin, int vmax, int step, int dft) {
popScreen();
string title = "help";
if(help[0] == '@') {
int iv = help.find("\t");
int id = help.find("\n");
title = help.substr(iv+1, id-iv-1);
help = help.substr(id+1);
}
editNumber(x, vmin, vmax, step, dft, title, help);
}
};