mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-16 05:42:35 +00:00
Updated VariableDialog to use list_box instead of several buttons, make Variable store real type instead of mashing everything into value
This commit is contained in:
@@ -269,8 +269,9 @@ module TAC
|
||||
populate_variables_list(@active_action)
|
||||
end
|
||||
|
||||
def update_variable(variable, name, value)
|
||||
def update_variable(variable, name, type, value)
|
||||
variable.name = name
|
||||
variable.type = type
|
||||
variable.value = value
|
||||
|
||||
window.backend.config_changed!
|
||||
@@ -354,7 +355,7 @@ module TAC
|
||||
flow width: 1.0, **THEME_ITEM_CONTAINER_PADDING do
|
||||
background i.even? ? THEME_EVEN_COLOR : THEME_ODD_COLOR
|
||||
|
||||
button "#{variable.name} [Type: #{variable.raw_type}, Value: #{variable.raw_value}]", width: 0.925, tip: "Edit variable" do
|
||||
button "#{variable.name} [Type: #{variable.type}, Value: #{variable.value}]", width: 0.925, tip: "Edit variable" do
|
||||
push_state(Dialog::VariableDialog, title: "Edit Variable", variable: variable, callback_method: method(:update_variable))
|
||||
end
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/trashcan.png"), image_width: THEME_ICON_SIZE, tip: "Delete variable", **THEME_DANGER_BUTTON do
|
||||
|
||||
Reference in New Issue
Block a user