ZubcovToast
This is an Android Toast plugin for Godot Engine (https://github.com/okamstudio/godot) 3.2 or higher.
How to use
- Configure, install and enable the "Android Custom Template" for your project, just follow the official documentation;
- download or clone this repository;
- drop the
ZubcovToast-plugin
directory (from this repository) inside theres://android/
directory on your Godot project. - on the Project Settings -> Android -> Modules, add the string:
org/godotengine/godot/ZubcovToast
API Reference
The following methods are available:
# Show Toast
# @param String message
# @param bool max (if true = LONG, else SHORT)
showToast(message, max)
Sample example
Example:
var Toast
onready var editText = get_node("TextEdit")
func _ready():
if(Engine.has_singleton("ZubcovToast")):
Toast = Engine.get_singleton("ZubcovToast")
pass
get_node("btn_show").connect("pressed", self, "showToast")
pass
#events
func showToast():
Toast.showToast(editText.text, true)
print(editText.text)
pass
adb logcat -s godot
References
Based on the works of:
License
MIT license