Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ContentConfigOther Class Reference
Inheritance diagram for ContentConfigOther:
ContentConfig EContent UIContent UINote

Public Member Functions

override void OnInstantiate ()
 
void OpenLog ()
 
void OoenConfigFolder ()
 
void OpenPackage ()
 
void OpenUser ()
 
void ResetWindows ()
 
void OpenBackerCodeInput ()
 
void OnClickDownloadWallpaper ()
 
void RefreshRewardCode ()
 
- Public Member Functions inherited from ContentConfig
void SetSlider (Slider slider, float value, Func< float, string > action)
 
- Public Member Functions inherited from UIContent
virtual void OnSwitchContent (int idTab)
 
virtual void OnInstantiate ()
 
- Public Member Functions inherited from UINote
void Clear ()
 
void Build ()
 
void Space (int sizeY=0, int sizeX=1)
 
UINote AddNote (string id)
 
UIItem AddHeader (string text, Sprite sprite=null)
 
UIItem AddHeaderCard (string text, Sprite sprite=null)
 
UIItem AddHeaderTopic (string text, Sprite sprite=null)
 
UIItem AddHeader (string id, string text, Sprite sprite=null)
 
UIItem AddText (string text, FontColor color=FontColor.DontChange)
 
UIItem AddText (string id, string text, FontColor color=FontColor.DontChange)
 
UIItem AddText (string id, string text, Color color)
 
UIItem AddItem (string id)
 
UIItem AddTopic (string id, string text, string value=null)
 
UIItem AddTopic (string text, string value=null)
 
void AddImage (Sprite sprite)
 
void AddImage (string idFile)
 
UIButton AddButton (string text, Action onClick)
 
UIButton AddButtonLink (string text, string url)
 
UIDropdown AddDropdown (string id="DropdownDefault")
 
UIButton AddToggle (string idLang="", bool isOn=false, Action< bool > action=null)
 
Transform AddPrefab (string path)
 
AddExtra< T > (string path)
 

Public Attributes

UIButton toggleSyncMod
 
UIButton toggleNoCensor
 
UIButton toggleRunBackground
 
UIButton toggleMuteBackground
 
UIButton toggleTest
 
UIButton toggleAltInv
 
UIButton toggleAltAbility
 
UIButton buttonBackerCode
 
UIButton toggleDisableMods
 
UIButton buttonWallPaper
 
UIDropdown ddSnap
 
UIDropdown ddDivider
 
Slider sliderMissClick
 
Slider sliderBGMInterval
 
UIText textBackerCode
 
- Public Attributes inherited from UINote
RectTransform target
 
UINoteProfile prof
 
SkinType skinType
 
string idDefaultText
 
LayoutGroup layout
 
RectTransform cur
 
bool extraRebuild
 

Additional Inherited Members

- Properties inherited from ContentConfig
CoreConfig config [get]
 

Detailed Description

Definition at line 7 of file ContentConfigOther.cs.

Member Function Documentation

◆ OnClickDownloadWallpaper()

void ContentConfigOther.OnClickDownloadWallpaper ( )
inline

Definition at line 154 of file ContentConfigOther.cs.

155 {
157 {
158 string text = StandaloneFileBrowser.SaveFilePanel("Export Wallpaper", CorePath.RootData, "wallpaper", "zip");
159 Debug.Log(text);
160 if (!string.IsNullOrEmpty(text))
161 {
162 try
163 {
164 TextAsset textAsset = Resources.Load("Etc/wallpaper") as TextAsset;
165 Debug.Log(textAsset);
166 File.WriteAllBytes(text, textAsset.bytes);
167 EClass.ui.Say("umimyaaThankyou");
168 SE.Play("godbless");
169 }
170 catch (Exception ex)
171 {
172 EClass.ui.Say(ex.Message);
173 }
174 }
175 });
176 }
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
void WaitForEndOfFrame(Action action)
Definition: BaseCore.cs:61
static string RootData
Definition: CorePath.cs:204
Definition: EClass.cs:5
static Core core
Definition: EClass.cs:6
static UI ui
Definition: EClass.cs:16
static string SaveFilePanel(string title, string directory, string defaultName, string extension)

References EClass.core, Debug, if(), CorePath.RootData, SFB.StandaloneFileBrowser.SaveFilePanel(), EClass.ui, and BaseCore.WaitForEndOfFrame().

◆ OnInstantiate()

override void ContentConfigOther.OnInstantiate ( )
inlinevirtual

