mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Add a "Show Reference Images' option in the View menu
For easy and quick reference image toggling
This commit is contained in:
parent
e4b4225a0d
commit
9b1b0df123
|
@ -391,6 +391,10 @@ msgstr ""
|
|||
msgid "Show Mouse Guides"
|
||||
msgstr ""
|
||||
|
||||
#. Found under the View menu.
|
||||
msgid "Show Reference Images"
|
||||
msgstr ""
|
||||
|
||||
#. Found under the View menu. When enabled, non-destructive layer effects will be visible on the canvas.
|
||||
msgid "Display Layer Effects"
|
||||
msgstr ""
|
||||
|
|
|
@ -980,6 +980,10 @@ right_crop_tool={
|
|||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":true,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":86,"key_label":0,"unicode":118,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
show_reference_images={
|
||||
"deadzone": 0.5,
|
||||
"events": []
|
||||
}
|
||||
|
||||
[input_devices]
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ enum ViewMenu {
|
|||
SHOW_RULERS,
|
||||
SHOW_GUIDES,
|
||||
SHOW_MOUSE_GUIDES,
|
||||
SHOW_REFERENCE_IMAGES,
|
||||
DISPLAY_LAYER_EFFECTS,
|
||||
SNAP_TO,
|
||||
}
|
||||
|
@ -579,6 +580,11 @@ var show_pixel_indices := false:
|
|||
show_pixel_indices = value
|
||||
if is_instance_valid(canvas.color_index):
|
||||
canvas.color_index.enabled = value
|
||||
var show_reference_images := true:
|
||||
set(value):
|
||||
show_reference_images = value
|
||||
if is_instance_valid(canvas.reference_image_container):
|
||||
canvas.reference_image_container.visible = show_reference_images
|
||||
var display_layer_effects := true:
|
||||
set(value):
|
||||
if value == display_layer_effects:
|
||||
|
@ -835,6 +841,7 @@ func _initialize_keychain() -> void:
|
|||
&"show_pixel_grid": Keychain.InputAction.new("", "View menu", true),
|
||||
&"show_guides": Keychain.InputAction.new("", "View menu", true),
|
||||
&"show_rulers": Keychain.InputAction.new("", "View menu", true),
|
||||
&"show_reference_images": Keychain.InputAction.new("", "View menu", true),
|
||||
&"display_layer_effects": Keychain.InputAction.new("", "View menu", true),
|
||||
&"moveable_panels": Keychain.InputAction.new("", "Window menu", true),
|
||||
&"zen_mode": Keychain.InputAction.new("", "Window menu", true),
|
||||
|
|
|
@ -242,6 +242,7 @@ func _setup_view_menu() -> void:
|
|||
"Show Rulers": "show_rulers",
|
||||
"Show Guides": "show_guides",
|
||||
"Show Mouse Guides": "",
|
||||
"Show Reference Images": "show_reference_images",
|
||||
"Display Layer Effects": &"display_layer_effects",
|
||||
"Snap To": "",
|
||||
}
|
||||
|
@ -259,6 +260,7 @@ func _setup_view_menu() -> void:
|
|||
_set_menu_shortcut(view_menu_items[item], view_menu, i, item, true)
|
||||
view_menu.set_item_checked(Global.ViewMenu.SHOW_RULERS, true)
|
||||
view_menu.set_item_checked(Global.ViewMenu.SHOW_GUIDES, true)
|
||||
view_menu.set_item_checked(Global.ViewMenu.SHOW_REFERENCE_IMAGES, true)
|
||||
view_menu.set_item_checked(Global.ViewMenu.DISPLAY_LAYER_EFFECTS, true)
|
||||
view_menu.hide_on_checkable_item_selection = false
|
||||
view_menu.id_pressed.connect(view_menu_id_pressed)
|
||||
|
@ -715,6 +717,11 @@ func view_menu_id_pressed(id: int) -> void:
|
|||
_toggle_show_guides()
|
||||
Global.ViewMenu.SHOW_MOUSE_GUIDES:
|
||||
_toggle_show_mouse_guides()
|
||||
Global.ViewMenu.SHOW_REFERENCE_IMAGES:
|
||||
Global.show_reference_images = not Global.show_reference_images
|
||||
view_menu.set_item_checked(
|
||||
Global.ViewMenu.SHOW_REFERENCE_IMAGES, Global.show_reference_images
|
||||
)
|
||||
Global.ViewMenu.SHOW_PIXEL_INDICES:
|
||||
_toggle_show_pixel_indices()
|
||||
Global.ViewMenu.DISPLAY_LAYER_EFFECTS:
|
||||
|
|
Loading…
Reference in a new issue