mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-16 13:52:34 +00:00
Imported FTC Clock
This commit is contained in:
@@ -42,7 +42,7 @@ module TAC
|
||||
|
||||
flow(width: 1.0, margin_bottom: 20) do
|
||||
@role_name = edit_line "", placeholder: "Add role", width: 0.9
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/plus.png"), image_width: 0.1 do
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/plus.png"), image_width: 0.1, tip: "Add role" do
|
||||
if @role_name.value.strip.length.positive?
|
||||
@roles.push(@role_name.value.strip)
|
||||
@role_name.value = ""
|
||||
@@ -61,7 +61,7 @@ module TAC
|
||||
|
||||
flow(width: 1.0, margin_bottom: 20) do
|
||||
@roster_name = edit_line "", placeholder: "Add name", width: 0.9
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/plus.png"), image_width: 0.1 do
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/plus.png"), image_width: 0.1, tip: "Add name" do
|
||||
if @roster_name.value.strip.length.positive?
|
||||
@roster.push(@roster_name.value.strip)
|
||||
@roster_name.value = ""
|
||||
@@ -96,7 +96,7 @@ module TAC
|
||||
background i.even? ? 0xff_007000 : 0xff_006000
|
||||
|
||||
tagline name, width: 0.9
|
||||
button "<b>X</b>", width: 0.1, text_size: 18, **THEME_DANGER_BUTTON do
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/trashcan.png"), image_width: 0.1, tip: "Remove role", **THEME_DANGER_BUTTON do
|
||||
@roles.delete(name)
|
||||
populate_roles
|
||||
end
|
||||
@@ -112,7 +112,7 @@ module TAC
|
||||
background i.even? ? 0xff_007000 : 0xff_006000
|
||||
|
||||
tagline name, width: 0.9
|
||||
button "<b>X</b>", width: 0.1, text_size: 18, **THEME_DANGER_BUTTON do
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/trashcan.png"), image_width: 0.1, tip: "Remove name", **THEME_DANGER_BUTTON do
|
||||
@roster.delete(name)
|
||||
populate_roster
|
||||
end
|
||||
|
||||
@@ -2,14 +2,41 @@ module TAC
|
||||
class Pages
|
||||
class GameClock < Page
|
||||
def setup
|
||||
header_bar("Practice Game Clock")
|
||||
header_bar("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
|
||||
flow(width: 1.0, height: 1.0) do
|
||||
@command_options = flow(width: 1.0) do
|
||||
stack(width: 0.3) do
|
||||
end
|
||||
|
||||
stack(width: 1.0, height: 8) do
|
||||
background 0xff_006000
|
||||
stack(width: 0.4) do
|
||||
banner "Choose Mode", width: 1.0, text_align: :center
|
||||
title "Local", width: 1.0, text_align: :center
|
||||
|
||||
button "Game Clock", width: 1.0 do
|
||||
push_state(PracticeGameClock::View)
|
||||
|
||||
window.fullscreen = true
|
||||
end
|
||||
|
||||
button "Dual Screen Game Clock", width: 1.0, enabled: false do
|
||||
end
|
||||
|
||||
title "Remote", width: 1.0, text_align: :center, margin_top: 32
|
||||
button "Game Clock Display", width: 1.0 do
|
||||
push_state(PracticeGameClock::View, remote_control_mode: true)
|
||||
|
||||
window.fullscreen = true
|
||||
end
|
||||
|
||||
button "Game Clock Remote Control", width: 1.0 do
|
||||
push_state(PracticeGameClock::RemoteControl::NetConnect)
|
||||
end
|
||||
end
|
||||
|
||||
stack(width: 0.3) do
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user