The Mobile Stuff - PringleKitten/KitsModFolder GitHub Wiki
Due to the leave of mcagabe/homu who originally made this mobile port and removed all their guides and pages, this is my take on all the things I could find for changeable settings using lua and such.
Camera
"luaTpadCam" Useful for those who wanna try to hide or mess around with the pads.
General Control Functions
'mobileC', Controls.instance.mobileC
"extraButtonPressed", (button:String)
"extraButtonJustPressed", (button:String)
"extraButtonJustReleased", (button:String)
"extraButtonReleased", (button:String)
"vibrate", (?duration:Int, ?period:Int)
"addTouchPad", (DPadMode:String, ActionMode:String, ?addToCustomSubstate:Bool = false, ?posAtCustomSubstate:Int = -1)
"removeTouchPad", ()
"addTouchPadCamera", ()
"touchPadJustPressed", function(button:Dynamic):Bool
"touchPadPressed", function(button:Dynamic):Bool
"touchPadJustReleased", function(button:Dynamic):Bool
"touchPadReleased", function(button:Dynamic):Bool
"touchJustPressed", TouchUtil.justPressed)
"touchPressed", TouchUtil.pressed)
"touchJustReleased", TouchUtil.justReleased)
"touchReleased", TouchUtil.released)
"touchPressedObject", function(object:String, ?camera:String):Bool
"touchJustPressedObject", function(object:String, ?camera:String):Bool
"touchJustReleasedObject", function(object:String, ?camera:String):Bool
"touchReleasedObject", function(object:String, ?camera:String):Bool
"touchPressedObjectComplex", function(object:String, ?camera:String):Bool
"touchJustPressedObjectComplex", function(object:String, ?camera:String):Bool
"touchJustReleasedObjectComplex", function(object:String, ?camera:String):Bool
"touchReleasedObjectComplex", function(object:String, ?camera:String):Bool
"touchOverlapsObject", function(object:String, ?camera:String):Bool
"touchOverlapsObjectComplex", function(object:String, ?camera:String):Bool
'mobileControlsMode', getMobileControlsAsString())
public static function getMobileControlsAsString():String
{
switch (MobileData.mode)
{
case 0:
return 'left';
case 1:
return 'right';
case 2:
return 'custom';
case 3:
return 'hitbox';
default:
return 'none';
}
}
Super Android Functions
Not in-game / usable
Lua_helper.add_callback(lua, "isCharging", spicyPillow.isCharging())
Lua_helper.add_callback(lua, "isRooted", AndroidTools.isRooted())
Usable
"isDolbyAtmos", AndroidTools.isDolbyAtmos())
"isAndroidTV", AndroidTools.isAndroidTV())
"isTablet", AndroidTools.isTablet())
"isChromebook", AndroidTools.isChromebook())
"isDeXMode", AndroidTools.isDeXMode())
"backJustPressed", FlxG.android.justPressed.BACK)
"backPressed", FlxG.android.pressed.BACK)
"backJustReleased", FlxG.android.justReleased.BACK)
"menuJustPressed", FlxG.android.justPressed.MENU)
"menuPressed", FlxG.android.pressed.MENU)
"menuJustReleased", FlxG.android.justReleased.MENU)
"getCurrentOrientation", () -> PsychJNI.getCurrentOrientationAsString())
"minimizeWindow", () -> AndroidTools.minimizeWindow())
"isScreenKeyboardShown", () -> PsychJNI.isScreenKeyboardShown());
"clipboardHasText", () -> PsychJNI.clipboardHasText())
"clipboardGetText", () -> PsychJNI.clipboardGetText())
"manualBackButton", () -> PsychJNI.manualBackButton())
"clipboardSetText", function(?text:String):Void
{
if (text != null) return FunkinLua.luaTrace('clipboardSetText: No text specified.')
PsychJNI.clipboardSetText(text)
})
"setActivityTitle", function(text:String):Void
{
if (text != null) return FunkinLua.luaTrace('setActivityTitle: No text specified.');
PsychJNI.setActivityTitle(text);
})
"showToast", function(text:String, ?duration:Int, ?xOffset:Int, ?yOffset:Int) /* , ?gravity:Int*/
{
if (text == null) return FunkinLua.luaTrace('showToast: No text specified.');
else if (duration == null) return FunkinLua.luaTrace('showToast: No duration specified.');
if (xOffset == null) xOffset = 0;
if (yOffset == null) yOffset = 0;
AndroidToast.makeText(text, duration, -1, xOffset, yOffset);
}
"setOrientation", function(?hint:String):Void
{
switch (hint.toLowerCase())
{
case 'portrait':
hint = 'Portrait';
case 'portraitupsidedown' | 'upsidedownportrait' | 'upsidedown':
hint = 'PortraitUpsideDown';
case 'landscapeleft' | 'leftlandscape':
hint = 'LandscapeLeft';
case 'landscaperight' | 'rightlandscape' | 'landscape':
hint = 'LandscapeRight';
default:
hint = null;
}
if (hint == null) return FunkinLua.luaTrace('setOrientation: No orientation specified.');
PsychJNI.setOrientation(FlxG.stage.stageWidth, FlxG.stage.stageHeight, false, hint);
}