Reimplemented from UIContent.

Definition at line 39 of file ContentConfigOther.cs.

40 {
41 ddSnap.SetList((int)base.config.fix.snapType, Util.EnumToList<CoreConfig.ScreenSnapType>(), (CoreConfig.ScreenSnapType a, int b) => a.ToString().lang(), delegate(int a, CoreConfig.ScreenSnapType b)
42 {
43 base.config.fix.snapType = b;
44 });
45 ddDivider.SetList((int)base.config.fix.divider, Util.EnumToList<CameraSupport.Divider>(), (CameraSupport.Divider a, int b) => a.ToString().lang(), delegate(int a, CameraSupport.Divider b)
46 {
47 base.config.fix.divider = b;
48 EClass.core.screen.RefreshScreenSize();
49 });
50 SetSlider(sliderMissClick, base.config.other.antiMissClick, delegate(float a)
51 {
52 base.config.other.antiMissClick = (int)a;
53 EInput.antiMissClick = 0.1f * a;
54 return Lang.Get("antiMissClick") + "(" + 0.1f * a + "s)";
55 });
56 SetSlider(sliderBGMInterval, base.config.other.bgmInterval, delegate(float a)
57 {
58 base.config.other.bgmInterval = (int)a;
59 base.config.ApplyVolume();
60 return Lang.Get("bgmInterval") + "(" + a * 5f + "sec)";
61 });
62 toggleSyncMod.SetToggle(base.config.other.syncMods, delegate(bool on)
63 {
64 base.config.other.syncMods = on;
65 });
66 toggleDisableMods.SetToggle(base.config.other.disableMods, delegate(bool on)
67 {
68 base.config.other.disableMods = on;
69 });
70 toggleNoCensor.SetToggle(base.config.other.noCensor, delegate(bool on)
71 {
72 base.config.other.noCensor = on;
73 base.config.Apply();
74 });
75 toggleRunBackground.SetToggle(base.config.other.runBackground, delegate(bool on)
76 {
77 base.config.other.runBackground = on;
78 base.config.Apply();
79 });
80 toggleMuteBackground.SetToggle(base.config.other.muteBackground, delegate(bool on)
81 {
82 base.config.other.muteBackground = on;
83 base.config.Apply();
84 });
85 toggleAltInv.SetToggle(base.config.game.altInv, delegate(bool on)
86 {
87 base.config.game.altInv = on;
88 EClass.ui.layerFloat.RemoveLayers(removeImportant: true);
89 });
90 toggleAltAbility.SetToggle(base.config.game.altAbility, delegate(bool on)
91 {
92 base.config.game.altAbility = on;
93 EClass.ui.layerFloat.RemoveLayers(removeImportant: true);
94 });
95 toggleTest.SetToggle(base.config.other.showTestOptions, delegate(bool on)
96 {
97 base.config.other.showTestOptions = on;
98 EClass.ui.GetLayer<LayerConfig>().Close();
99 EClass.ui.AddLayer<LayerConfig>();
100 });
101 buttonWallPaper.SetActive(base.config.HasBackerRewardCode());
103 }
void SetSlider(Slider slider, float value, Func< float, string > action)
Definition: ContentConfig.cs:8
Definition: Lang.cs:6
static string Get(string id)
Definition: Lang.cs:91
void SetToggle(bool isOn, Action< bool > onToggle=null)
Definition: UIButton.cs:341
Definition: Util.cs:10

References buttonWallPaper, ddDivider, ddSnap, Lang.Get(), RefreshRewardCode(), ContentConfig.SetSlider(), UIButton.SetToggle(), sliderBGMInterval, sliderMissClick, toggleAltAbility, toggleAltInv, toggleDisableMods, toggleMuteBackground, toggleNoCensor, toggleRunBackground, toggleSyncMod, toggleTest, EClass.ui, and Util.

◆ OoenConfigFolder()

void ContentConfigOther.OoenConfigFolder ( )
inline

Definition at line 110 of file ContentConfigOther.cs.

111 {
112 Util.ShowExplorer(CorePath.RootSave + "config.txt");
113 }
static string RootSave
Definition: CorePath.cs:206
static void ShowExplorer(string itemPath, bool selectFirstFile=false)
Definition: Util.cs:228

References CorePath.RootSave, and Util.

◆ OpenBackerCodeInput()

void ContentConfigOther.OpenBackerCodeInput ( )
inline

Definition at line 133 of file ContentConfigOther.cs.

