1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-28 04:17:39 +00:00

embeddings:: fixed setting changing

This commit is contained in:
Zeno Rogue
2023-02-10 23:39:49 +01:00
parent 1295ea7920
commit c5e05bd199
2 changed files with 14 additions and 3 deletions

View File

@@ -2619,7 +2619,13 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
}
dialog::addHelp(help);
})
->set_reaction(geom3::apply_settings_light);
->set_reaction([] {
bool b = vid.tc_alpha < vid.tc_camera;
if(vid.tc_alpha >= vid.tc_depth) vid.tc_alpha = vid.depth - 1;
if(vid.tc_camera >= vid.tc_depth) vid.tc_camera = vid.depth - 1;
if(vid.tc_alpha == vid.tc_camera) (b ? vid.tc_alpha : vid.tc_camera)--;
geom3::apply_settings_light();
});
param_f(vid.camera, "camera", "3D camera level", 1)
->editable(0, 5, .1, "", "", 'c')
->modif([] (float_setting* x) { x->menu_item_name = (GDIM == 2 ? "Camera level above the plane" : "Z shift"); })