mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-16 05:42:35 +00:00
Fleshed out simulator
This commit is contained in:
@@ -13,28 +13,28 @@ module TAC
|
||||
end
|
||||
|
||||
flow width: 1.0, height: 0.9 do
|
||||
background Gosu::Color::GRAY
|
||||
|
||||
@field_container = stack width: 0.4, height: 1.0 do
|
||||
background Gosu::Color::WHITE
|
||||
background Gosu::Color.new(0xff_333333)..Gosu::Color::BLACK
|
||||
end
|
||||
|
||||
stack width: 0.6, height: 1.0 do
|
||||
background Gosu::Color::GREEN
|
||||
|
||||
stack width: 1.0, height: 0.95 do
|
||||
# background Gosu::Color::YELLOW
|
||||
@source_code = edit_line "", width: 1.0, height: 1.0, text_size: 18
|
||||
end
|
||||
background Gosu::Color.new(0x88_ff8800)
|
||||
|
||||
flow width: 1.0, height: 0.05 do
|
||||
background Gosu::Color::BLUE
|
||||
|
||||
button "Run", text_size: 18, width: 0.49 do
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/right.png"), image_width: 18, width: 0.49 do
|
||||
@simulation = TAC::Simulator::Simulation.new(source_code: @source_code.value, field_container: @field_container)
|
||||
@simulation.__start
|
||||
end
|
||||
button "Save", text_size: 18, width: 0.49
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/stop.png"), image_width: 18, width: 0.49 do
|
||||
@simulation.__queue.clear if @simulation
|
||||
end
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/save.png"), image_width: 18, width: 0.49
|
||||
|
||||
@simulation_status = label "", text_size:18
|
||||
end
|
||||
|
||||
stack width: 1.0, height: 0.95 do
|
||||
@source_code = edit_line "backward 100; turn 90; forward 100; turn -90; forward 100; turn -90; forward 100", width: 1.0, height: 1.0, text_size: 18
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user