From 63254258d09e6c8527c4a7ab371f9f25bb2e7f3d Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 8 Jan 2020 02:16:48 +0200 Subject: [PATCH] Added a ScrollContainer for the palette buttons in EditPalettePopup --- Prefabs/EditPalettePopup.tscn | 8 +++++++- Scripts/Palette/EditPalettePopup.gd | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Prefabs/EditPalettePopup.tscn b/Prefabs/EditPalettePopup.tscn index 5eed442f4..692e6fbde 100644 --- a/Prefabs/EditPalettePopup.tscn +++ b/Prefabs/EditPalettePopup.tscn @@ -39,11 +39,17 @@ margin_right = 556.0 margin_bottom = 462.0 size_flags_horizontal = 3 -[node name="EditPaletteGridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer/Panel"] +[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/HBoxContainer/Panel"] anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 3 size_flags_vertical = 3 + +[node name="EditPaletteGridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer/Panel/ScrollContainer"] +margin_right = 262.0 +margin_bottom = 462.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 columns = 8 [node name="ColorButtons" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"] diff --git a/Scripts/Palette/EditPalettePopup.gd b/Scripts/Palette/EditPalettePopup.gd index 062fe44f4..5ce127315 100644 --- a/Scripts/Palette/EditPalettePopup.gd +++ b/Scripts/Palette/EditPalettePopup.gd @@ -1,7 +1,7 @@ extends WindowDialog onready var color_picker = $VBoxContainer/HBoxContainer/EditPaletteColorPicker -onready var palette_grid = $VBoxContainer/HBoxContainer/Panel/EditPaletteGridContainer +onready var palette_grid = $VBoxContainer/HBoxContainer/Panel/ScrollContainer/EditPaletteGridContainer onready var color_name_edit = $VBoxContainer/PaletteOptions/EditPaletteColorNameLineEdit onready var palette_name_edit = $VBoxContainer/PaletteOptions/EditPaletteNameLineEdit