diff --git a/docs/index.txt b/docs/index.txt index d1887f18..c2860679 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -1918,7 +1918,7 @@ Instead of manually defining the properties, you can represent a sprite using th # anything you want to represent as a sprite attr_sprite - def initialize(x: 0, y: 0, w: 0, h: 0k + def initialize(x: 0, y: 0, w: 0, h: 0) @x = x @y = y @w = w diff --git a/dragon/layout.rb b/dragon/layout.rb index 01e8376c..0b2800f7 100644 --- a/dragon/layout.rb +++ b/dragon/layout.rb @@ -663,13 +663,17 @@ def __debug_primitives__(color:) __debug_primitives_seperators__ end - def debug_primitives(invert_colors: false) + def debug_primitives(invert_colors: false, custom_color: nil) color = if invert_colors { r: 255, g: 255, b: 255 } else { r: 0, g: 0, b: 0 } end - + + if cusomt_color && !invert_colors + color = custom_color + end + @debug_primitives_colors ||= color if @debug_primitives_colors != color