Michsky – Docs Michsky – Docs
  • Home
  • Documentation
    • DreamOS
    • Modern UI Pack
    • Motion Titles Pack
    • Dark UI
    • Loading Screen Studio
  • Contact
Michsky – Docs Michsky – Docs
Michsky – Docs
  • Home
  • Documentation
    • DreamOS
    • Modern UI Pack
    • Motion Titles Pack
    • Dark UI
    • Loading Screen Studio
  • Contact

Modern UI Pack

  • Quick Start
  • UI Elements
    • Button
    • Charts
    • Context Menu
    • Dropdown
    • Horizontal Selector
    • List View
    • Modal Window
    • Movable Window
    • Notification
    • Progress Bar
    • Slider
    • Switch
    • Tooltip
    • Window Manager
    • Other Elements
  • UI Manager
  • Examples
  1. Home
  2. Docs
  3. Modern UI Pack
  4. UI Elements
  5. Switch
Updated on February 17, 2022

Modern UI Pack

  • Quick Start
  • UI Elements
    • Button
    • Charts
    • Context Menu
    • Dropdown
    • Horizontal Selector
    • List View
    • Modal Window
    • Movable Window
    • Notification
    • Progress Bar
    • Slider
    • Switch
    • Tooltip
    • Window Manager
    • Other Elements
  • UI Manager
  • Examples

Switch

Author: admin 124 views

Basically, think of this thing as a different kind of toggle.

Saving

You can save the last selected value by checking the ‘Save Value’ box. Note that every switch should has its own unique ‘Switch Tag’ value in order to save correctly.

Properties

Property Type Function

invokeAtStart

bool

Process switch events at start when enabled.

isOn

bool

Returns/sets the current switch state.

Scripting

				
					using Michsky.UI.ModernUIPack; // namespace

public SwitchManager mySwitch;

void YourFunction()
{
   mySwitch.isOn = true; // Changing switch state manually
   mySwitch.UpdateUI(); // Updating UI after changing the state
   mySwitch.AnimateSwitch(); // Changing switch state automatically - no updating required
}				
			

How can we help?

A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.

Content

© 2022 Michsky