Even more Global left/right variables became arrays

ColorAndToolOptions has now the same code for left and right tool options, with more similar refactoring coming soon to places like Canvas and DrawingAlgos
This commit is contained in:
OverloadedOrama 2020-06-01 00:44:53 +03:00
parent 15ef00bf46
commit 9b4956b4f1
9 changed files with 141 additions and 213 deletions

View file

@ -1,9 +1,5 @@
extends AcceptDialog
onready var list : ItemList = $HSplitContainer/List
onready var right_side : VBoxContainer = $HSplitContainer/ScrollContainer/VBoxContainer
onready var general = $HSplitContainer/ScrollContainer/VBoxContainer/General
# Preferences table: [Prop name in Global, relative node path, value type]
var preferences = [
["open_last_project", "General/OpenLastProject", "pressed"],
@ -29,6 +25,11 @@ var preferences = [
["checker_color_2", "Canvas/CheckerOptions/CheckerColor2", "color"],
]
onready var list : ItemList = $HSplitContainer/List
onready var right_side : VBoxContainer = $HSplitContainer/ScrollContainer/VBoxContainer
onready var general = $HSplitContainer/ScrollContainer/VBoxContainer/General
func _ready() -> void:
# Replace OK with Close since preference changes are being applied immediately, not after OK confirmation
get_ok().text = tr("Close")