Skip to content

Commit 328bd92

Browse files
authored
Implement HSL (#1633)
1 parent 652520f commit 328bd92

File tree

15 files changed

+237
-164
lines changed

15 files changed

+237
-164
lines changed

assets/logos/icon.icns

577 Bytes
Binary file not shown.

assets/logos/icon.ico

0 Bytes
Binary file not shown.

assets/logos/icon.png

-7 Bytes
Loading

assets/logos/icon.svg

Lines changed: 1 addition & 1 deletion
Loading

assets/logos/splash.png

14 Bytes
Loading

no_export/source_assets/splash.svg

Lines changed: 1 addition & 1 deletion
Loading

src/autoload/HandlerGUI.gd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ func _input(event: InputEvent) -> void:
385385
focus_owner.grab_focus()
386386
else:
387387
gather_focus(focus_owner, false).grab_focus()
388+
elif ShortcutUtils.is_action_pressed(event, "ui_accept", true):
389+
if not focus_owner.has_focus(true):
390+
get_viewport().set_input_as_handled()
388391

389392
func gather_focus(control: Control, is_next: bool) -> Control:
390393
var new_focus := _gather_focus_internal(control, is_next)

src/config_classes/SaveData.gd

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func validate() -> void:
209209
if _active_tab_index >= _tabs.size() or _active_tab_index < 0:
210210
_active_tab_index = _active_tab_index # Run the setter.
211211
if not color_picker_current_model in color_picker_active_models:
212-
color_picker_current_model = color_picker_active_models[0]
212+
color_picker_current_model = color_picker_current_model # Run the setter.
213213

214214
# End of the method, would need to be rewritten if more things need validation.
215215
for location in [LayoutLocation.TOP_LEFT, LayoutLocation.BOTTOM_LEFT]:
@@ -635,6 +635,28 @@ const MAX_ACTIVE_COLOR_MODELS = 3
635635
color_picker_current_model = color_picker_active_models[0]
636636
emit_changed()
637637

638+
func set_color_picker_active_model(index: int, new_model: ColorPickerUtils.ColorModel) -> void:
639+
var new_active_models := color_picker_active_models.duplicate()
640+
new_active_models[index] = new_model
641+
color_picker_active_models = new_active_models
642+
643+
func remove_color_picker_active_model(index: int) -> void:
644+
var new_active_models := color_picker_active_models.duplicate()
645+
new_active_models.remove_at(index)
646+
color_picker_active_models = new_active_models
647+
648+
func add_color_picker_active_model(new_model: ColorPickerUtils.ColorModel) -> void:
649+
var new_active_models := color_picker_active_models.duplicate()
650+
new_active_models.append(new_model)
651+
color_picker_active_models = new_active_models
652+
653+
func move_color_picker_active_model(index: int, new_index: int) -> void:
654+
var new_active_models = color_picker_active_models.duplicate()
655+
var temp: ColorPickerUtils.ColorModel = new_active_models[index]
656+
new_active_models[index] = new_active_models[new_index]
657+
new_active_models[new_index] = temp
658+
color_picker_active_models = new_active_models
659+
638660
@export var color_picker_current_model := ColorPickerUtils.ColorModel.RGB:
639661
set(new_value):
640662
# Validation

0 commit comments

Comments
 (0)