mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-05-07 15:51:22 +00:00
scores:: fixed dragging in the local scores screen
This commit is contained in:
34
scores.cpp
34
scores.cpp
@@ -314,24 +314,24 @@ void show() {
|
||||
}
|
||||
}
|
||||
else if(doexiton(sym, uni)) popScreen();
|
||||
|
||||
static int scoredragy;
|
||||
static bool lclicked;
|
||||
|
||||
if(mousepressed) {
|
||||
if(!lclicked) {
|
||||
// scoredragx = mousex;
|
||||
scoredragy = mousey;
|
||||
}
|
||||
|
||||
else {
|
||||
while(mousey > scoredragy + vid.fsize) scoredragy += vid.fsize, scorefrom--;
|
||||
while(mousey < scoredragy - vid.fsize) scoredragy -= vid.fsize, scorefrom++;
|
||||
}
|
||||
|
||||
lclicked = mousepressed;
|
||||
}
|
||||
};
|
||||
|
||||
static int scoredragy;
|
||||
static bool lclicked;
|
||||
if(mousepressed) {
|
||||
if(!lclicked) {
|
||||
// scoredragx = mousex;
|
||||
scoredragy = mousey;
|
||||
}
|
||||
|
||||
else {
|
||||
while(mousey > scoredragy + vid.fsize) scoredragy += vid.fsize, scorefrom--;
|
||||
while(mousey < scoredragy - vid.fsize) scoredragy -= vid.fsize, scorefrom++;
|
||||
}
|
||||
|
||||
lclicked = mousepressed;
|
||||
}
|
||||
else lclicked = false;
|
||||
}
|
||||
|
||||
void load_only() {
|
||||
|
||||
Reference in New Issue
Block a user