Skip to content

Commit

Permalink
anchored controls
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwes committed Aug 20, 2016
1 parent cbb8605 commit e7e1c9e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/gut/gut.gd
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func setup_controls():
_ctrls.runtime_label.set_text('0.0')
_ctrls.runtime_label.set_size(Vector2(50, 30))
_ctrls.runtime_label.set_pos(Vector2(_ctrls.clear_button.get_pos().x - 60, _ctrls.clear_button.get_pos().y + 10))
_set_anchor_bottom_right(_ctrls.runtime_label)

add_child(_ctrls.continue_button)
_ctrls.continue_button.set_text("Continue")
Expand All @@ -210,6 +211,7 @@ func setup_controls():
_ctrls.ignore_continue_checkbox.connect('pressed', self, '_on_ignore_continue_checkbox_pressed')
_ctrls.ignore_continue_checkbox.set_size(Vector2(50, 30))
_ctrls.ignore_continue_checkbox.set_pos(Vector2(_ctrls.continue_button.get_pos().x, _ctrls.continue_button.get_pos().y + _ctrls.continue_button.get_size().y - 5))
_set_anchor_bottom_right(_ctrls.ignore_continue_checkbox)

var log_label = Label.new()
add_child(log_label)
Expand All @@ -234,25 +236,29 @@ func setup_controls():
add_child(script_prog_label)
script_prog_label.set_pos(Vector2(100, log_label.get_pos().y))
script_prog_label.set_text('Scripts:')
_set_anchor_bottom_left(script_prog_label)

add_child(_ctrls.script_progress)
_ctrls.script_progress.set_size(Vector2(200, 10))
_ctrls.script_progress.set_pos(script_prog_label.get_pos() + Vector2(70, 0))
_ctrls.script_progress.set_min(0)
_ctrls.script_progress.set_max(1)
_ctrls.script_progress.set_unit_value(1)
_set_anchor_bottom_left(_ctrls.script_progress)

var test_prog_label = Label.new()
add_child(test_prog_label)
test_prog_label.set_pos(Vector2(100, log_label.get_pos().y + 15))
test_prog_label.set_text('Tests:')
_set_anchor_bottom_left(test_prog_label)

add_child(_ctrls.test_progress)
_ctrls.test_progress.set_size(Vector2(200, 10))
_ctrls.test_progress.set_pos(test_prog_label.get_pos() + Vector2(70, 0))
_ctrls.test_progress.set_min(0)
_ctrls.test_progress.set_max(1)
_ctrls.test_progress.set_unit_value(1)
_set_anchor_bottom_left(_ctrls.test_progress)

add_child(_ctrls.scripts_drop_down)
_ctrls.scripts_drop_down.set_size(Vector2(375, 25))
Expand All @@ -267,27 +273,31 @@ func setup_controls():
_ctrls.previous_button.set_pos(pos)
_ctrls.previous_button.set_text("<")
_ctrls.previous_button.connect("pressed", self, '_on_previous_button_pressed')
_set_anchor_bottom_left(_ctrls.previous_button)

add_child(_ctrls.stop_button)
_ctrls.stop_button.set_size(Vector2(50, 25))
pos.x += 60
_ctrls.stop_button.set_pos(pos)
_ctrls.stop_button.set_text('stop')
_ctrls.stop_button.connect("pressed", self, '_on_stop_button_pressed')
_set_anchor_bottom_left(_ctrls.stop_button)

add_child(_ctrls.run_button)
_ctrls.run_button.set_text("run")
_ctrls.run_button.set_size(Vector2(50, 25))
pos.x += 60
_ctrls.run_button.set_pos(pos)
_ctrls.run_button.connect("pressed", self, "_on_run_button_pressed")
_set_anchor_bottom_left(_ctrls.run_button)

add_child(_ctrls.next_button)
_ctrls.next_button.set_size(Vector2(50, 25))
pos.x += 60
_ctrls.next_button.set_pos(pos)
_ctrls.next_button.set_text(">")
_ctrls.next_button.connect("pressed", self, '_on_next_button_pressed')
_set_anchor_bottom_left(_ctrls.next_button)

#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
Expand Down

0 comments on commit e7e1c9e

Please sign in to comment.