Irrelevant Pixel
  • Introduction / Foreword
  • ↘️Integrating Menu into your game
    • Add to your project
    • Maps and Modes
    • Your Game Instance
    • Play in your Level
    • Turn ON Enhanced Input
    • Mouse functionality
    • Integration completed
  • Getting to know how to use it
    • Creating Page for Options
    • Selector
    • Slider
    • Toggle
    • Keybinder
      • Duplicating Keys
    • Stylizing Interactive Widgets
    • Save your Options
    • End of the Basic Usage Manual
  • Advancing into Internal Structure
    • Core Concepts
    • Page-related things
    • Aspect Ratios + Resolutions
    • Graphics 'Overall Quality'
    • Deeper into (C)Stylizing
    • deleting Dev.Tool
Powered by GitBook
On this page
  1. Getting to know how to use it

Toggle

Modular Option Widget 3 of 4

Last updated 2 months ago

Now its time to get familiar with the widget that produces bool type - the Toggle.


This whole widget concept is so simple, so we will just cover a single important thing worth mention here. Take a look, i filled both Text fields with some particular words:

Despite the Texts for On and Off states being set, there is one issue that you can not afford to neglect. Look how this displayed in the game:

"Text Block"?! And style is incorrect as well, not what you expected it to be. You might already understand why it is happening, that is because there is no initial state was pre-selected. Since this(and WholeWord as well btw) widgets are Animation-Based, it has to be at least a single animation played in order for both of those widgets to get their correct appearance. And even more important, none was setting your Option Toggle to True, as you might think looking at the Toggle's state above, so your displayed value has a 50% chance to be what it actually is.

That's why it is mandatory to Toggle to State(or Event-free) on Pre-Construct or Construct:

memorize what texts for On/Off i specified
Page cover image