colourpicker

Simple Colour Picker written in C
git clone anongit@rnpnr.xyz:colourpicker.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

Commit: c500e51b9fef2a5cc5054994b95ca77a6aaaed56
Parent: e42364462f3c8fafa6f3fe6cdd363a5cd71a313f
Author: Randy Palamar
Date:   Mon,  5 Aug 2024 21:11:55 -0600

switch buttons back to RoundedLinesEx for now

Diffstat:
Mcolourpicker.c | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/colourpicker.c b/colourpicker.c @@ -443,13 +443,10 @@ do_rect_button(ButtonState *btn, v2 mouse, Rect r, Color bg, f32 dt, f32 hover_s b32 pressed = do_button(btn, mouse, r, dt, hover_speed); f32 param = lerp(1, scale_target, btn->hover_t); - v2 scale = {.x = param, .y = param}; - DrawRectangleRounded(scale_rect_centered(r, scale).rr, SELECTOR_ROUNDNESS, 0, - fade(SELECTOR_BORDER_COLOUR, fade_t)); - scale.x *= 0.95; - scale.y *= 0.90; - DrawRectangleRounded(scale_rect_centered(r, scale).rr, SELECTOR_ROUNDNESS, 0, - fade(bg, fade_t)); + Rect sr = scale_rect_centered(r, (v2){.x = param, .y = param}); + DrawRectangleRounded(sr.rr, SELECTOR_ROUNDNESS, 0, fade(bg, fade_t)); + DrawRectangleRoundedLinesEx(sr.rr, SELECTOR_ROUNDNESS, 0, SELECTOR_BORDER_WIDTH, + fade(SELECTOR_BORDER_COLOUR, fade_t)); return pressed; }