Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions dragon/layout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down