mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-26 07:20:32 +00:00
update
This commit is contained in:
parent
0afbbd6ce2
commit
8a60eb60a3
3 changed files with 7 additions and 18 deletions
|
@ -38,9 +38,7 @@ U0 DrawCtrlSlider(CDC *dc, CCtrl *c)
|
||||||
|
|
||||||
CSliderState *s = c->state;
|
CSliderState *s = c->state;
|
||||||
I64 size = (c->win_task->pix_width / 16),
|
I64 size = (c->win_task->pix_width / 16),
|
||||||
// border = size / 16,
|
|
||||||
size2 = (c->win_task->pix_height / 32),
|
size2 = (c->win_task->pix_height / 32),
|
||||||
// slider_amount = 3,
|
|
||||||
i,
|
i,
|
||||||
pos, col,
|
pos, col,
|
||||||
bias;
|
bias;
|
||||||
|
@ -62,10 +60,9 @@ U0 DrawCtrlSlider(CDC *dc, CCtrl *c)
|
||||||
dc->color = 15;
|
dc->color = 15;
|
||||||
GrRect(dc, 94, 8, 58, 12);
|
GrRect(dc, 94, 8, 58, 12);
|
||||||
|
|
||||||
dc->color = selected_color;
|
|
||||||
// Color preview next to #hex
|
|
||||||
GrRect(dc, 78, 8, 12, 12);
|
|
||||||
// #Hex value
|
// #Hex value
|
||||||
|
dc->color = selected_color;
|
||||||
|
GrRect(dc, 78, 8, 12, 12);
|
||||||
GrPrint(dc, 95, 10, "#%x%x%x", gr_palette[selected_color].r,
|
GrPrint(dc, 95, 10, "#%x%x%x", gr_palette[selected_color].r,
|
||||||
gr_palette[selected_color].g,
|
gr_palette[selected_color].g,
|
||||||
gr_palette[selected_color].b);
|
gr_palette[selected_color].b);
|
||||||
|
@ -184,9 +181,6 @@ U0 DrawCtrlSlider(CDC *dc, CCtrl *c)
|
||||||
// preview box
|
// preview box
|
||||||
dc->color = i;
|
dc->color = i;
|
||||||
GrRect(dc, (size * i), c->win_task->pix_height - (size*1.5), size, size);
|
GrRect(dc, (size * i), c->win_task->pix_height - (size*1.5), size, size);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
CBGR24 ColorGod(Bool instant=TRUE)
|
CBGR24 ColorGod(Bool instant=TRUE)
|
||||||
{
|
{ // Generate a random color, seed-based or not
|
||||||
// Generate a random color
|
|
||||||
if (instant)
|
if (instant)
|
||||||
return RandI32 & 0xFFFFFF;
|
return RandI32 & 0xFFFFFF;
|
||||||
else
|
else
|
||||||
|
@ -8,16 +7,12 @@ CBGR24 ColorGod(Bool instant=TRUE)
|
||||||
}
|
}
|
||||||
|
|
||||||
public U0 PaletteGod(Bool seedUse=FALSE, Bool instant=TRUE)
|
public U0 PaletteGod(Bool seedUse=FALSE, Bool instant=TRUE)
|
||||||
{
|
{ // Generate a random palette, seed-based or not
|
||||||
// Generate a random palette, seed-based or not
|
|
||||||
I64 i;
|
I64 i;
|
||||||
|
|
||||||
if (seedUse) {
|
if (seedUse) Seed(GodPick);
|
||||||
Seed(GodPick);
|
|
||||||
}
|
|
||||||
for (i=0; i < 16; i++)
|
for (i=0; i < 16; i++)
|
||||||
gr_palette[i] = ColorGod(instant);
|
gr_palette[i] = ColorGod(instant);
|
||||||
LFBFlush;
|
LFBFlush;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PaletteGod;
|
|
||||||
|
|
|
@ -7,4 +7,4 @@ public U0 PaletteSetTradition(Bool persistent=TRUE)
|
||||||
LFBFlush;
|
LFBFlush;
|
||||||
if (persistent)
|
if (persistent)
|
||||||
fp_set_std_palette = &PaletteSetTradition;
|
fp_set_std_palette = &PaletteSetTradition;
|
||||||
}
|
}
|
Loading…
Reference in a new issue