Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
WidgetSideMenu.cs
Go to the documentation of this file.
1using UnityEngine;
2
3public class WidgetSideMenu : Widget
4{
5 public enum Mode
6 {
7 Stock,
8 Mob,
9 Exp
10 }
11
12 public Mode mode;
13
14 public GameObject goMob;
15
16 public GameObject goExp;
17
18 public override void OnActivate()
19 {
20 ChangeMode(0);
21 }
22
23 public void ChangeMode(int i)
24 {
25 ChangeMode(i.ToEnum<Mode>());
26 }
27
28 public void ChangeMode(Mode m)
29 {
30 mode = m;
31 goMob.SetActive(mode == Mode.Mob);
32 goExp.SetActive(mode == Mode.Exp);
33 }
34
35 public override void OnSetContextMenu(UIContextMenu m)
36 {
37 m.AddChild("style").AddSlider("toggleButtonBG", (float a) => a.ToString() ?? "", base.config.skin.button, delegate(float a)
38 {
39 base.config.skin.button = (int)a;
40 ApplySkin();
41 }, 0f, base.config.skin.Skin.buttons.Count - 1, isInt: true);
43 }
44}
UIContextMenuItem AddSlider(string text, Func< float, string > textFunc, float value, Action< float > action, float min=0f, float max=1f, bool isInt=false, bool hideOther=true, bool useInput=false)
UIContextMenu AddChild(string idLang, TextAnchor anchor)
override void OnSetContextMenu(UIContextMenu m)
void ChangeMode(int i)
override void OnActivate()
void ChangeMode(Mode m)
GameObject goExp
GameObject goMob
Definition: Widget.cs:7
virtual void ApplySkin()
Definition: Widget.cs:556
void SetBaseContextMenu(UIContextMenu m)
Definition: Widget.cs:608