This commit is contained in:
y4my4my4m 2023-06-07 14:14:52 +09:00
parent 0afbbd6ce2
commit 8a60eb60a3
3 changed files with 7 additions and 18 deletions

View file

@ -38,9 +38,7 @@ U0 DrawCtrlSlider(CDC *dc, CCtrl *c)
CSliderState *s = c->state;
I64 size = (c->win_task->pix_width / 16),
// border = size / 16,
size2 = (c->win_task->pix_height / 32),
// slider_amount = 3,
i,
pos, col,
bias;
@ -62,10 +60,9 @@ U0 DrawCtrlSlider(CDC *dc, CCtrl *c)
dc->color = 15;
GrRect(dc, 94, 8, 58, 12);
dc->color = selected_color;
// Color preview next to #hex
GrRect(dc, 78, 8, 12, 12);
// #Hex value
dc->color = selected_color;
GrRect(dc, 78, 8, 12, 12);
GrPrint(dc, 95, 10, "#%x%x%x", gr_palette[selected_color].r,
gr_palette[selected_color].g,
gr_palette[selected_color].b);
@ -184,9 +181,6 @@ U0 DrawCtrlSlider(CDC *dc, CCtrl *c)
// preview box
dc->color = i;
GrRect(dc, (size * i), c->win_task->pix_height - (size*1.5), size, size);
}

View file

@ -1,6 +1,5 @@
CBGR24 ColorGod(Bool instant=TRUE)
{
// Generate a random color
{ // Generate a random color, seed-based or not
if (instant)
return RandI32 & 0xFFFFFF;
else
@ -8,16 +7,12 @@ CBGR24 ColorGod(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;
if (seedUse) {
Seed(GodPick);
}
if (seedUse) Seed(GodPick);
for (i=0; i < 16; i++)
gr_palette[i] = ColorGod(instant);
LFBFlush;
}
// PaletteGod;

View file

@ -7,4 +7,4 @@ public U0 PaletteSetTradition(Bool persistent=TRUE)
LFBFlush;
if (persistent)
fp_set_std_palette = &PaletteSetTradition;
}
}