Using Toggle Buttons

Description

A toggle button retains the last state it received - either on, or off. There is an event registered to the button which calls a function to change and set the button’s state when it is pressed. Toggle buttons can have scripts attached to them which perform different actions depending on their state.

NOTE: In order to make using toggle buttons easier for the end-users, ensure that you set image and image other in the assigned style for the toggle button.

Implementation in Table Realms IDE

  • Inserting a Toggle Button with a click
  • Adding a style to the toggle button
  • Checking that it works

NOTE: The following images/gifs/videos need to be included in this section

  • Scripts, event triggers, etc?

Implementation on Different Game Development Engines

Unity

    TableRealmsModel.instance.GetData<bool>(GetDeviceID() + ".Toggle.TButton.Value");

Unity Tiny

    TableRealmsTiny.Model.GetData(TableRealmsTiny.P2PManager.GetMyInstance() + ".Toggle.TButton.Value");

PlayCanvas

TODO:

Construct2/3

TODO: