diff --git a/Export/android/app/src/main/AndroidManifest.xml b/Export/android/app/src/main/AndroidManifest.xml index 66592d8e..fd020e00 100644 --- a/Export/android/app/src/main/AndroidManifest.xml +++ b/Export/android/app/src/main/AndroidManifest.xml @@ -2,7 +2,7 @@ diff --git a/Export/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/Export/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index bbd3e021..345888d2 100644 --- a/Export/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/Export/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,6 @@ - - + + + \ No newline at end of file diff --git a/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index b902d998..c0beb2f9 100644 Binary files a/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png b/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png new file mode 100644 index 00000000..6f4753d2 Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png differ diff --git a/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..88a262d4 Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png b/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..88a262d4 Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png differ diff --git a/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 3b12fec4..400200f0 100644 Binary files a/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png b/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png new file mode 100644 index 00000000..ca824730 Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png differ diff --git a/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..b44f38eb Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png b/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..b44f38eb Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png differ diff --git a/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 8fb3bec8..42a2648b 100644 Binary files a/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png b/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png new file mode 100644 index 00000000..36a0675b Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png differ diff --git a/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..d8bdc4b8 Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png b/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..d8bdc4b8 Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png differ diff --git a/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d7629050..19600a90 100644 Binary files a/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png b/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png new file mode 100644 index 00000000..9dc903ef Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png differ diff --git a/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..9f7cfb64 Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..9f7cfb64 Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png differ diff --git a/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index a680fb6b..c8ae2474 100644 Binary files a/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png b/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png new file mode 100644 index 00000000..7f5b4265 Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png differ diff --git a/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..852b6b4e Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..852b6b4e Binary files /dev/null and b/Export/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png differ diff --git a/src/Main.hx b/src/Main.hx index 88303fa9..12c2ac84 100644 --- a/src/Main.hx +++ b/src/Main.hx @@ -30,13 +30,13 @@ class Main extends hxd.App { hl.UI.closeConsole(); #end #if js - var zoomRatio = Util.isTouchDevice() ? js.Browser.window.screen.height * js.Browser.window.devicePixelRatio / 600 : js.Browser.window.devicePixelRatio; // js.Browser.window.devicePixelRatio; - s2d.scaleMode = Zoom(zoomRatio); - #end - #if android - var zoomRatio = Window.getInstance().height / 600; + var zoomRatio = Util.isTouchDevice() ? js.Browser.window.screen.height * js.Browser.window.devicePixelRatio / 768 : js.Browser.window.devicePixelRatio; // js.Browser.window.devicePixelRatio; s2d.scaleMode = Zoom(zoomRatio); #end + // #if android + // var zoomRatio = Window.getInstance().height / 768; + // s2d.scaleMode = Zoom(zoomRatio); + // #end #if android Window.getInstance().addEventTarget(ev -> { diff --git a/src/Settings.hx b/src/Settings.hx index c49f7d19..b3233af4 100644 --- a/src/Settings.hx +++ b/src/Settings.hx @@ -371,6 +371,7 @@ class Settings { #if hl Window.getInstance().resize(optionsSettings.screenWidth, optionsSettings.screenHeight); Window.getInstance().displayMode = optionsSettings.isFullScreen ? FullscreenResize : Windowed; + uiScale = 1 / Window.getInstance().windowToPixelRatio; #end #if js Window.getInstance().propagateKeyEvents = true; @@ -380,13 +381,13 @@ class Settings { var wnd = Window.getInstance(); var zoomRatio = 1.0; #if js - var zoomRatio = Util.isTouchDevice() ? js.Browser.window.screen.height * js.Browser.window.devicePixelRatio / 600 : js.Browser.window.devicePixelRatio; // 768 / js.Browser.window.innerHeight; // js.Browser.window.innerHeight * js.Browser.window.devicePixelRatio / 768; - Settings.zoomRatio = zoomRatio; - #end - #if android - var zoomRatio = Window.getInstance().height / 600; + var zoomRatio = Util.isTouchDevice() ? js.Browser.window.screen.height * js.Browser.window.devicePixelRatio / 768 : js.Browser.window.devicePixelRatio; // 768 / js.Browser.window.innerHeight; // js.Browser.window.innerHeight * js.Browser.window.devicePixelRatio / 768; Settings.zoomRatio = zoomRatio; #end + // #if android + // var zoomRatio = Window.getInstance().height / 768; + // Settings.zoomRatio = zoomRatio; + // #end #if hl Settings.optionsSettings.screenWidth = cast wnd.width; Settings.optionsSettings.screenHeight = cast wnd.height;