mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
fixed selection in the color dialog
This commit is contained in:
parent
0ffec1975c
commit
c79037088f
@ -428,11 +428,12 @@ namespace dialog {
|
|||||||
unsigned char* pts = (unsigned char*) &color;
|
unsigned char* pts = (unsigned char*) &color;
|
||||||
pts[uni - 'A'] = x;
|
pts[uni - 'A'] = x;
|
||||||
}
|
}
|
||||||
else if(uni == ' ') {
|
else if(uni == ' ' || uni == '\n') {
|
||||||
bool inHistory = false;
|
bool inHistory = false;
|
||||||
for(int i=0; i<10; i++) if(colorhistory[i] == (unsigned) color)
|
for(int i=0; i<10; i++) if(colorhistory[i] == (unsigned) color)
|
||||||
inHistory = true;
|
inHistory = true;
|
||||||
if(!inHistory) { colorhistory[lch] = color; lch++; lch %= 10; }
|
if(!inHistory) { colorhistory[lch] = color; lch++; lch %= 10; }
|
||||||
|
if(reaction) reaction();
|
||||||
popScreen();
|
popScreen();
|
||||||
}
|
}
|
||||||
else if(uni >= '0' && uni <= '9') {
|
else if(uni >= '0' && uni <= '9') {
|
||||||
@ -456,7 +457,6 @@ namespace dialog {
|
|||||||
pts[colorp] += abs(shiftmul) < .6 ? 1 : 17;
|
pts[colorp] += abs(shiftmul) < .6 ? 1 : 17;
|
||||||
}
|
}
|
||||||
else if(doexiton(sym, uni)) {
|
else if(doexiton(sym, uni)) {
|
||||||
if(reaction) reaction();
|
|
||||||
popScreen();
|
popScreen();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user