more mobile tweaks and update package batch file

So now it signs the apk
This commit is contained in:
Gordon Pedersen 2023-05-08 17:03:13 +10:00
parent f2d17d830b
commit ff5765f70f
4 changed files with 22 additions and 13 deletions

View file

@ -31,21 +31,14 @@ class GameplayScene < SceneInstance
end
def tick_pause_button(args)
pause_button = {
x: 72.from_right,
y: 72.from_top,
w: 52,
h: 52,
path: Sprite.for(:pause)
}
pause_rect = pause_button.dup
rect = { x: 72.from_right, y: 72.from_top, w: 52, h: 52 }
Sprite.for(:pause).render(args, rect)
pause_rect = rect.dup
pause_padding = 12
pause_rect.x -= pause_padding
pause_rect.y -= pause_padding
pause_rect.w += pause_padding * 2
pause_rect.h += pause_padding * 2
return pause(args) if args.inputs.mouse.down && args.inputs.mouse.inside_rect?(pause_rect)
args.outputs.sprites << pause_button
end
end

View file

@ -17,7 +17,7 @@ class MenuScene < SceneInstance
current_option_i: 0,
hold_delay: 0
}
@spacer ||= mobile? ? 100 : 80
@spacer ||= 80
@menu_options ||= menu_options
@menu_y = opts.menu_y._?(440)
@title ||= title
@ -72,7 +72,7 @@ class MenuScene < SceneInstance
end
button_border = { w: 340, h: 80, x: l.x - 170, y: l.y - 55 }.merge(WHITE)
(args.outputs.borders << button_border) if mobile?
# (args.outputs.borders << button_border) if mobile?
if args.inputs.mouse.up && args.inputs.mouse.inside_rect?(button_border)
o = @menu_options.find { |o| o[:key] == l[:key] }
Sound.play(args, :menu)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 186 KiB

View file

@ -6,3 +6,19 @@ for %%I in (.) do set CurrDirName=%%~nxI
cd ..
@echo on
dragonruby-publish --only-package %CurrDirName%
@echo off
cd builds
if not exist ./%CurrDirName%.keystore (
echo "no keystore, generating keys"
keytool -genkey -v -keystore %CurrDirName%.keystore -alias %CurrDirName% -keyalg RSA -keysize 2048 -validity 10000
)
if exist ./%CurrDirName%-android.apk (
echo "Signing apk..."
call "C:\Program Files (x86)\Android\android-sdk\build-tools\32.0.0\apksigner.bat" sign -ks %CurrDirName%.keystore %CurrDirName%-android.apk
) else (
ECHO "no apk?"
ECHO ./%CurrDirName%-android.apk
)
ECHO "All done!"
explorer.exe %cd%
PAUSE