Toasts

An asset by ra45
The page banner background of a mountain and forest
Toasts thumbnail image
Toasts thumbnail image
Toasts thumbnail image
Toasts hero image

Quick Information

0 ratings
Toasts icon image
ra45
Toasts

A plugin that allows you to make Android like toast on all platforms

Supported Engine Version
3.2
Version String
0.2
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Godot Toasts

A plugin that allows you to make Android like toast on all platforms

Enable the plugin

Add the addons folder in you project like your would with any other plugin. Go to project settings -> plugins and activate the plugin.

Using the plugin

Wherever you want to use just paste this:

var toast = Toast.new("Toast text", Toast.LENGHT_SHORT)
get_node("/root").add_child(toast)
toast.show()

It is best to make the TOAST a child of the root node so that there are no overlapping problems.
The toast will delete itself after it finished.
There is no purpose to add the Toast from the editor.

Toast

Inherits: Control < CanvasItem < Node < Object

Methods

Toast new(text: String, lenght: ToastLenght, mstyle: ToastStyle = preload( "style_resource/default.tres") )
void show()

Properties

Resource style

Enumerations

enum ToastLenght:
LENGHT_SHORT: the toast will last for 1.5 seconds, including the fading
LENGHT_LONG: the toast will last for 3 seconds, including the fading

Signals

  • done()
    Emitted when the toast has terminated its job and is preparing for deleteing itself.

Property Descriptions

  • Resource style
    Controls the toast aspect. The value is declared as a Resource, even if there is a custom resource because of a Godot limitation. Will be changed in Godot 4.0.(see this)

Methods Descriptions

  • Toast new(text: String, lenght: ToastLenght)
    Returns a new Toast. The text is the text that will be shown inside of the toast. lenght represents the duration lenght. mstyle represents the toast syle stored in style(see propriety descriptions).
  • void show()
    Starts the toast.

ToastStyle

Inherits: Reference < Object

A resource that controls the toast aspect. You can create one in the inspector panel and save it as tres or res. Recomandation: If you select Full Type make corner radius 0;

A plugin that allows you to make Android like toast on all platforms

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Toasts icon image
ra45
Toasts

A plugin that allows you to make Android like toast on all platforms

Supported Engine Version
3.2
Version String
0.2
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers