mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Add new palette updates 1
This commit is contained in:
parent
7fce473e76
commit
3191e3f8c8
|
@ -182,7 +182,7 @@ var move_up_layer_button : BaseButton
|
||||||
var move_down_layer_button : BaseButton
|
var move_down_layer_button : BaseButton
|
||||||
var merge_down_layer_button : BaseButton
|
var merge_down_layer_button : BaseButton
|
||||||
|
|
||||||
var add_palette_button : TextureButton
|
var add_palette_button : MenuButton
|
||||||
var remove_palette_button : TextureButton
|
var remove_palette_button : TextureButton
|
||||||
var palette_option_button : OptionButton
|
var palette_option_button : OptionButton
|
||||||
var edit_palette_button : BaseButton
|
var edit_palette_button : BaseButton
|
||||||
|
|
|
@ -101,6 +101,7 @@ func _ready() -> void:
|
||||||
var edit_menu : PopupMenu = Global.edit_menu.get_popup()
|
var edit_menu : PopupMenu = Global.edit_menu.get_popup()
|
||||||
view_menu = Global.view_menu.get_popup()
|
view_menu = Global.view_menu.get_popup()
|
||||||
var help_menu : PopupMenu = Global.help_menu.get_popup()
|
var help_menu : PopupMenu = Global.help_menu.get_popup()
|
||||||
|
var add_palette_menu : PopupMenu = Global.add_palette_button.get_popup()
|
||||||
|
|
||||||
var i = 0
|
var i = 0
|
||||||
for item in file_menu_items.keys():
|
for item in file_menu_items.keys():
|
||||||
|
@ -125,6 +126,7 @@ func _ready() -> void:
|
||||||
edit_menu.connect("id_pressed", self, "edit_menu_id_pressed")
|
edit_menu.connect("id_pressed", self, "edit_menu_id_pressed")
|
||||||
view_menu.connect("id_pressed", self, "view_menu_id_pressed")
|
view_menu.connect("id_pressed", self, "view_menu_id_pressed")
|
||||||
help_menu.connect("id_pressed", self, "help_menu_id_pressed")
|
help_menu.connect("id_pressed", self, "help_menu_id_pressed")
|
||||||
|
add_palette_menu.connect("id_pressed", self, "add_palette_menu_id_pressed")
|
||||||
|
|
||||||
var root = get_tree().get_root()
|
var root = get_tree().get_root()
|
||||||
#Node, left mouse shortcut, right mouse shortcut
|
#Node, left mouse shortcut, right mouse shortcut
|
||||||
|
@ -1066,7 +1068,14 @@ func _on_RemovePalette_pressed() -> void:
|
||||||
Global.palette_container.remove_current_palette()
|
Global.palette_container.remove_current_palette()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
func add_palette_menu_id_pressed(id) -> void:
|
||||||
|
match id:
|
||||||
|
0: # New Empty Palette
|
||||||
|
Global.palette_container.on_new_empty_palette()
|
||||||
|
1: # Import Palette
|
||||||
|
Global.palette_container.on_import_palette()
|
||||||
|
pass
|
||||||
|
|
||||||
func _on_NewPaletteDialog_confirmed() -> void:
|
func _on_NewPaletteDialog_confirmed() -> void:
|
||||||
Global.palette_container.on_new_palette_confirmed()
|
Global.palette_container.on_new_palette_confirmed()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,16 @@ func on_palette_select(palette_name : String) -> void:
|
||||||
current_palette = "Default"
|
current_palette = "Default"
|
||||||
_display_palette(Global.palettes["Default"])
|
_display_palette(Global.palettes["Default"])
|
||||||
|
|
||||||
|
func on_new_empty_palette() -> void:
|
||||||
|
Global.new_palette_dialog.window_title = "Create a new empty palette?"
|
||||||
|
Global.new_palette_name_line_edit.text = "Custom_Palette"
|
||||||
|
from_palette = {}
|
||||||
|
Global.new_palette_dialog.popup_centered()
|
||||||
|
pass
|
||||||
|
|
||||||
|
func on_import_palette() -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
func on_edit_palette() -> void:
|
func on_edit_palette() -> void:
|
||||||
var palette : Dictionary = Global.palettes[current_palette]
|
var palette : Dictionary = Global.palettes[current_palette]
|
||||||
|
|
||||||
|
@ -44,6 +54,7 @@ func on_edit_palette() -> void:
|
||||||
|
|
||||||
if create_new_palette:
|
if create_new_palette:
|
||||||
from_palette = Global.palettes[current_palette]
|
from_palette = Global.palettes[current_palette]
|
||||||
|
Global.new_palette_dialog.window_title = "Create a new custom palette from existing default?"
|
||||||
Global.new_palette_name_line_edit.text = "Custom_" + current_palette
|
Global.new_palette_name_line_edit.text = "Custom_" + current_palette
|
||||||
Global.new_palette_dialog.popup_centered()
|
Global.new_palette_dialog.popup_centered()
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -148,6 +148,17 @@ LineEdit/icons/clear = null
|
||||||
LineEdit/styles/focus = null
|
LineEdit/styles/focus = null
|
||||||
LineEdit/styles/normal = SubResource( 8 )
|
LineEdit/styles/normal = SubResource( 8 )
|
||||||
LineEdit/styles/read_only = null
|
LineEdit/styles/read_only = null
|
||||||
|
MenuButton/colors/font_color = Color( 0.878431, 0.878431, 0.878431, 1 )
|
||||||
|
MenuButton/colors/font_color_disabled = Color( 1, 1, 1, 0.3 )
|
||||||
|
MenuButton/colors/font_color_hover = Color( 0.941176, 0.941176, 0.941176, 1 )
|
||||||
|
MenuButton/colors/font_color_pressed = Color( 1, 1, 1, 1 )
|
||||||
|
MenuButton/constants/hseparation = 3
|
||||||
|
MenuButton/fonts/font = null
|
||||||
|
MenuButton/styles/disabled = null
|
||||||
|
MenuButton/styles/focus = null
|
||||||
|
MenuButton/styles/hover = null
|
||||||
|
MenuButton/styles/normal = null
|
||||||
|
MenuButton/styles/pressed = null
|
||||||
TabContainer/colors/font_color_bg = Color( 0.690196, 0.690196, 0.690196, 1 )
|
TabContainer/colors/font_color_bg = Color( 0.690196, 0.690196, 0.690196, 1 )
|
||||||
TabContainer/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
|
TabContainer/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 )
|
||||||
TabContainer/colors/font_color_fg = Color( 0.941176, 0.941176, 0.941176, 1 )
|
TabContainer/colors/font_color_fg = Color( 0.941176, 0.941176, 0.941176, 1 )
|
||||||
|
|
|
@ -33,11 +33,11 @@ _global_script_class_icons={
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Pixelorama"
|
config/name="Pixelorama"
|
||||||
config/description="A free & open-source 2D sprite editor"
|
|
||||||
run/main_scene="res://Main.tscn"
|
run/main_scene="res://Main.tscn"
|
||||||
boot_splash/image="res://splash.png"
|
boot_splash/image="res://splash.png"
|
||||||
boot_splash/bg_color=Color( 0.145098, 0.145098, 0.164706, 1 )
|
boot_splash/bg_color=Color( 0.145098, 0.145098, 0.164706, 1 )
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
config/description="A free & open-source 2D sprite editor"
|
||||||
config/Version="v0.5"
|
config/Version="v0.5"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
Loading…
Reference in a new issue