mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
Fix
This commit is contained in:
parent
18e545dfe8
commit
2f7381847a
2 changed files with 7 additions and 8 deletions
|
@ -171,7 +171,6 @@ U0 DrawCtrlSlider(CDC *dc, CCtrl *c)
|
|||
|
||||
GrRect(dc, 6, (size2 * 2) + 65 + 16 * i, 80, 18);
|
||||
|
||||
|
||||
if (i == selected_color)
|
||||
dc->color = 15;
|
||||
else
|
||||
|
@ -421,7 +420,7 @@ public U0 PaletteEditor()
|
|||
if (selected_color == 15)
|
||||
selected_color = -1;
|
||||
SelectColor(selected_color + 1, c);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case CH_CTRLO:
|
||||
|
@ -429,7 +428,7 @@ public U0 PaletteEditor()
|
|||
current_palette = PaletteSelect;
|
||||
break;
|
||||
case 'r':
|
||||
gr_palette[selected_color] = ColorGod(FALSE, TRUE);
|
||||
gr_palette[selected_color] = ColorGod(TRUE);
|
||||
LFBFlush;
|
||||
break;
|
||||
case 'R':
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
CBGR24 ColorGod(Bool seedUse=TRUE, Bool instant=TRUE)
|
||||
CBGR24 ColorGod(Bool instant=TRUE)
|
||||
{
|
||||
// Generate a random color, seed-based or not
|
||||
if (seedUse)
|
||||
Seed(GodPick);
|
||||
if (instant || seedUse)
|
||||
if (instant)
|
||||
return RandI32 & 0xFFFFFF;
|
||||
else
|
||||
return GodPick & 0xFFFFFF;
|
||||
|
@ -13,8 +11,10 @@ public U0 PaletteGod(Bool seedUse=TRUE, Bool instant=TRUE)
|
|||
{
|
||||
// Generate a random palette, seed-based or not
|
||||
I64 i;
|
||||
if (seedUse)
|
||||
Seed(GodPick);
|
||||
for (i=0; i < 16; i++)
|
||||
gr_palette[i] = ColorGod(seedUse, instant);
|
||||
gr_palette[i] = ColorGod(instant);
|
||||
LFBFlush;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue