fix: color draw pile when it is hovered/selected
parent
30eefb5279
commit
d6a1438f98
|
@ -335,8 +335,14 @@ fn render(window: *seizer.Window) !void {
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
const is_selected = selected_deck != null and selected_deck.? == &draw_pile;
|
||||||
const is_hovered = hovered_deck != null and hovered_deck.? == &draw_pile;
|
const is_hovered = hovered_deck != null and hovered_deck.? == &draw_pile;
|
||||||
const color = if (is_hovered) [4]u8{ 0xA0, 0xFF, 0xA0, 0xFF } else [4]u8{ 0xFF, 0xFF, 0xFF, 0xFF };
|
const color = if (is_selected)
|
||||||
|
[4]u8{ 0xFF, 0xA0, 0xA0, 0xFF }
|
||||||
|
else if (is_hovered)
|
||||||
|
[4]u8{ 0xA0, 0xFF, 0xA0, 0xFF }
|
||||||
|
else
|
||||||
|
[4]u8{ 0xFF, 0xFF, 0xFF, 0xFF };
|
||||||
|
|
||||||
var pos = [2]f32{ @floatFromInt(margin), @floatFromInt(margin) };
|
var pos = [2]f32{ @floatFromInt(margin), @floatFromInt(margin) };
|
||||||
pos[0] += board_offset[0];
|
pos[0] += board_offset[0];
|
||||||
|
|
Loading…
Reference in New Issue