|
|
@ -8,6 +8,10 @@ class UI |
|
|
|
@uiscale = uiscale |
|
|
|
@uiscale = uiscale |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private def pos |
|
|
|
|
|
|
|
Vector[@x, @y] |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def color(color=0xff_ffffff) |
|
|
|
def color(color=0xff_ffffff) |
|
|
|
return Gosu::Color.argb(color) |
|
|
|
return Gosu::Color.argb(color) |
|
|
|
end |
|
|
|
end |
|
|
@ -21,11 +25,15 @@ class UI |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def draw_rect(x, y, width, height, color=0xff_ffffff, z=0, mode=:default) |
|
|
|
def draw_rect(x, y, width, height, color=0xff_ffffff, z=0, mode=:default) |
|
|
|
v1 = Vector[0, 0, color] |
|
|
|
v1 = Vector[0, 0, color] + self.pos + Vector[x, y] |
|
|
|
v2 = Vector[width, 0, color] |
|
|
|
v2 = Vector[width, 0, color] + self.pos + Vector[x, y] |
|
|
|
v3 = Vector[0, height, color] |
|
|
|
v3 = Vector[0, height, color] + self.pos + Vector[x, y] |
|
|
|
v4 = Vector[width, height, color] |
|
|
|
v4 = Vector[width, height, color] + self.pos + Vector[x, y] |
|
|
|
self.draw_quad(v1, v2, v3, v4, z, mode) |
|
|
|
self.draw_quad(v1, v2, v3, v4, z, mode) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def draw_circle(x, y, r, c, z = 0, thickness = 1, sides = nil, mode = :default) |
|
|
|
|
|
|
|
Gosu::draw_circle(x, y, r, c z, thickness, sides, mode) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|