Elin Decompiled Documentation EA 23.317 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 toggleNoCensor
 
UIButton toggleRunBackground
 
UIButton toggleMuteBackground
 
UIButton toggleTest
 
UIButton toggleAltInv
 
UIButton toggleAltAbility
 
UIButton buttonBackerCode
 
UIButton buttonWallPaper
 
UIButton toggleSyncMod
 
UIButton toggleDisableMods
 
UIButton toggleExceptionPopup
 
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 160 of file ContentConfigOther.cs.

161 {
163 {
164 string text = StandaloneFileBrowser.SaveFilePanel("Export Wallpaper", CorePath.RootData, "wallpaper", "zip");
165 Debug.Log(text);
166 if (!string.IsNullOrEmpty(text))
167 {
168 try
169 {
170 TextAsset textAsset = Resources.Load("Etc/wallpaper") as TextAsset;
171 Debug.Log(textAsset);
172 File.WriteAllBytes(text, textAsset.bytes);
173 EClass.ui.Say("umimyaaThankyou");
174 SE.Play("godbless");
175 }
176 catch (Exception ex)
177 {
178 EClass.ui.Say(ex.Message);
179 }
180 }
181 });
182 }
if(!match.Success)
void WaitForEndOfFrame(Action action)
Definition: BaseCore.cs:61
static string RootData
Definition: CorePath.cs:200
Definition: EClass.cs:6
static Core core
Definition: EClass.cs:7
static UI ui
Definition: EClass.cs:17
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 41 of file ContentConfigOther.cs.

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

◆ OoenConfigFolder()

void ContentConfigOther.OoenConfigFolder ( )
inline

Definition at line 116 of file ContentConfigOther.cs.

117 {
118 Util.ShowExplorer(CorePath.RootSave + "config.txt");
119 }
static string RootSave
Definition: CorePath.cs:202
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 139 of file ContentConfigOther.cs.

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

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

◆ OpenLog()

void ContentConfigOther.OpenLog ( )
inline

Definition at line 111 of file ContentConfigOther.cs.

112 {
114 }

References CorePath.RootSave, and Util.

◆ OpenPackage()

void ContentConfigOther.OpenPackage ( )
inline

Definition at line 121 of file ContentConfigOther.cs.

122 {
123 Util.ShowExplorer(CorePath.rootMod + "_Elona");
124 }
static string rootMod
Definition: CorePath.cs:165

References CorePath.rootMod, and Util.

◆ OpenUser()

void ContentConfigOther.OpenUser ( )
inline

Definition at line 126 of file ContentConfigOther.cs.

127 {
129 }
static string user
Definition: CorePath.cs:156

References CorePath.user, and Util.

◆ RefreshRewardCode()

void ContentConfigOther.RefreshRewardCode ( )
inline

Definition at line 184 of file ContentConfigOther.cs.

185 {
186 buttonBackerCode.interactable = !base.config.HasBackerRewardCode() || EClass.debug.enable;
187 if (base.config.HasBackerRewardCode())
188 {
189 buttonBackerCode.mainText.SetText("rewardCodeActive".lang());
190 }
191 }
bool enable
Definition: CoreDebug.cs:301
static CoreDebug debug
Definition: EClass.cs:49
UIText mainText
Definition: UIButton.cs:102
void SetText(string s)
Definition: UIText.cs:163

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

Referenced by OnInstantiate().

◆ ResetWindows()

void ContentConfigOther.ResetWindows ( )
inline

Definition at line 131 of file ContentConfigOther.cs.

132 {
133 Dialog.YesNo("dialogResetWindow", delegate
134 {
135 Window.dictData.Clear();
136 });
137 }
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
Definition: Dialog.cs:252
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 21 of file ContentConfigOther.cs.

Referenced by RefreshRewardCode().

◆ buttonWallPaper

UIButton ContentConfigOther.buttonWallPaper

Definition at line 23 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ ddDivider

UIDropdown ContentConfigOther.ddDivider

Definition at line 33 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ ddSnap

UIDropdown ContentConfigOther.ddSnap

Definition at line 31 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ sliderBGMInterval

Slider ContentConfigOther.sliderBGMInterval

Definition at line 37 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ sliderMissClick

Slider ContentConfigOther.sliderMissClick

Definition at line 35 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ textBackerCode

UIText ContentConfigOther.textBackerCode

Definition at line 39 of file ContentConfigOther.cs.

◆ toggleAltAbility

UIButton ContentConfigOther.toggleAltAbility

Definition at line 19 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleAltInv

UIButton ContentConfigOther.toggleAltInv

Definition at line 17 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleDisableMods

UIButton ContentConfigOther.toggleDisableMods

Definition at line 27 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleExceptionPopup

UIButton ContentConfigOther.toggleExceptionPopup

Definition at line 29 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleMuteBackground

UIButton ContentConfigOther.toggleMuteBackground

Definition at line 13 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleNoCensor

UIButton ContentConfigOther.toggleNoCensor

Definition at line 9 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleRunBackground

UIButton ContentConfigOther.toggleRunBackground

Definition at line 11 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleSyncMod

UIButton ContentConfigOther.toggleSyncMod

Definition at line 25 of file ContentConfigOther.cs.

Referenced by OnInstantiate().

◆ toggleTest

UIButton ContentConfigOther.toggleTest

Definition at line 15 of file ContentConfigOther.cs.

Referenced by OnInstantiate().


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