mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-15 21:32:35 +00:00
Added autofocus to edit dialogs first editline, added tab support for selecting next focusable element in edit dialogs, made valid? method be called in edit dialogs when fields change, simulator robot can now strafe side to side
This commit is contained in:
@@ -7,7 +7,10 @@ module TAC
|
||||
label "Name", width: 1.0, text_align: :center
|
||||
@name_error = label "Error", color: TAC::Palette::TACNET_CONNECTION_ERROR
|
||||
@name_error.hide
|
||||
@name = edit_line @options[:action] ? @options[:action].name : "", filter: method(:name_filter), width: 1.0
|
||||
@name = edit_line @options[:action] ? @options[:action].name : "", filter: method(:name_filter), width: 1.0, autofocus: true
|
||||
@name.subscribe(:changed) do |sender, value|
|
||||
valid?
|
||||
end
|
||||
|
||||
label "Comment", width: 1.0, text_align: :center
|
||||
@comment = edit_line @options[:action] ? @options[:action].comment : "", width: 1.0
|
||||
|
||||
@@ -8,7 +8,7 @@ module TAC
|
||||
label "Name", width: 1.0, text_align: :center
|
||||
@name_error = label "", color: TAC::Palette::TACNET_CONNECTION_ERROR
|
||||
@name_error.hide
|
||||
@name = edit_line @options[:renaming] ? @options[:renaming].name : "", filter: method(:name_filter), width: 1.0
|
||||
@name = edit_line @options[:renaming] ? @options[:renaming].name : "", filter: method(:name_filter), width: 1.0, autofocus: true
|
||||
|
||||
@name.subscribe(:changed) do |sender, value|
|
||||
valid?
|
||||
|
||||
@@ -9,7 +9,10 @@ module TAC
|
||||
label "Name", width: 1.0, text_align: :center
|
||||
@name_error = label "Error", color: TAC::Palette::TACNET_CONNECTION_ERROR
|
||||
@name_error.hide
|
||||
@name = edit_line @options[:variable] ? @options[:variable].name : "", filter: method(:name_filter), width: 1.0
|
||||
@name = edit_line @options[:variable] ? @options[:variable].name : "", filter: method(:name_filter), width: 1.0, autofocus: true
|
||||
@name.subscribe(:changed) do |sender, value|
|
||||
valid?
|
||||
end
|
||||
|
||||
label "Type", width: 1.0, text_align: :center
|
||||
@type_error = label "Error", color: TAC::Palette::TACNET_CONNECTION_ERROR
|
||||
@@ -24,6 +27,8 @@ module TAC
|
||||
@value.show
|
||||
@value_boolean.hide
|
||||
end
|
||||
|
||||
valid?
|
||||
end
|
||||
|
||||
@type ||= @var_type.value.to_sym
|
||||
@@ -35,6 +40,10 @@ module TAC
|
||||
@value = edit_line @options[:variable] ? @options[:variable].value : "", width: 1.0
|
||||
@value_boolean = check_box "Boolean", checked: @options[:variable] ? @options[:variable].value == "true" : false
|
||||
|
||||
@value.subscribe(:changed) do |sender, value|
|
||||
valid?
|
||||
end
|
||||
|
||||
unless @options[:variable] && @options[:variable].type == :boolean
|
||||
@value_boolean.hide
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user