From 8a60eb60a390e6b6bb31fe7b8e7d8403fced8e38 Mon Sep 17 00:00:00 2001 From: y4my4my4m <8145020+y4my4my4m@users.noreply.github.com> Date: Wed, 7 Jun 2023 14:14:52 +0900 Subject: [PATCH] update --- src/Home/PaletteEditor/PaletteEdit.ZC | 10 ++-------- src/Home/PaletteEditor/PaletteGod.ZC | 13 ++++--------- src/Home/PaletteEditor/Palettes/Tradition.ZC | 2 +- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/Home/PaletteEditor/PaletteEdit.ZC b/src/Home/PaletteEditor/PaletteEdit.ZC index 6465e7c6..bf0029d5 100755 --- a/src/Home/PaletteEditor/PaletteEdit.ZC +++ b/src/Home/PaletteEditor/PaletteEdit.ZC @@ -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); - - - } diff --git a/src/Home/PaletteEditor/PaletteGod.ZC b/src/Home/PaletteEditor/PaletteGod.ZC index c2e02d2c..79eb8745 100755 --- a/src/Home/PaletteEditor/PaletteGod.ZC +++ b/src/Home/PaletteEditor/PaletteGod.ZC @@ -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; diff --git a/src/Home/PaletteEditor/Palettes/Tradition.ZC b/src/Home/PaletteEditor/Palettes/Tradition.ZC index e0ef467b..2aa2f68d 100755 --- a/src/Home/PaletteEditor/Palettes/Tradition.ZC +++ b/src/Home/PaletteEditor/Palettes/Tradition.ZC @@ -7,4 +7,4 @@ public U0 PaletteSetTradition(Bool persistent=TRUE) LFBFlush; if (persistent) fp_set_std_palette = &PaletteSetTradition; -} \ No newline at end of file +} \ No newline at end of file