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