mirror of
https://github.com/BeamMP/Docs.git
synced 2025-08-16 16:35:51 +00:00
add picture examples to guihooks snippets
This commit is contained in:
parent
2aa20e0d53
commit
5d356706f8
@ -84,13 +84,21 @@ Here is a custom marker example from [BeamNG-FuelStations](https://github.com/Be
|
||||
```
|
||||
|
||||
### guihooks examples
|
||||
#### Toast Notifications, Top right of screen
|
||||

|
||||
|
||||
```lua
|
||||
--guihooks.trigger('toastrMsg', {type, title, msg, config = {timeOut}})
|
||||
guihooks.trigger('toastrMsg', {type = "info", title = "Info Message:", msg = "Info Message Text Here", config = {timeOut = 5000}})
|
||||
guihooks.trigger('toastrMsg', {type = "warning", title = "Warning Message:", msg = "Warning Message Text Here", config = {timeOut = 5000}})
|
||||
guihooks.trigger('toastrMsg', {type = "error", title = "Error Message:", msg = "Error Message Text Here", config = {timeOut = 5000}})
|
||||
```
|
||||
|
||||
--guihooks.trigger('Message', {msg, ttl, category, icon})
|
||||
#### Message notifications, top left of screen by default in Messages app
|
||||

|
||||
|
||||
```lua
|
||||
--guihooks.trigger('Message', {msg, ttl, category, icon}) --requires Messages app
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "arrow_upward", icon = "arrow_upward"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "arrow_downward", icon = "arrow_downward"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "flag", icon = "flag"})
|
||||
@ -103,7 +111,12 @@ guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "s
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "timeline", icon = "timeline"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "save", icon = "save"})
|
||||
guihooks.trigger('Message', {msg = "Message Text Here", ttl = 5.0, category = "settings", icon = "settings"})
|
||||
```
|
||||
#### Center large or small display flash
|
||||

|
||||

|
||||
|
||||
```lua
|
||||
--guihooks.trigger('ScenarioFlashMessage', {{msg, ttl, sound, big}} ) -- requires RaceCountdown ui app
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Message", 5.0, 0, true}} )
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Message Text Here", 5.0, 0, false}} )
|
||||
@ -116,7 +129,11 @@ guihooks.trigger('ScenarioFlashMessage', {{"GO!", 3.0, "Engine.Audio.playOnce('A
|
||||
|
||||
--another sound example
|
||||
guihooks.trigger('ScenarioFlashMessage', {{"Teleported!", 3.0, "Engine.Audio.playOnce('AudioGui', 'event:UI_Checkpoint')", false}})
|
||||
```
|
||||
|
||||
#### Center mid-size persistent display
|
||||

|
||||
```lua
|
||||
--guihooks.trigger('ScenarioRealtimeDisplay', {msg = msg} ) -- requires Race Realtime Display ui app
|
||||
guihooks.trigger('ScenarioRealtimeDisplay', {msg = "Message Text Here"} )
|
||||
--these messages persist, clear with a blank string
|
||||
|
Loading…
x
Reference in New Issue
Block a user