1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

mouse aiming sensitivity is now configurable; set to 0 to disable

This commit is contained in:
? 2019-02-26 12:58:46 +01:00 committed by Zeno Rogue
parent 808111de89
commit 170648a367
2 changed files with 10 additions and 1 deletions

View File

@ -1365,6 +1365,12 @@ void show3D() {
dialog::addBreak(50);
dialog::addSelItem(XLAT(DIM == 2 ? "Y shift" : "third person perspective"), fts3(vid.yshift), 'y');
if(DIM == 3) {
dialog::addSelItem(XLAT("mouse aiming sensitivity"), fts(mouseaim_sensitivity), 'f');
dialog::add_action([] () {
dialog::editNumber(mouseaim_sensitivity, -1, 1, 0.002, 0.01, XLAT("mouse aiming sensitivity"), "set to 0 to disable");
});
}
if(DIM == 2) dialog::addSelItem(XLAT("camera rotation"), fts3(vid.camera_angle), 's');
if(DIM == 2) {
dialog::addSelItem(XLAT("fixed facing"), vid.fixed_facing ? fts(vid.fixed_facing_dir) : XLAT("OFF"), 'f');
@ -1907,6 +1913,9 @@ int read_config_args() {
else if(argis("-msmoff")) {
PHASEFROM(2); memory_saving_mode = false;
}
else if(argis("-msens")) {
PHASEFROM(2); shift_arg_formula(mouseaim_sensitivity);
}
TOGGLE('o', vid.usingGL, switchGL())
TOGGLE('f', vid.full, switchFullscreen())
else if(argis("-d:sight")) {

View File

@ -534,7 +534,7 @@ void mainloopiter() {
if(cwt.mirrored) playerV = playerV * Mirror;
}
mousepan = normal && DIM == 3;
mousepan = normal && DIM == 3 && mouseaim_sensitivity;
if(mousepan != oldmousepan) {
oldmousepan = mousepan;
if(mousepan) {