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

Remove custom brushes with the middle mouse button

And made the "X" button on the custom brushes a little smaller. Partially addresses #132
This commit is contained in:
OverloadedOrama 2020-01-28 00:19:55 +02:00
parent 2f48547f6c
commit 14900ed5ab
6 changed files with 25 additions and 12 deletions

View file

@ -9,10 +9,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Crowdin integration for contributing translations!
- Spanish translation - thanks to azagaya!
- Translators can now be seen in the About window.
- It is now possible to remove custom brushes with the middle mouse button.
## Changed
- Updates to the Greek, Russian and Traditional Chinese translations.
- Replaced some OS alerts with a custom made error dialog.
- Made the "X" button on the custom brushes a little smaller.
### Fixed
- Delay the splash screen popup so it shows properly centered (thanks to YeldhamDev)

File diff suppressed because one or more lines are too long

View file

@ -6,6 +6,10 @@ export var custom_brush_index := -3
var random_brushes := []
func _on_BrushButton_pressed() -> void:
# Delete the brush on middle mouse press
if Input.is_action_just_released("middle_mouse"):
_on_DeleteButton_pressed()
return
# Change left brush
if Global.brush_type_window_position == "left":
Global.current_left_brush_type = brush_type

View file

@ -11,9 +11,9 @@ func _ready() -> void:
func _input(event : InputEvent) -> void:
var mouse_pos := viewport_container.get_local_mouse_position()
var viewport_size := viewport_container.rect_size
if event.is_action_pressed("camera_drag") || event.is_action_pressed("space"):
if event.is_action_pressed("middle_mouse") || event.is_action_pressed("space"):
drag = true
elif event.is_action_released("camera_drag") || event.is_action_released("space"):
elif event.is_action_released("middle_mouse") || event.is_action_released("space"):
drag = false
if Global.can_draw && Rect2(Vector2.ZERO, viewport_size).has_point(mouse_pos):

View file

@ -19,7 +19,7 @@ func _on_FrameButton_pressed() -> void:
popup_menu.set_item_disabled(3, false)
popup_menu.popup(Rect2(get_global_mouse_position(), Vector2.ONE))
pressed = !pressed
else: #Middle mouse click
else: # Middle mouse click
pressed = !pressed
if Global.canvases.size() > 1:
remove_frame()

View file

@ -45,13 +45,14 @@ _global_script_class_icons={
[application]
config/name="Pixelorama"
config/description="A free & open-source 2D sprite editor"
run/main_scene="res://Main.tscn"
run/low_processor_mode=true
boot_splash/image="res://splash.png"
boot_splash/bg_color=Color( 0.145098, 0.145098, 0.164706, 1 )
config/icon="res://icon.png"
config/description="A free & open-source 2D sprite editor"
config/Version="v0.6.1"
config/windows_native_icon="res://icon.ico"
config/Version="v0.6.2"
[autoload]
@ -103,7 +104,7 @@ zoom_out={
"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":5,"pressed":false,"doubleclick":false,"script":null)
]
}
camera_drag={
middle_mouse={
"deadzone": 0.5,
"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":3,"pressed":false,"doubleclick":false,"script":null)
]