This commit is contained in:
y4my4my4m 2023-05-31 02:51:04 +09:00
parent c947d9d451
commit 2b9a3b0bbb
2 changed files with 16 additions and 10 deletions

View file

@ -160,10 +160,6 @@ U0 DrawCtrlSlider(CDC *dc, CCtrl *c)
else
dc->color = 15;
// Border for preview box
GrRect(dc, (size * i)-1, c->win_task->pix_height - (size*1.5)-1, size+2, size+2);
if (i == selected_color)
dc->color = 0;
GrRect(dc, 6, (size2 * 2) + 65 + 16 * i, 80, 18);
@ -171,18 +167,26 @@ U0 DrawCtrlSlider(CDC *dc, CCtrl *c)
GrRect(dc, 6, (size2 * 2) + 65 + 16 * i, 80, 18);
if (i == selected_color)
dc->color = 15;
else
dc->color = i;
bias = (size / 2) - 4;
if (i >= 9)
bias = (size / 2) - 8;
GrPrint(dc, bias + (i * size), c->win_task->pix_height - (size * .6) + (size / 4), "%d", i);
GrPrint(dc, 10, (size2 * 2) + 70 + 16 * i, "#%d: Test", i);
// Border for preview box
GrRect(dc, (size * i)-2, c->win_task->pix_height - (size*1.5)-1, size+2, size+1);
// preview box
dc->color = i;
GrRect(dc, (size * i), c->win_task->pix_height - (size*1.5), size, size);
}
@ -429,11 +433,11 @@ public U0 PaletteEditor()
current_palette = PaletteSelect;
break;
case 'r':
gr_palette[selected_color] = ColorGod(TRUE);
gr_palette[selected_color] = ColorGod;
LFBFlush;
break;
case 'R':
PaletteGod(FALSE, TRUE);
PaletteGod;
break;
case CH_CTRLI:
PopUpOk("\n\n Use the arrows to select color\n\n # to manually input hex value","\n\n\n\t\tMade by y4my4m\n\n");

View file

@ -7,12 +7,14 @@ CBGR24 ColorGod(Bool instant=TRUE)
return GodPick & 0xFFFFFF;
}
public U0 PaletteGod(Bool seedUse=TRUE, Bool instant=TRUE)
public U0 PaletteGod(Bool seedUse=FALSE, Bool instant=TRUE)
{
// Generate a random palette, seed-based or not
I64 i;
if (seedUse)
if (seedUse) {
Seed(GodPick);
}
for (i=0; i < 16; i++)
gr_palette[i] = ColorGod(instant);
LFBFlush;