fixed smooth movement in modes other than sm::NORMAL
This commit is contained in:
parent
0c2c32c126
commit
6fe07c389c
|
@ -735,7 +735,7 @@ EX void mainloopiter() {
|
||||||
}
|
}
|
||||||
|
|
||||||
mousepan = cmode & sm::NORMAL;
|
mousepan = cmode & sm::NORMAL;
|
||||||
if((cmode & (sm::DRAW | sm::MAP)) && !hiliteclick) mousepan = true;
|
if((cmode & sm::PANNING) && !hiliteclick) mousepan = true;
|
||||||
if(cmode & sm::SHOWCURSOR) mousepan = false;
|
if(cmode & sm::SHOWCURSOR) mousepan = false;
|
||||||
mousepan = mousepan && mouseaiming(false) && mouseaim_sensitivity;
|
mousepan = mousepan && mouseaiming(false) && mouseaim_sensitivity;
|
||||||
if(mousepan != oldmousepan) {
|
if(mousepan != oldmousepan) {
|
||||||
|
@ -900,7 +900,7 @@ EX void mainloopiter() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if(smooth_scrolling && !shmup::on && (cmode & sm::NORMAL)) {
|
if(smooth_scrolling && !shmup::on && (cmode & (sm::NORMAL | sm::PANNING))) {
|
||||||
rug::using_rugview urv;
|
rug::using_rugview urv;
|
||||||
auto& lastticks = sc_ticks;
|
auto& lastticks = sc_ticks;
|
||||||
ld t = (ticks - lastticks) * shiftmul / 1000.;
|
ld t = (ticks - lastticks) * shiftmul / 1000.;
|
||||||
|
|
|
@ -5490,6 +5490,7 @@ namespace sm {
|
||||||
static const int HEXEDIT = (1<<17);
|
static const int HEXEDIT = (1<<17);
|
||||||
static const int VR_MENU = (1<<18); // always show the menu in VR
|
static const int VR_MENU = (1<<18); // always show the menu in VR
|
||||||
static const int SHOWCURSOR = (1<<19); // despite MAP/DRAW always show the cursor, no panning
|
static const int SHOWCURSOR = (1<<19); // despite MAP/DRAW always show the cursor, no panning
|
||||||
|
static const int PANNING = (1<<20); // smooth scrolling works
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1321,7 +1321,7 @@ EX namespace mapeditor {
|
||||||
EX set<int> affected_id;
|
EX set<int> affected_id;
|
||||||
|
|
||||||
EX void showMapEditor() {
|
EX void showMapEditor() {
|
||||||
cmode = sm::MAP;
|
cmode = sm::MAP | sm::PANNING;
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
|
|
||||||
int fs = editor_fsize();
|
int fs = editor_fsize();
|
||||||
|
@ -2001,7 +2001,7 @@ EX namespace mapeditor {
|
||||||
|
|
||||||
EX void showDrawEditor() {
|
EX void showDrawEditor() {
|
||||||
#if CAP_POLY
|
#if CAP_POLY
|
||||||
cmode = sm::DRAW;
|
cmode = sm::DRAW | sm::PANNING;
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
drawGrid();
|
drawGrid();
|
||||||
if(callhandlers(false, hooks_prestats)) return;
|
if(callhandlers(false, hooks_prestats)) return;
|
||||||
|
|
2
rug.cpp
2
rug.cpp
|
@ -1539,7 +1539,7 @@ EX void rug_geometry_choice() {
|
||||||
}
|
}
|
||||||
|
|
||||||
EX void show() {
|
EX void show() {
|
||||||
cmode = sm::SIDE | sm::MAYDARK;
|
cmode = sm::SIDE | sm::MAYDARK | sm::PANNING;
|
||||||
gamescreen(0);
|
gamescreen(0);
|
||||||
dialog::init(XLAT("hypersian rug mode"), iinf[itPalace].color, 150, 100);
|
dialog::init(XLAT("hypersian rug mode"), iinf[itPalace].color, 150, 100);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue