1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Moved Rotate Image selection up, fixed some warnings

And minor UI changes, like changing default cursor shape to pointing hand when hovering on some UI elements in RotateImage.tscn
This commit is contained in:
OverloadedOrama 2020-02-04 18:29:34 +02:00
parent c4229e1759
commit 155b77b514
5 changed files with 48 additions and 53 deletions

View file

@ -1402,18 +1402,17 @@ columns = 5
[node name="SplashDialog" parent="." instance=ExtResource( 43 )]
[node name="CreateNewImage" parent="." instance=ExtResource( 44 )]
window_title = "Confirmá, por favor..."
[node name="OpenSprite" type="FileDialog" parent="."]
margin_right = 515.0
margin_bottom = 348.0
window_title = "Abrir un Archivo"
window_title = "Open a File"
resizable = true
mode = 0
access = 2
filters = PoolStringArray( "*.pxo ; Pixelorama Project" )
current_dir = "/home/azagaya/Documentos/VJ/Pixelorama"
current_path = "/home/azagaya/Documentos/VJ/Pixelorama/"
current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama"
current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/"
[node name="SaveSprite" type="FileDialog" parent="."]
anchor_left = 0.5
@ -1428,32 +1427,29 @@ window_title = "Save Sprite as .pxo"
resizable = true
access = 2
filters = PoolStringArray( "*.pxo ; Pixelorama Project" )
current_dir = "/home/azagaya/Documentos/VJ/Pixelorama"
current_path = "/home/azagaya/Documentos/VJ/Pixelorama/"
current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama"
current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/"
[node name="ImportSprites" parent="." instance=ExtResource( 45 )]
window_title = "Abrir Archivo(s)"
current_dir = "/home/azagaya/Documentos/VJ/Pixelorama"
current_path = "/home/azagaya/Documentos/VJ/Pixelorama/"
[node name="ExportSprites" parent="." instance=ExtResource( 46 )]
current_dir = "/home/azagaya/Documentos/VJ/Pixelorama"
current_path = "/home/azagaya/Documentos/VJ/Pixelorama/"
[node name="ScaleImage" parent="." instance=ExtResource( 47 )]
resizable = true
[node name="PreferencesDialog" parent="." instance=ExtResource( 48 )]
[node name="RotateImage" parent="." instance=ExtResource( 54 )]
[node name="OutlineDialog" parent="." instance=ExtResource( 49 )]
visible = false
window_title = "Confirmá, por favor..."
resizable = true
[node name="AboutDialog" parent="." instance=ExtResource( 50 )]
[node name="QuitDialog" type="ConfirmationDialog" parent="."]
margin_right = 200.0
margin_bottom = 70.0
window_title = "Confirmá, por favor..."
resizable = true
dialog_text = "QUIT_LABEL"
@ -1469,19 +1465,15 @@ visible = false
[node name="NewPaletteDialog" parent="." instance=ExtResource( 52 )]
[node name="PaletteImportFileDialog" parent="." instance=ExtResource( 53 )]
window_title = "Abrir un Archivo"
filters = PoolStringArray( "*.json ; JavaScript Object Notation", "*.gpl ; Gimp Palette Library" )
current_dir = "/home/azagaya/Documentos/VJ/Pixelorama"
current_path = "/home/azagaya/Documentos/VJ/Pixelorama/"
current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama"
current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/"
[node name="LeftCursor" type="Sprite" parent="."]
visible = false
[node name="RightCursor" type="Sprite" parent="."]
visible = false
[node name="RotateImage" parent="." instance=ExtResource( 54 )]
visible = false
[connection signal="pressed" from="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/ColorButtonsVertical/ColorSwitchCenter/ColorSwitch" to="." method="_on_ColorSwitch_pressed"]
[connection signal="color_changed" from="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/ColorButtonsVertical/ColorPickersCenter/ColorPickersHorizontal/LeftColorPickerButton" to="." method="_on_LeftColorPickerButton_color_changed"]
[connection signal="popup_closed" from="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/ColorButtonsVertical/ColorPickersCenter/ColorPickersHorizontal/LeftColorPickerButton" to="." method="_can_draw_true"]

View file

@ -18,12 +18,12 @@ func set_sprite(sprite : Image):
$VBoxContainer/TextureRect.texture = texture
func _on_HSlider_value_changed(value):
func _on_HSlider_value_changed(_value):
rotate()
$VBoxContainer/HBoxContainer/SpinBox.value = $VBoxContainer/HBoxContainer/HSlider.value
func _on_SpinBox_value_changed(value):
func _on_SpinBox_value_changed(_value):
$VBoxContainer/HBoxContainer/HSlider.value = $VBoxContainer/HBoxContainer/SpinBox.value
@ -48,7 +48,7 @@ func rotate():
texture.create_from_image(sprite, 0)
func _on_OptionButton_item_selected(id):
func _on_OptionButton_item_selected(_id):
rotate()

View file

@ -5,7 +5,7 @@
[node name="RotateImage" type="ConfirmationDialog"]
margin_right = 245.0
margin_bottom = 241.0
window_title = "Confirmá, por favor..."
resizable = true
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
@ -44,6 +44,7 @@ text = "Type:"
margin_left = 38.0
margin_right = 229.0
margin_bottom = 20.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
size_flags_vertical = 3
@ -62,6 +63,7 @@ text = "Angle: "
margin_left = 48.0
margin_right = 151.0
margin_bottom = 24.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
size_flags_vertical = 3
max_value = 359.0
@ -73,6 +75,7 @@ __meta__ = {
margin_left = 155.0
margin_right = 229.0
margin_bottom = 24.0
mouse_default_cursor_shape = 2
max_value = 359.0
[connection signal="about_to_show" from="." to="." method="_on_RotateImage_about_to_show"]
[connection signal="confirmed" from="." to="." method="_on_RotateImage_confirmed"]

View file

@ -67,10 +67,10 @@ func _ready() -> void:
"Crop Image" : 0,
"Flip Horizontal" : KEY_MASK_SHIFT + KEY_H,
"Flip Vertical" : KEY_MASK_SHIFT + KEY_V,
"Rotate Image" : 0,
"Invert colors" : 0,
"Desaturation" : 0,
"Outline" : 0,
"Rotate Image" : 0
"Outline" : 0
}
var help_menu_items := {
"View Splash Screen" : 0,
@ -121,7 +121,7 @@ func _ready() -> void:
i = 0
for item in image_menu_items.keys():
image_menu.add_item(item, i, image_menu_items[item])
if i == 3:
if i == 4:
image_menu.add_separator()
i += 1
i = 0
@ -323,7 +323,11 @@ func image_menu_id_pressed(id : int) -> void:
canvas.layers[canvas.current_layer_index][0].flip_y()
canvas.layers[canvas.current_layer_index][0].lock()
canvas.handle_redo("Draw")
4: # Invert Colors
4: # Rotate
var image : Image = Global.canvas.layers[Global.canvas.current_layer_index][0]
$RotateImage.set_sprite(image)
$RotateImage.popup_centered()
5: # Invert Colors
var image : Image = Global.canvas.layers[Global.canvas.current_layer_index][0]
Global.canvas.handle_undo("Draw")
for xx in image.get_size().x:
@ -333,7 +337,7 @@ func image_menu_id_pressed(id : int) -> void:
continue
image.set_pixel(xx, yy, px_color)
Global.canvas.handle_redo("Draw")
5: # Desaturation
6: # Desaturation
var image : Image = Global.canvas.layers[Global.canvas.current_layer_index][0]
Global.canvas.handle_undo("Draw")
for xx in image.get_size().x:
@ -345,12 +349,8 @@ func image_menu_id_pressed(id : int) -> void:
px_color = Color(gray, gray, gray, px_color.a)
image.set_pixel(xx, yy, px_color)
Global.canvas.handle_redo("Draw")
6: # Outline
7: # Outline
$OutlineDialog.popup_centered()
7: # Rotate
var image : Image = Global.canvas.layers[Global.canvas.current_layer_index][0]
$RotateImage.set_sprite(image)
$RotateImage.popup_centered()
func help_menu_id_pressed(id : int) -> void:
match id: