mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Minor changes that make Pixelorama work with Android
Just planting the seeds of a possible Android version, probably tablet-only, at least at first. I do not know when that will happen yet.
This commit is contained in:
parent
306d74a38b
commit
721cab8765
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -14,8 +14,11 @@ mono_crash.*.json
|
|||
.directory
|
||||
*~
|
||||
|
||||
#Visual Studio Code ignores
|
||||
# Visual Studio Code ignores
|
||||
.vscode/
|
||||
|
||||
#macOS ignores
|
||||
# macOS ignores
|
||||
.DS_Store
|
||||
|
||||
# Android ignores
|
||||
android/
|
||||
|
|
|
@ -150,6 +150,7 @@ config/icon="res://assets/graphics/icons/icon.png"
|
|||
config/macos_native_icon="res://assets/graphics/icons/icon.icns"
|
||||
config/windows_native_icon="res://assets/graphics/icons/icon.ico"
|
||||
config/Version="v0.9-stable"
|
||||
run/low_processor_mode.Android=false
|
||||
|
||||
[audio]
|
||||
|
||||
|
@ -181,6 +182,8 @@ window/per_pixel_transparency/allowed.HTML5=false
|
|||
window/per_pixel_transparency/enabled.HTML5=false
|
||||
window/per_pixel_transparency/allowed.OSX=false
|
||||
window/per_pixel_transparency/enabled.OSX=false
|
||||
window/per_pixel_transparency/allowed.Android=false
|
||||
window/per_pixel_transparency/enabled.Android=false
|
||||
|
||||
[gui]
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ onready var canvas_preview_container := $MenuAndUI/UI/RightPanel/MarginContainer
|
|||
onready var tool_panel := $MenuAndUI/UI/ToolsAndCanvas/ToolPanel
|
||||
onready var scroll_container := $MenuAndUI/UI/RightPanel/MarginContainer/PreviewAndPalettes/ToolAndPaletteVSplit/ColorAndToolOptions/ScrollContainer
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
var alternate_transparent_background = ColorRect.new()
|
||||
|
@ -77,6 +78,9 @@ func _ready() -> void:
|
|||
OpenSave.handle_loading_files(OS.get_cmdline_args())
|
||||
get_tree().connect("files_dropped", self, "_on_files_dropped")
|
||||
|
||||
if OS.get_name() == "Android":
|
||||
OS.request_permissions()
|
||||
|
||||
|
||||
func handle_resize() -> void:
|
||||
var aspect_ratio = get_viewport_rect().size.x/(0.00001 if get_viewport_rect().size.y == 0 else get_viewport_rect().size.y)
|
||||
|
|
|
@ -168,6 +168,8 @@ func _input(event : InputEvent) -> void:
|
|||
else:
|
||||
zoom_camera(-1)
|
||||
elif event is InputEventPanGesture: # Pan Gesture on a Latop touchpad
|
||||
if OS.get_name() == "Android":
|
||||
return
|
||||
offset = offset + event.delta * zoom * 7 # for moving the canvas
|
||||
elif event is InputEventMouseMotion && drag:
|
||||
offset = offset - event.relative * zoom
|
||||
|
|
Loading…
Reference in a new issue