diff --git a/README.md b/README.md index 00fdcd612..51ed1c225 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ You can find Online Documentation for Pixelorama here: https://orama-interactive It's still work in progress so there are some pages missing. If you want to contribute, you can do so in [Pixelorama-Docs' GitHub Repository](https://github.com/Orama-Interactive/Pixelorama-Docs). ## Cloning Instructions -Pixelorama uses Godot 3.4, so you will need to have it in order to run the project. Older versions may not work. +Pixelorama uses Godot 3.5, so you will need to have it in order to run the project. Older versions may not work. As of right now, most of the code is written using GDScript, so the mono version of Godot is not required, but Pixelorama should also work with it. ## Current features: diff --git a/src/Autoload/ExtensionsAPI.gd b/src/Autoload/ExtensionsAPI.gd index cd8460693..86f1d1cf9 100644 --- a/src/Autoload/ExtensionsAPI.gd +++ b/src/Autoload/ExtensionsAPI.gd @@ -192,9 +192,23 @@ func add_theme(theme: Theme) -> void: themes.add_theme(theme) +func find_theme_index(theme: Theme) -> int: + var themes: BoxContainer = Global.preferences_dialog.find_node("Themes") + return themes.themes.find(theme) + + func get_theme() -> Theme: return Global.control.theme +func set_theme(idx: int) -> bool: + var themes: BoxContainer = Global.preferences_dialog.find_node("Themes") + if idx >= 0 and idx < themes.themes.size(): + themes.buttons_container.get_child(idx).emit_signal("pressed") + return true + else: + return false + + func remove_theme(theme: Theme) -> void: Global.preferences_dialog.themes.remove_theme(theme) diff --git a/src/Preferences/HandleThemes.gd b/src/Preferences/HandleThemes.gd index 1522e8a0b..54a224642 100644 --- a/src/Preferences/HandleThemes.gd +++ b/src/Preferences/HandleThemes.gd @@ -20,6 +20,7 @@ onready var theme_color_preview_scene = preload("res://src/Preferences/ThemeColo func _ready() -> void: for theme in themes: add_theme(theme) + yield(get_tree(), "idle_frame") var theme_id: int = Global.config_cache.get_value("preferences", "theme", 0) if theme_id >= themes.size(): diff --git a/src/UI/Dialogs/TileModeOffsetsDialog.tscn b/src/UI/Dialogs/TileModeOffsetsDialog.tscn index 62e2e07a5..8bd4b9793 100644 --- a/src/UI/Dialogs/TileModeOffsetsDialog.tscn +++ b/src/UI/Dialogs/TileModeOffsetsDialog.tscn @@ -8,7 +8,6 @@ blend_mode = 4 [node name="TileModeOffsetsDialog" type="ConfirmationDialog"] -visible = true margin_right = 301.0 margin_bottom = 422.0 rect_min_size = Vector2( 172, 422 )