mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
fixed sightrange settings
This commit is contained in:
parent
8ed6c72622
commit
9daa95599d
28
config.cpp
28
config.cpp
@ -1284,14 +1284,24 @@ EX void edit_sightrange() {
|
|||||||
#endif
|
#endif
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
dialog::init("sight range settings");
|
dialog::init("sight range settings");
|
||||||
if(WDIM == 2) add_edit(vid.use_smart_range);
|
add_edit(vid.use_smart_range);
|
||||||
if(vid.use_smart_range)
|
if(vid.use_smart_range)
|
||||||
add_edit(WDIM == 2 ? vid.smart_range_detail : vid.smart_range_detail_3);
|
add_edit(WDIM == 2 ? vid.smart_range_detail : vid.smart_range_detail_3);
|
||||||
else if(WDIM == 3) {
|
else {
|
||||||
|
if(WDIM == 2) {
|
||||||
|
add_edit(sightrange_bonus);
|
||||||
|
if(GDIM == 3) {
|
||||||
dialog::addSelItem(XLAT("3D sight range for the fog effect"), fts(sightranges[geometry]), 'r');
|
dialog::addSelItem(XLAT("3D sight range for the fog effect"), fts(sightranges[geometry]), 'r');
|
||||||
|
dialog::add_action([] {
|
||||||
|
dialog::editNumber(sightranges[geometry], 0, 2 * M_PI, 0.5, M_PI, XLAT("fog effect"), "");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(WDIM == 3) {
|
||||||
|
dialog::addSelItem(XLAT("3D sight range"), fts(sightranges[geometry]), 'r');
|
||||||
dialog::add_action([] {
|
dialog::add_action([] {
|
||||||
dialog::editNumber(sightranges[geometry], 0, 2 * M_PI, 0.5, M_PI, XLAT("3D sight range"),
|
dialog::editNumber(sightranges[geometry], 0, 2 * M_PI, 0.5, M_PI, XLAT("3D sight range"),
|
||||||
(pmodel == mdGeodesic && sol) ? solhelp() : XLAT(
|
XLAT(
|
||||||
"Sight range for 3D geometries is specified in the absolute units. This value also affects the fog effect.\n\n"
|
"Sight range for 3D geometries is specified in the absolute units. This value also affects the fog effect.\n\n"
|
||||||
"In spherical geometries, the sight range of 2? will let you see things behind you as if they were in front of you, "
|
"In spherical geometries, the sight range of 2? will let you see things behind you as if they were in front of you, "
|
||||||
"and the sight range of ? (or more) will let you see things on the antipodal point just as if they were close to you.\n\n"
|
"and the sight range of ? (or more) will let you see things on the antipodal point just as if they were close to you.\n\n"
|
||||||
@ -1302,14 +1312,6 @@ EX void edit_sightrange() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
add_edit(sightrange_bonus);
|
|
||||||
if(GDIM == 3) {
|
|
||||||
dialog::addSelItem(XLAT("3D sight range for the fog effect"), fts(sightranges[geometry]), 'r');
|
|
||||||
dialog::add_action([] {
|
|
||||||
dialog::editNumber(sightranges[geometry], 0, 2 * M_PI, 0.5, M_PI, XLAT("fog effect"), "");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#if CAP_SOLV
|
#if CAP_SOLV
|
||||||
if(pmodel == mdGeodesic && sol) {
|
if(pmodel == mdGeodesic && sol) {
|
||||||
@ -1389,10 +1391,10 @@ EX void menuitem_sightrange(char c IS('c')) {
|
|||||||
if(pmodel == mdGeodesic && sol)
|
if(pmodel == mdGeodesic && sol)
|
||||||
dialog::addSelItem(XLAT("sight range settings"), fts(sn::solrange_xy) + "x" + fts(sn::solrange_z), c);
|
dialog::addSelItem(XLAT("sight range settings"), fts(sn::solrange_xy) + "x" + fts(sn::solrange_z), c);
|
||||||
#endif
|
#endif
|
||||||
else if(WDIM == 3)
|
|
||||||
dialog::addSelItem(XLAT("sight range settings"), fts(sightranges[geometry]) + "au", c);
|
|
||||||
else if(vid.use_smart_range)
|
else if(vid.use_smart_range)
|
||||||
dialog::addSelItem(XLAT("sight range settings"), fts(WDIM == 3 ? vid.smart_range_detail_3 : vid.smart_range_detail) + " px", c);
|
dialog::addSelItem(XLAT("sight range settings"), fts(WDIM == 3 ? vid.smart_range_detail_3 : vid.smart_range_detail) + " px", c);
|
||||||
|
else if(WDIM == 3)
|
||||||
|
dialog::addSelItem(XLAT("sight range settings"), fts(sightranges[geometry]) + "au", c);
|
||||||
else
|
else
|
||||||
dialog::addSelItem(XLAT("sight range settings"), format("%+d", sightrange_bonus), c);
|
dialog::addSelItem(XLAT("sight range settings"), format("%+d", sightrange_bonus), c);
|
||||||
dialog::add_action_push(edit_sightrange);
|
dialog::add_action_push(edit_sightrange);
|
||||||
|
Loading…
Reference in New Issue
Block a user