mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-14 07:12:34 +00:00
Added GAME_ROOT_PATH and ASSETS_PATH constants, make boot and closing use ASSETS_PATH, simplified Camera#mouse_pick and Camera#center
This commit is contained in:
@@ -4,7 +4,7 @@ class IMICRTS
|
||||
@title = Gosu::Font.new(56, name: "Noto Sans Display", bold: true)
|
||||
@text = Gosu::Font.new(18, name: "Noto Sans Thaana", bold: true)
|
||||
@name = IMICRTS::NAME
|
||||
@logo = Gosu::Image.new("assets/logo.png")
|
||||
@logo = Gosu::Image.new("#{ASSETS_PATH}/logo.png")
|
||||
|
||||
@messages = ["Loading", "Compiling Protons", "Launching Warhead", "git push origin --force"]
|
||||
@messages_index = 0
|
||||
@@ -30,39 +30,35 @@ class IMICRTS
|
||||
|
||||
@background = Gosu::Color.new(0x007a0d71)
|
||||
@background_two = Gosu::Color.new(0x007b6ead)
|
||||
|
||||
$window.width = Gosu.screen_width
|
||||
$window.height = Gosu.screen_height
|
||||
$window.fullscreen = true
|
||||
end
|
||||
|
||||
def draw
|
||||
Gosu.draw_quad(
|
||||
0, 0, @background_two,
|
||||
$window.width, 0, @background,
|
||||
0, $window.height, @background,
|
||||
$window.width, $window.height, @background_two
|
||||
window.width, 0, @background,
|
||||
0, window.height, @background,
|
||||
window.width, window.height, @background_two
|
||||
)
|
||||
|
||||
Gosu.draw_rect(
|
||||
0, $window.height/2 - 35,
|
||||
$window.width, 71,
|
||||
0, window.height/2 - 35,
|
||||
window.width, 71,
|
||||
Gosu::Color.new(0xff949dad)
|
||||
)
|
||||
|
||||
c = Gosu::Color.new(0xff55dae1)
|
||||
c2 = Gosu::Color.new(0xff3c9ec5)
|
||||
Gosu.draw_quad(
|
||||
0, $window.height/2 - 30, c,
|
||||
$window.width, $window.height/2 - 30, c2,
|
||||
0, $window.height/2 + 30, c,
|
||||
$window.width, $window.height/2 + 30, c2
|
||||
0, window.height/2 - 30, c,
|
||||
window.width, window.height/2 - 30, c2,
|
||||
0, window.height/2 + 30, c,
|
||||
window.width, window.height/2 + 30, c2
|
||||
)
|
||||
|
||||
|
||||
@logo.draw($window.width/2 - @logo.width/2, $window.height/2 - (@logo.height/3 + 14), 0)
|
||||
@logo.draw(window.width/2 - @logo.width/2, window.height/2 - (@logo.height/3 + 14), 0)
|
||||
|
||||
@text.draw_text(@status, $window.width - (@text.text_width(@status.gsub(".", "")) + @text.text_width("...")), $window.height - @text.height, 0)
|
||||
@text.draw_text(@status, window.width - (@text.text_width(@status.gsub(".", "")) + @text.text_width("...")), window.height - @text.height, 0)
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
Reference in New Issue
Block a user