1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-22 16:44:48 +00:00

more parameter improvements and fixes

This commit is contained in:
Zeno Rogue
2023-08-09 01:11:44 +02:00
parent 5057f10358
commit 234a691ab6
2 changed files with 19 additions and 29 deletions

View File

@@ -1101,7 +1101,7 @@ EX namespace dialog {
if(ne.intval) *ne.intval = ldtoint(*ne.editwhat);
#if CAP_ANIMATIONS
if(ne.animatable) {
auto p = anims::find_param(ne.editwhat);
auto p = anims::find_param(ne.intval ? (void*) ne.intval : (void*) ne.editwhat);
if(p) p->load_as_animation(ne.s);
}
#endif
@@ -1388,7 +1388,7 @@ EX namespace dialog {
EX void editNumber(int& x, int vmin, int vmax, ld step, int dft, string title, string help) {
editNumber(ne.intbuf, vmin, vmax, step, dft, title, help);
ne.intbuf = x; ne.intval = &x; ne.s = its(x);
ne.animatable = false;
ne.animatable = true;
}
EX void helpToEdit(int& x, int vmin, int vmax, int step, int dft) {