High-res: bestiary shows the detailed sprites, toolbar buttons on stone

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-07 23:33:41 +01:00
1 parent ffad92b641
commit 0ada04f4fb
3 files changed
+23 -2

No files matched your search

+8 -1
View File
@@ -912,7 +912,14 @@ impl Ui {
// locked tools (campaign: not yet available) are drawn dark
let tool_button = |bx: f32, by: f32, bw: f32, icon_id: u32, key: &str, label: &str, sel: bool, hovered: bool, locked: bool| {
let r = Rect::new(bx + px, by, bw - 2.0 * px, 3.0 * CH());
draw_rectangle(r.x, r.y, r.w, r.h, if sel { Color::new(0.42, 0.26, 0.1, 1.0) } else if hovered { Color::new(0.18, 0.13, 0.1, 1.0) } else { Color::new(0.1, 0.07, 0.07, 1.0) });
let fill = if sel { Color::new(0.42, 0.26, 0.1, 1.0) } else if hovered { Color::new(0.18, 0.13, 0.1, 1.0) } else { Color::new(0.1, 0.07, 0.07, 1.0) };
if crate::gfx::high_res_ui() {
// high-res: a slab of stone in the button's colour (the material is light grey)
let k = 1.6;
draw_texture_ex(&gfx.materials[1], r.x, r.y, Color::new(fill.r * k, fill.g * k, fill.b * k, 1.0), DrawTextureParams { dest_size: Some(vec2(r.w, r.h)), ..Default::default() });
} else {
draw_rectangle(r.x, r.y, r.w, r.h, fill);
}
// the active tool: pulsing frame
let frame = if sel { if pulse { WHITE } else { FRAME_HI } } else { Color::new(0.35, 0.28, 0.2, 1.0) };
draw_rectangle_lines(r.x, r.y, r.w, r.h, if sel { 3.0 * px } else { 2.0 * px }, frame);