134 {
135 Dialog.InputName("dialogBackerCode", "", delegate(bool cancel, string text)
136 {
137 if (!cancel)
138 {
139 if (ElinEncoder.IsValid(text))
140 {
141 base.config.rewardCode = text;
142 SE.Change();
143 EClass.ui.GetLayer<LayerConfig>().Close();
144 EClass.ui.AddLayer<LayerConfig>();
145 }
146 else
147 {
148 Dialog.Ok("invalidRewardCode".lang(text));
149 }
150 }
151 });
152 }
Definition: Dialog.cs:7
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
Definition: Dialog.cs:528
static bool IsValid(string code)
Definition: ElinEncoder.cs:48

References Dialog.InputName(), and ElinEncoder.IsValid().

◆ OpenLog()

void ContentConfigOther.OpenLog ( )
inline

Definition at line 105 of file ContentConfigOther.cs.

106 {
108 }

References CorePath.RootSave, and Util.

◆ OpenPackage()

void ContentConfigOther.OpenPackage ( )
inline

Definition at line 115 of file ContentConfigOther.cs.

116 {
117 Util.ShowExplorer(CorePath.rootMod + "_Elona");
118 }
static string rootMod
Definition: CorePath.cs:169

References CorePath.rootMod, and Util.

◆ OpenUser()

void ContentConfigOther.OpenUser ( )
inline

Definition at line 120 of file ContentConfigOther.cs.

121 {
123 }
static string user
Definition: CorePath.cs:160

References CorePath.user, and Util.

◆ RefreshRewardCode()

void ContentConfigOther.RefreshRewardCode ( )
inline

Definition at line 178 of file ContentConfigOther.cs.

179 {
180 buttonBackerCode.interactable = !base.config.HasBackerRewardCode() || EClass.debug.enable;
181 if (base.config.HasBackerRewardCode())
182 {
183 buttonBackerCode.mainText.SetText("rewardCodeActive".lang());
184 }
185 }
bool enable
Definition: CoreDebug.cs:285
static CoreDebug debug
Definition: EClass.cs:48
UIText mainText
Definition: UIButton.cs:102
void SetText(string s)
Definition: UIText.cs:159

References buttonBackerCode, EClass.debug, CoreDebug.enable, UIButton.mainText, and UIText.SetText().

Referenced by OnInstantiate().

◆ ResetWindows()

void ContentConfigOther.ResetWindows ( )
inline

Definition at line 125 of file ContentConfigOther.cs.

126 {
127 Dialog.YesNo("dialogResetWindow", delegate
128 {
129 Window.dictData.Clear();
130 });
131 }
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
Definition: Dialog.cs:244
Definition: Window.cs:13
static Dictionary< string, SaveData > dictData
Definition: Window.cs:594

References Window.dictData, and Dialog.YesNo().

Member Data Documentation

◆ buttonBackerCode

UIButton ContentConfigOther.buttonBackerCode

Definition at line 23 of file ContentConfigOther.cs.

Referenced by RefreshRewardCode().

◆ buttonWallPaper

UIButton ContentConfigOther.buttonWallPaper

Definition at line 27 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ ddDivider

UIDropdown ContentConfigOther.ddDivider

Definition at line 31 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ ddSnap

UIDropdown ContentConfigOther.ddSnap

Definition at line 29 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ sliderBGMInterval

Slider ContentConfigOther.sliderBGMInterval

Definition at line 35 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ sliderMissClick

Slider ContentConfigOther.sliderMissClick

Definition at line 33 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ textBackerCode

UIText ContentConfigOther.textBackerCode

Definition at line 37 of file ContentConfigOther.cs.

◆ toggleAltAbility

UIButton ContentConfigOther.toggleAltAbility

Definition at line 21 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleAltInv

UIButton ContentConfigOther.toggleAltInv

Definition at line 19 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleDisableMods

UIButton ContentConfigOther.toggleDisableMods

Definition at line 25 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleMuteBackground

UIButton ContentConfigOther.toggleMuteBackground

Definition at line 15 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleNoCensor

UIButton ContentConfigOther.toggleNoCensor

Definition at line 11 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleRunBackground

UIButton ContentConfigOther.toggleRunBackground

Definition at line 13 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleSyncMod

UIButton ContentConfigOther.toggleSyncMod

Definition at line 9 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleTest

UIButton ContentConfigOther.toggleTest

Definition at line 17 of file ContentConfigOther.cs.

Referenced by OnInstantiate().


The documentation for this class was generated from the following file: