Skip to content

Commit

Permalink
v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rares45 committed Dec 29, 2020
1 parent 082d4ef commit e4f0b77
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ Toast

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


Properties
----------

| Resource | style |
|----------|-------|

Enumerations
============
Expand All @@ -39,10 +46,22 @@ 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)](https://github.com/godotengine/godot/issues/6763#issuecomment-629650708)

Methods Descriptions
--------------------

* `Toast new(text: String, lenght: ToastLengh)`\
Returns a new Toast. The `text` is the text that will be shown inside of the toast. `lenght ` represents the duration lenght.
* `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;
2 changes: 1 addition & 1 deletion addons/toast/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="Toast"
description="A plugin that gives Android like toasts"
author="rares45"
version="0.1"
version="0.2"
script="toast_plugin.gd"

0 comments on commit e4f0b77

Please sign in to comment.