mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-22 05:23:14 +00:00
Minor changes to the shrink option
This commit is contained in:
parent
279228daba
commit
bd10680f63
4 changed files with 6 additions and 6 deletions
|
@ -68,7 +68,7 @@ func setup_application_window_size() -> void:
|
||||||
OS.min_window_size = Vector2(1024, 576)
|
OS.min_window_size = Vector2(1024, 576)
|
||||||
|
|
||||||
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_DISABLED,
|
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_DISABLED,
|
||||||
SceneTree.STRETCH_ASPECT_IGNORE, Vector2(1014,576), Global.shrink)
|
SceneTree.STRETCH_ASPECT_IGNORE, Vector2(1024,576), Global.shrink)
|
||||||
|
|
||||||
# Restore the window position/size if values are present in the configuration cache
|
# Restore the window position/size if values are present in the configuration cache
|
||||||
if Global.config_cache.has_section_key("window", "screen"):
|
if Global.config_cache.has_section_key("window", "screen"):
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
[sub_resource type="ButtonGroup" id=1]
|
[sub_resource type="ButtonGroup" id=1]
|
||||||
|
|
||||||
[node name="PreferencesDialog" type="AcceptDialog"]
|
[node name="PreferencesDialog" type="AcceptDialog"]
|
||||||
visible = true
|
|
||||||
margin_left = -3.0
|
margin_left = -3.0
|
||||||
margin_top = 9.0
|
margin_top = 9.0
|
||||||
margin_right = 419.0
|
margin_right = 419.0
|
||||||
|
|
|
@ -50,10 +50,11 @@ func _input(event : InputEvent) -> void:
|
||||||
# elif not get_viewport_rect().has_point(event.position):
|
# elif not get_viewport_rect().has_point(event.position):
|
||||||
# return
|
# return
|
||||||
|
|
||||||
#current_pixel = get_local_mouse_position() + location
|
# Do not use self.get_local_mouse_position() because it return unexpected
|
||||||
|
# value when shrink parameter is not equal to one. At godot version 3.2.3
|
||||||
var tmp_transform = get_canvas_transform().affine_inverse()
|
var tmp_transform = get_canvas_transform().affine_inverse()
|
||||||
var tmp_position = Global.main_viewport.get_local_mouse_position()
|
var tmp_position = Global.main_viewport.get_local_mouse_position()
|
||||||
current_pixel = tmp_transform.basis_xform(tmp_position)+tmp_transform.origin
|
current_pixel = tmp_transform.basis_xform(tmp_position) + tmp_transform.origin + location
|
||||||
|
|
||||||
if Global.has_focus:
|
if Global.has_focus:
|
||||||
update()
|
update()
|
||||||
|
|
Loading…
Add table
Reference in a new issue