Stubbed game clock page

This commit is contained in:
2021-09-29 09:08:15 -05:00
parent a34d4bbeb2
commit 7d2d44c52f
3 changed files with 33 additions and 4 deletions

19
lib/pages/game_clock.rb Normal file
View File

@@ -0,0 +1,19 @@
module TAC
class Pages
class GameClock < Page
def setup
header_bar("Practice Game Clock")
body.clear do
stack(width: 1.0, height: 1.0) do
label TAC::NAME, width: 1.0, text_size: 48, text_align: :center
stack(width: 1.0, height: 8) do
background 0xff_006000
end
end
end
end
end
end
end

View File

@@ -65,10 +65,6 @@ class Editor < CyberarmEngine::GuiState
page(TAC::Pages::TACNET)
end
button get_image("#{TAC::ROOT_PATH}/media/icons/right.png"), margin: 4, tip: "Simulator", image_width: 1.0 do
page(TAC::Pages::Simulator)
end
button get_image("#{TAC::ROOT_PATH}/media/icons/gear.png"), margin: 4, tip: "Configurations", image_width: 1.0 do
page(TAC::Pages::Configurations)
end
@@ -81,6 +77,15 @@ class Editor < CyberarmEngine::GuiState
page(TAC::Pages::Search)
end
stack(margin_left: 4, width: 1.0, margin_right: 4) do
background 0xff_444444
para "Tools", width: 1.0, text_align: :center
end
button get_image("#{TAC::ROOT_PATH}/media/icons/right.png"), margin: 4, tip: "Simulator", image_width: 1.0 do
page(TAC::Pages::Simulator)
end
button get_image("#{TAC::ROOT_PATH}/media/icons/joystickLeft.png"), margin: 4, tip: "Field Planner", image_width: 1.0 do
page(TAC::Pages::FieldPlanner)
end
@@ -88,6 +93,10 @@ class Editor < CyberarmEngine::GuiState
button get_image("#{TAC::ROOT_PATH}/media/icons/massiveMultiplayer.png"), margin: 4, tip: "Drive Team Rotation Generator", image_width: 1.0 do
page(TAC::Pages::DriveTeamRotationGenerator)
end
button get_image("#{TAC::ROOT_PATH}/media/icons/trophy.png"), margin: 4, tip: "Practice Game Clock", image_width: 1.0 do
page(TAC::Pages::GameClock)
end
end
@content = stack(width: window.width - @navigation.style.width, height: 1.0) do

View File

@@ -29,6 +29,7 @@ require_relative "lib/pages/presets"
require_relative "lib/pages/search"
require_relative "lib/pages/field_planner"
require_relative "lib/pages/drive_team_rotation_generator"
require_relative "lib/pages/game_clock"
require_relative "lib/simulator/robot"
require_relative "lib/simulator/field"
require_relative "lib/simulator/simulation"