WIP: Initial GUI work

This commit is contained in:
2022-09-22 09:05:44 -05:00
parent fc19963cff
commit 0cac1aa7af
4 changed files with 351 additions and 2 deletions

29
examples/gui_state.cr Normal file
View File

@@ -0,0 +1,29 @@
require "./../src/cyberarm_engine"
class Window < CyberarmEngine::Window
class State < CyberarmEngine::GuiState
@options : Int32
def setup
stack(width: 100, height: 100.0) do
background 0xff_353535
title "Hello World"
end
end
def draw
Gosu.draw_rect(0, 0, window.width, window.height, 0xff_353535)
end
def needs_cursor?
true
end
end
def setup
push_state(State.new(3))
end
end
Window.new.show