From 3a78650f998f7ece23102d0cf57b45e7003a8411 Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Thu, 26 Dec 2019 14:06:39 +0100 Subject: [PATCH] colors --- src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index e3657e2..e66ab07 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,11 +20,13 @@ use log::Level; use gfx_glyph::{Section, GlyphBrushBuilder,GlyphBrush, Scale}; use gfx_device_gl::{Resources,Factory}; +const BG_COLOR: [f32; 4] = [0.0, 0.0, 252.0/256.0, 1.0]; + // font options const FT_SIZE_PX: f32 = 11.0; const FT_COLOR_WHITE: [f32; 4] = [1.0; 4]; -const FT_COLOR_RED: [f32; 4] = [1.0, 0.0, 0.0, 1.0]; -const FT_COLOR_GREEN: [f32; 4] = [0.0, 1.0, 0.0, 1.0]; +const FT_COLOR_RED: [f32; 4] = [168.0/256.0, 0.0, 32.0/256.0, 1.0]; +const FT_COLOR_GREEN: [f32; 4] = [0.0, 168.0/256.0, 0.0, 1.0]; const FT_LINE_DISTANCE: f32 = FT_SIZE_PX * 0.5; lazy_static! { static ref FT_SCALE: Scale = Scale::uniform(FT_SIZE_PX); @@ -119,7 +121,7 @@ fn render(window: &mut PistonWindow, event: &Event, glyphs: &mut GlyphBrush, cpu: &CPU, bus: &MemoryBus, disasm: &Disasm) { window.draw_2d(event, |c, g, d| { - clear([0.0, 0.0, 1.0, 1.0], g); + clear(BG_COLOR, g); let debug_offset = [10.0, 10.0];