PropMyItem.cs 101 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Text.RegularExpressions;
  5. using UnityEngine;
  6. using UnityEngine.SceneManagement;
  7. using UnityInjector;
  8. using UnityInjector.Attributes;
  9. using wf;
  10. namespace COM3D2.PropMyItem.Plugin
  11. {
  12. // Token: 0x0200000A RID: 10
  13. [PluginFilter("COM3D2x64")]
  14. [PluginFilter("COM3D2x86")]
  15. [PluginFilter("COM3D2VRx64")]
  16. [PluginFilter("COM3D2OHx86")]
  17. [PluginFilter("COM3D2OHx64")]
  18. [PluginFilter("COM3D2OHVRx64")]
  19. [PluginName("PropMyItem")]
  20. [PluginVersion("2.3.0.0")]
  21. public class PropMyItem : PluginBase
  22. {
  23. // Token: 0x0600002B RID: 43 RVA: 0x000030EC File Offset: 0x000012EC
  24. public PropMyItem()
  25. {
  26. this._folders.Add(new PropMyItem.FolderMenu("頭", new string[]
  27. {
  28. "顔",
  29. "眉",
  30. "目",
  31. "目ハイライト",
  32. "ほくろ",
  33. "唇",
  34. "歯"
  35. }));
  36. this._folders.Add(new PropMyItem.FolderMenu("髪", new string[]
  37. {
  38. "前髪",
  39. "後髪",
  40. "横髪",
  41. "エクステ髪",
  42. "アホ毛"
  43. }));
  44. this._folders.Add(new PropMyItem.FolderMenu("身体", new string[]
  45. {
  46. "肌",
  47. "乳首",
  48. "タトゥー",
  49. "アンダーヘア",
  50. "ボディ"
  51. }));
  52. this._folders.Add(new PropMyItem.FolderMenu("服装", new string[]
  53. {
  54. "帽子",
  55. "ヘッドドレス",
  56. "トップス",
  57. "ボトムス",
  58. "ワンピース",
  59. "水着",
  60. "ブラジャー",
  61. "パンツ",
  62. "靴下",
  63. "靴"
  64. }));
  65. this._folders.Add(new PropMyItem.FolderMenu("アクセサリ", new string[]
  66. {
  67. " 前髪 ",
  68. "メガネ",
  69. "アイマスク",
  70. "鼻",
  71. "耳",
  72. "手袋",
  73. "ネックレス",
  74. "チョーカー",
  75. "リボン",
  76. "\u3000乳首\u3000",
  77. "腕",
  78. "へそ",
  79. "足首",
  80. "背中",
  81. "しっぽ",
  82. "前穴"
  83. }));
  84. this._folders.Add(new PropMyItem.FolderMenu("セット", new string[]
  85. {
  86. "メイド服",
  87. "コスチューム",
  88. "下着"
  89. }));
  90. this._folders.Add(new PropMyItem.FolderMenu("プリセット", new string[]
  91. {
  92. "服 / 身体",
  93. "服",
  94. "身体"
  95. }));
  96. this._folders.Add(new PropMyItem.FolderMenu("全て", new string[0]));
  97. this._folders.Add(new PropMyItem.FolderMenu("選択中", new string[0]));
  98. this._categoryMPNDic.Add("顔", MPN.head);
  99. this._categoryMPNDic.Add("眉", MPN.folder_mayu);
  100. this._categoryMPNDic.Add("目", MPN.folder_eye);
  101. this._categoryMPNDic.Add("目ハイライト", MPN.eye_hi);
  102. this._categoryMPNDic.Add("ほくろ", MPN.hokuro);
  103. this._categoryMPNDic.Add("唇", MPN.lip);
  104. this._categoryMPNDic.Add("歯", MPN.accha);
  105. this._categoryMPNDic.Add("前髪", MPN.hairf);
  106. this._categoryMPNDic.Add("後髪", MPN.hairr);
  107. this._categoryMPNDic.Add("横髪", MPN.hairs);
  108. this._categoryMPNDic.Add("エクステ髪", MPN.hairt);
  109. this._categoryMPNDic.Add("アホ毛", MPN.hairaho);
  110. this._categoryMPNDic.Add("肌", MPN.folder_skin);
  111. this._categoryMPNDic.Add("乳首", MPN.chikubi);
  112. this._categoryMPNDic.Add("タトゥー", MPN.acctatoo);
  113. this._categoryMPNDic.Add("アンダーヘア", MPN.folder_underhair);
  114. this._categoryMPNDic.Add("ボディ", MPN.body);
  115. this._categoryMPNDic.Add("帽子", MPN.acchat);
  116. this._categoryMPNDic.Add("ヘッドドレス", MPN.headset);
  117. this._categoryMPNDic.Add("トップス", MPN.wear);
  118. this._categoryMPNDic.Add("ボトムス", MPN.skirt);
  119. this._categoryMPNDic.Add("ワンピース", MPN.onepiece);
  120. this._categoryMPNDic.Add("水着", MPN.mizugi);
  121. this._categoryMPNDic.Add("ブラジャー", MPN.bra);
  122. this._categoryMPNDic.Add("パンツ", MPN.panz);
  123. this._categoryMPNDic.Add("靴下", MPN.stkg);
  124. this._categoryMPNDic.Add("靴", MPN.shoes);
  125. this._categoryMPNDic.Add(" 前髪 ", MPN.acckami);
  126. this._categoryMPNDic.Add("メガネ", MPN.megane);
  127. this._categoryMPNDic.Add("アイマスク", MPN.acchead);
  128. this._categoryMPNDic.Add("鼻", MPN.acchana);
  129. this._categoryMPNDic.Add("耳", MPN.accmimi);
  130. this._categoryMPNDic.Add("手袋", MPN.glove);
  131. this._categoryMPNDic.Add("ネックレス", MPN.acckubi);
  132. this._categoryMPNDic.Add("チョーカー", MPN.acckubiwa);
  133. this._categoryMPNDic.Add("リボン", MPN.acckamisub);
  134. this._categoryMPNDic.Add("\u3000乳首\u3000", MPN.accnip);
  135. this._categoryMPNDic.Add("腕", MPN.accude);
  136. this._categoryMPNDic.Add("へそ", MPN.accheso);
  137. this._categoryMPNDic.Add("足首", MPN.accashi);
  138. this._categoryMPNDic.Add("背中", MPN.accsenaka);
  139. this._categoryMPNDic.Add("しっぽ", MPN.accshippo);
  140. this._categoryMPNDic.Add("前穴", MPN.accxxx);
  141. this._categoryMPNDic.Add("メイド服", MPN.set_maidwear);
  142. this._categoryMPNDic.Add("コスチューム", MPN.set_mywear);
  143. this._categoryMPNDic.Add("下着", MPN.set_underwear);
  144. foreach (string text in this._categoryMPNDic.Keys)
  145. {
  146. this._menuMPNCategoryDic.Add(this._categoryMPNDic[text], text);
  147. }
  148. foreach (object obj in Enum.GetValues(typeof(MPN)))
  149. {
  150. MPN key = (MPN)obj;
  151. this._mpnMenuListDictionary.Add(key, new List<MenuInfo>());
  152. }
  153. }
  154. // Token: 0x0600002C RID: 44 RVA: 0x00003808 File Offset: 0x00001A08
  155. public void Awake()
  156. {
  157. GameMain.Instance.StartCoroutine(CheckMenuDatabase());
  158. try
  159. {
  160. SceneManager.sceneLoaded += this.OnSceneLoaded;
  161. }
  162. catch (Exception)
  163. {
  164. }
  165. }
  166. private System.Collections.IEnumerator CheckMenuDatabase()
  167. {
  168. if (_menuFilesReady) yield break;
  169. while (!GameMain.Instance.MenuDataBase.JobFinished()) yield return null;
  170. _menuFilesReady = true;
  171. Console.WriteLine("PropMyItem: Menu files are ready");
  172. }
  173. // Token: 0x0600002D RID: 45 RVA: 0x0000383C File Offset: 0x00001A3C
  174. private void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode)
  175. {
  176. this._sceneLevel = scene.buildIndex;
  177. }
  178. // Token: 0x0600002E RID: 46 RVA: 0x0000384C File Offset: 0x00001A4C
  179. public void Update()
  180. {
  181. try
  182. {
  183. this._autoShoesHide.Update();
  184. if (this._isPluginKeyChange && Event.current.type == EventType.KeyUp)
  185. {
  186. bool control = Event.current.control;
  187. bool alt = Event.current.alt;
  188. bool shift = Event.current.shift;
  189. string text = Event.current.keyCode.ToString();
  190. if (!string.IsNullOrEmpty(text))
  191. {
  192. UserConfig.Instance.IsControlKey = control;
  193. UserConfig.Instance.IsAltKey = alt;
  194. UserConfig.Instance.IsShiftKey = shift;
  195. UserConfig.Instance.GuiVisibleKey = text.ToLower();
  196. UserConfig.Instance.Save();
  197. this._isPluginKeyChange = false;
  198. return;
  199. }
  200. }
  201. KeyCode keyCode = KeyCode.I;
  202. if (EnumUtil.TryParse<KeyCode>(UserConfig.Instance.GuiVisibleKey, true, out keyCode) && UserConfig.Instance.IsControlKey == Event.current.control && UserConfig.Instance.IsAltKey == Event.current.alt && UserConfig.Instance.IsShiftKey == Event.current.shift && Event.current.keyCode == keyCode && Event.current.type == EventType.KeyUp)
  203. {
  204. if (_menuFilesReady)
  205. {
  206. this._isVisible = !this._isVisible;
  207. this._isMinimum = !this._isVisible;
  208. }
  209. else
  210. {
  211. Console.WriteLine("PropMyItem: Menu files are not ready yet");
  212. }
  213. }
  214. else
  215. {
  216. if (this._isVisible && (!this._isStartUpLoadead || this._isForcedInit))
  217. {
  218. this._isStartUpLoadead = true;
  219. this.LoadMenuFiles(this._isForcedInit);
  220. this._isForcedInit = false;
  221. }
  222. if (this._isVisible && this._windowRect.Contains(new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y)))
  223. {
  224. GameMain.Instance.MainCamera.SetControl(false);
  225. if (Event.current.type != EventType.KeyDown && Event.current.type != EventType.KeyUp)
  226. {
  227. Input.ResetInputAxes();
  228. }
  229. }
  230. else if (!GameMain.Instance.MainCamera.GetControl())
  231. {
  232. GameMain.Instance.MainCamera.SetControl(true);
  233. }
  234. }
  235. }
  236. catch (Exception)
  237. {
  238. }
  239. }
  240. // Token: 0x0600002F RID: 47 RVA: 0x00003A88 File Offset: 0x00001C88
  241. public void OnGUI()
  242. {
  243. if (!this._isVisible)
  244. {
  245. return;
  246. }
  247. if (this._isShowSetting)
  248. {
  249. this._windowRect = GUI.Window(4511, this._windowRect, new GUI.WindowFunction(this.GuiSettingFunc), "PropMyItem", GuiStyles.WindowStyle);
  250. return;
  251. }
  252. if (this._isShowFilterSetting)
  253. {
  254. this._windowRect = GUI.Window(4511, this._windowRect, new GUI.WindowFunction(this.GuiFilterSettingFunc), "PropMyItem", GuiStyles.WindowStyle);
  255. return;
  256. }
  257. this._windowRect = GUI.Window(4511, this._windowRect, new GUI.WindowFunction(this.GuiFunc), "PropMyItem", GuiStyles.WindowStyle);
  258. }
  259. // Token: 0x06000030 RID: 48 RVA: 0x00003B40 File Offset: 0x00001D40
  260. private void GuiSettingFunc(int windowID)
  261. {
  262. this._windowRect.width = 300f;
  263. float num = GuiStyles.ControlHeight + GuiStyles.Margin;
  264. float margin = GuiStyles.Margin;
  265. float width = this._windowRect.width - GuiStyles.Margin * 2f;
  266. string text = "キー入力待機中...";
  267. if (!this._isPluginKeyChange)
  268. {
  269. List<string> list = new List<string>();
  270. if (UserConfig.Instance.IsControlKey)
  271. {
  272. list.Add("Ctrl");
  273. }
  274. if (UserConfig.Instance.IsShiftKey)
  275. {
  276. list.Add("Shift");
  277. }
  278. if (UserConfig.Instance.IsAltKey)
  279. {
  280. list.Add("Alt");
  281. }
  282. list.Add(UserConfig.Instance.GuiVisibleKey.ToUpper());
  283. text = "表示キー : ";
  284. for (int i = 0; i < list.Count; i++)
  285. {
  286. text += list[i];
  287. if (i != list.Count - 1)
  288. {
  289. text += " + ";
  290. }
  291. }
  292. }
  293. GUI.enabled = !this._isPluginKeyChange;
  294. if (GUI.Button(new Rect(margin, num, width, GuiStyles.ControlHeight), text, GuiStyles.ButtonStyle))
  295. {
  296. this._isPluginKeyChange = !this._isPluginKeyChange;
  297. }
  298. GUI.enabled = true;
  299. num += GuiStyles.ControlHeight + GuiStyles.Margin + GuiStyles.Margin;
  300. bool flag = UserConfig.Instance.IsAutoShoesHide;
  301. flag = GUI.Toggle(new Rect(margin, num, width, GuiStyles.ControlHeight), flag, "室内で自動的に靴を脱ぐ ", GuiStyles.ToggleStyle);
  302. if (flag != UserConfig.Instance.IsAutoShoesHide)
  303. {
  304. UserConfig.Instance.IsAutoShoesHide = flag;
  305. UserConfig.Instance.Save();
  306. }
  307. num += GuiStyles.ControlHeight + GuiStyles.Margin + GuiStyles.Margin;
  308. bool flag2 = UserConfig.Instance.IsOutputInfoLog;
  309. flag2 = GUI.Toggle(new Rect(margin, num, width, GuiStyles.ControlHeight), flag2, "アイテム変更時のログ出力", GuiStyles.ToggleStyle);
  310. if (flag2 != UserConfig.Instance.IsOutputInfoLog)
  311. {
  312. UserConfig.Instance.IsOutputInfoLog = flag2;
  313. UserConfig.Instance.Save();
  314. }
  315. num += GuiStyles.ControlHeight + GuiStyles.Margin + GuiStyles.Margin;
  316. if (GUI.Button(new Rect(margin, num, width, GuiStyles.ControlHeight), "Menu/Mod 再読み込み", GuiStyles.ButtonStyle))
  317. {
  318. this._isShowSetting = false;
  319. this._isPluginKeyChange = false;
  320. this._isForcedInit = true;
  321. }
  322. num += GuiStyles.ControlHeight + GuiStyles.Margin + GuiStyles.Margin;
  323. if (GUI.Button(new Rect(margin, num, width, GuiStyles.ControlHeight), "戻る", GuiStyles.ButtonStyle))
  324. {
  325. this._isShowSetting = false;
  326. this._isPluginKeyChange = false;
  327. }
  328. num += GuiStyles.ControlHeight + GuiStyles.Margin;
  329. this._windowRect.height = num;
  330. GUI.DragWindow();
  331. }
  332. // Token: 0x06000031 RID: 49 RVA: 0x00003DF0 File Offset: 0x00001FF0
  333. private void GuiFilterSettingFunc(int windowID)
  334. {
  335. float num = this._windowRect.width - GuiStyles.Margin * 2f;
  336. float num2 = this._windowRect.height - GuiStyles.Margin * 2f;
  337. float num3 = GuiStyles.ControlHeight + GuiStyles.Margin;
  338. float num4 = GuiStyles.Margin;
  339. string text = "フィルタ文字列:";
  340. GUI.Label(new Rect(num4, num3, (float)(GuiStyles.FontSize * text.Length), GuiStyles.ControlHeight), text, GuiStyles.LabelStyle);
  341. num4 += (float)(GuiStyles.FontSize * text.Length) + GuiStyles.Margin;
  342. float num5 = num - num4 - GuiStyles.Margin - (float)(GuiStyles.FontSize * 4);
  343. this._selectedFilterText = GUI.TextField(new Rect(num4, num3, num5, GuiStyles.ControlHeight), this._selectedFilterText, GuiStyles.TextFieldStyle);
  344. num4 += num5 + GuiStyles.Margin;
  345. GUI.enabled = !string.IsNullOrEmpty(this._selectedFilterText);
  346. if (GUI.Button(new Rect(num4, num3, (float)(GuiStyles.FontSize * 4), GuiStyles.ControlHeight), "登録", GuiStyles.ButtonStyle))
  347. {
  348. UserConfig.Instance.FilterTextList.Add(this._selectedFilterText);
  349. UserConfig.Instance.FilterTextList.Sort();
  350. UserConfig.Instance.Save();
  351. this._isShowFilterSetting = false;
  352. }
  353. GUI.enabled = true;
  354. num4 = GuiStyles.Margin;
  355. num3 += GuiStyles.ControlHeight + GuiStyles.Margin;
  356. List<string> filterTextList = UserConfig.Instance.FilterTextList;
  357. int count = filterTextList.Count;
  358. Rect position = new Rect(num4, num3, num, num2 - num3 - GuiStyles.ControlHeight - GuiStyles.Margin * 2f);
  359. Rect viewRect = new Rect(0f, 0f, num - GuiStyles.ScrollWidth, (float)count * (GuiStyles.ControlHeight + GuiStyles.Margin));
  360. this._scrollFilterPosition = GUI.BeginScrollView(position, this._scrollFilterPosition, viewRect);
  361. Rect position2 = new Rect(GuiStyles.Margin, 0f, viewRect.width - GuiStyles.Margin - 50f, GuiStyles.ControlHeight);
  362. Rect position3 = new Rect(position2.x + position2.width + GuiStyles.Margin, 0f, 50f, GuiStyles.ControlHeight);
  363. for (int i = 0; i < filterTextList.Count; i++)
  364. {
  365. position2.y = (float)i * (GuiStyles.ControlHeight + GuiStyles.Margin);
  366. position3.y = position2.y;
  367. if (GUI.Button(position2, filterTextList[i], GuiStyles.ButtonStyle))
  368. {
  369. this._selectedFilterText = filterTextList[i];
  370. this._isShowFilterSetting = false;
  371. }
  372. if (GUI.Button(position3, "x", GuiStyles.ButtonStyle))
  373. {
  374. UserConfig.Instance.FilterTextList.RemoveAt(i);
  375. UserConfig.Instance.Save();
  376. }
  377. }
  378. GUI.EndScrollView();
  379. num3 = num2 - GuiStyles.ControlHeight - GuiStyles.Margin * 2f;
  380. if (GUI.Button(new Rect(num4, num3, num, GuiStyles.ControlHeight), "戻る", GuiStyles.ButtonStyle))
  381. {
  382. this._isShowSetting = false;
  383. this._isPluginKeyChange = false;
  384. this._isShowFilterSetting = false;
  385. }
  386. num3 += GuiStyles.ControlHeight + GuiStyles.Margin;
  387. GUI.DragWindow();
  388. }
  389. // Token: 0x06000032 RID: 50 RVA: 0x0000410C File Offset: 0x0000230C
  390. private void GuiFunc(int windowID)
  391. {
  392. try
  393. {
  394. string text = this._isMinimum ? "" : "最小化";
  395. Rect position = new Rect(GuiStyles.Margin, 0f, (float)(GuiStyles.FontSize * (text.Length + 2)), GuiStyles.ControlHeight);
  396. this._isMinimum = GUI.Toggle(position, this._isMinimum, text, GuiStyles.ToggleStyle);
  397. if (this._isMinimum)
  398. {
  399. this._windowRect.width = 100f;
  400. this._windowRect.height = GuiStyles.ControlHeight;
  401. }
  402. else
  403. {
  404. this._windowRect.height = 570f;
  405. float yPos = GuiStyles.ControlHeight + GuiStyles.Margin;
  406. float margin = GuiStyles.Margin;
  407. this.guiSelectedMaid(ref margin, ref yPos);
  408. this.guiSelectedCategoryFolder(ref margin, yPos, this._windowRect.height);
  409. this.guiSelectedCategory(ref margin, yPos, this._windowRect.height);
  410. if (this._folders[this._selectedFolder].Name == "プリセット")
  411. {
  412. this.guiSelectedPreset(ref margin, yPos, this._windowRect.height);
  413. }
  414. else if (this._folders[this._selectedFolder].Name == "Debug")
  415. {
  416. this.guiDebug(ref margin, yPos, this._windowRect.height);
  417. }
  418. else
  419. {
  420. if (this._selectedMPN != MPN.null_mpn || this._folders[this._selectedFolder].Name == "全て" || this._folders[this._selectedFolder].Name == "選択中")
  421. {
  422. this.guiSelectedItemFilter(margin, yPos);
  423. this.guiSelectedItem(ref margin, yPos, this._windowRect.height);
  424. }
  425. this.guiSelectedColorSet(ref margin, ref yPos);
  426. this.guiSelectedMugenColor(ref margin, ref yPos);
  427. }
  428. this._windowRect.width = margin;
  429. }
  430. }
  431. catch (Exception ex)
  432. {
  433. CommonUtil.Log(ex.StackTrace);
  434. }
  435. finally
  436. {
  437. GUI.DragWindow();
  438. }
  439. }
  440. // Token: 0x06000033 RID: 51 RVA: 0x00004330 File Offset: 0x00002530
  441. private void guiSelectedMaid(ref float xPos, ref float yPos)
  442. {
  443. try
  444. {
  445. List<Maid> visibleMaidList = CommonUtil.GetVisibleMaidList();
  446. if (visibleMaidList.Count < 1)
  447. {
  448. this._selectedMaid = -1;
  449. }
  450. else
  451. {
  452. if (this._selectedMaid >= visibleMaidList.Count || this._selectedMaid < 0)
  453. {
  454. this._selectedMaid = 0;
  455. }
  456. string text = visibleMaidList[this._selectedMaid].status.isFirstNameCall ? visibleMaidList[this._selectedMaid].status.firstName : visibleMaidList[this._selectedMaid].status.lastName;
  457. Rect position = new Rect(xPos + 30f, 8f, 50f, 75f);
  458. Rect position2 = new Rect(xPos + 85f, yPos, (float)(10 * GuiStyles.FontSize), GuiStyles.ControlHeight);
  459. Rect position3 = new Rect(xPos, yPos + 24f, (float)(2 * GuiStyles.FontSize), GuiStyles.ControlHeight);
  460. Rect position4 = new Rect(xPos + 85f, yPos + 24f, (float)(2 * GuiStyles.FontSize), GuiStyles.ControlHeight);
  461. GUI.Label(position, visibleMaidList[this._selectedMaid].GetThumIcon(), GuiStyles.LabelStyle);
  462. GuiStyles.LabelStyle.alignment = TextAnchor.MiddleLeft;
  463. GUI.Label(position2, text, GuiStyles.LabelStyle);
  464. GuiStyles.LabelStyle.alignment = TextAnchor.MiddleCenter;
  465. if (GUI.Button(position3, "<", GuiStyles.ButtonStyle))
  466. {
  467. this._selectedMaid = ((this._selectedMaid == 0) ? (visibleMaidList.Count - 1) : (this._selectedMaid - 1));
  468. }
  469. if (GUI.Button(position4, ">", GuiStyles.ButtonStyle))
  470. {
  471. this._selectedMaid = ((this._selectedMaid == visibleMaidList.Count - 1) ? 0 : (this._selectedMaid + 1));
  472. }
  473. }
  474. }
  475. finally
  476. {
  477. yPos += 50f;
  478. }
  479. }
  480. // Token: 0x06000034 RID: 52 RVA: 0x00004508 File Offset: 0x00002708
  481. private void updateMaidEyePosY(Maid maid, float value)
  482. {
  483. float num = 5000f;
  484. float num2 = maid.body0.trsEyeL.localPosition.y * num;
  485. if (value < 0f)
  486. {
  487. value = 0f;
  488. }
  489. Vector3 localPosition = maid.body0.trsEyeL.localPosition;
  490. Vector3 localPosition2 = maid.body0.trsEyeR.localPosition;
  491. maid.body0.trsEyeL.localPosition = new Vector3(localPosition.x, System.Math.Max((num2 + value) / num, 0f), localPosition.z);
  492. maid.body0.trsEyeR.localPosition = new Vector3(localPosition.x, System.Math.Min((num2 - value) / num, 0f), localPosition.z);
  493. }
  494. // Token: 0x06000035 RID: 53 RVA: 0x000045C4 File Offset: 0x000027C4
  495. private void guiSelectedCategoryFolder(ref float xPos, float yPos, float windowHeight)
  496. {
  497. float num = (float)(GuiStyles.FontSize * 6);
  498. float num2 = (float)((double)GuiStyles.ControlHeight * 1.5);
  499. for (int i = 0; i < this._folders.Count; i++)
  500. {
  501. if (this._folders[i].Name == "全て")
  502. {
  503. yPos += GuiStyles.Margin * 2f;
  504. }
  505. Rect position = new Rect(xPos, yPos + (num2 + GuiStyles.Margin) * (float)i, num, num2);
  506. GUI.enabled = (this._selectedFolder != i);
  507. if (GUI.Button(position, this._folders[i].Name, GuiStyles.ButtonStyle))
  508. {
  509. this._selectedFolder = i;
  510. this._selectedMPN = MPN.null_mpn;
  511. this._selectedCategory = -1;
  512. this._selectedItem = null;
  513. this._selectedVariationItem = null;
  514. }
  515. GUI.enabled = true;
  516. }
  517. if (GUI.Button(new Rect(xPos, windowHeight - num2 - GuiStyles.Margin, num, num2), "設定", GuiStyles.ButtonStyle))
  518. {
  519. this._isShowSetting = true;
  520. }
  521. xPos += num + GuiStyles.Margin;
  522. }
  523. // Token: 0x06000036 RID: 54 RVA: 0x000046D8 File Offset: 0x000028D8
  524. private void nextPattern(Maid maid, MPN mpn, string basename, string filename, bool isPrev = false)
  525. {
  526. List<MenuInfo> list = null;
  527. if (!this._mpnMenuListDictionary.TryGetValue(mpn, out list))
  528. {
  529. return;
  530. }
  531. foreach (MenuInfo menuInfo in list)
  532. {
  533. if (!(menuInfo.FileName.ToLower() != basename))
  534. {
  535. if (menuInfo.IsColorLock)
  536. {
  537. break;
  538. }
  539. List<MenuInfo> variationMenuList = menuInfo.VariationMenuList;
  540. if (variationMenuList == null)
  541. {
  542. break;
  543. }
  544. if (variationMenuList.Count < 2)
  545. {
  546. break;
  547. }
  548. for (int i = 0; i < variationMenuList.Count; i++)
  549. {
  550. if (variationMenuList[i].FileName.ToLower() == filename)
  551. {
  552. string fileName = variationMenuList[0].FileName;
  553. if (!isPrev)
  554. {
  555. if (i < variationMenuList.Count - 1)
  556. {
  557. fileName = variationMenuList[i + 1].FileName;
  558. }
  559. }
  560. else if (i == 0)
  561. {
  562. fileName = variationMenuList[variationMenuList.Count - 1].FileName;
  563. }
  564. else
  565. {
  566. fileName = variationMenuList[i - 1].FileName;
  567. }
  568. maid.SetProp(mpn, fileName, fileName.GetHashCode(), false, false);
  569. maid.AllProcProp();
  570. if (UserConfig.Instance.IsOutputInfoLog)
  571. {
  572. Console.WriteLine("PropMyItem:change item = " + fileName);
  573. }
  574. return;
  575. }
  576. }
  577. }
  578. }
  579. }
  580. // Token: 0x06000037 RID: 55 RVA: 0x00004850 File Offset: 0x00002A50
  581. private void guiSelectedCategory(ref float xPos, float yPos, float windowHeight)
  582. {
  583. int num = this._folders[this._selectedFolder].Categories.Length;
  584. if (num > 0)
  585. {
  586. float width = (float)(7 * GuiStyles.FontSize);
  587. float num2 = GuiStyles.ControlHeight * 1.5f;
  588. Rect viewRect = new Rect(0f, 0f, width, (num2 + GuiStyles.Margin) * (float)num);
  589. Rect position = new Rect(xPos, yPos, viewRect.width + GuiStyles.ScrollWidth, windowHeight - yPos - GuiStyles.Margin);
  590. this._categoryScrollPosition = GUI.BeginScrollView(position, this._categoryScrollPosition, viewRect);
  591. for (int i = 0; i < num; i++)
  592. {
  593. Rect position2 = new Rect(0f, (num2 + GuiStyles.Margin) * (float)i, width, num2);
  594. GUI.enabled = (this._selectedCategory != i);
  595. if (GUI.Button(position2, this._folders[this._selectedFolder].Categories[i], GuiStyles.ButtonStyle))
  596. {
  597. this._selectedPresetList.Clear();
  598. this._selectedItem = null;
  599. this._selectedVariationItem = null;
  600. this._scrollPosition.y = 0f;
  601. MPN selectedMPN = MPN.head;
  602. if (this._categoryMPNDic.TryGetValue(this._folders[this._selectedFolder].Categories[i], out selectedMPN))
  603. {
  604. this._selectedMPN = selectedMPN;
  605. }
  606. else
  607. {
  608. if (this._folders[this._selectedFolder].Name == "プリセット")
  609. {
  610. List<CharacterMgr.Preset> list = GameMain.Instance.CharacterMgr.PresetListLoad();
  611. this._selectedPresetType = CharacterMgr.PresetType.All;
  612. if (this._folders[this._selectedFolder].Categories[i] == "服")
  613. {
  614. this._selectedPresetType = CharacterMgr.PresetType.Wear;
  615. }
  616. else if (this._folders[this._selectedFolder].Categories[i] == "身体")
  617. {
  618. this._selectedPresetType = CharacterMgr.PresetType.Body;
  619. }
  620. foreach (CharacterMgr.Preset preset in list)
  621. {
  622. if (preset.ePreType == this._selectedPresetType)
  623. {
  624. this._selectedPresetList.Add(preset);
  625. }
  626. }
  627. }
  628. this._selectedMPN = MPN.null_mpn;
  629. }
  630. this._selectedCategory = i;
  631. }
  632. GUI.enabled = true;
  633. }
  634. GUI.EndScrollView();
  635. xPos += position.width + GuiStyles.Margin;
  636. }
  637. }
  638. // Token: 0x06000038 RID: 56 RVA: 0x00004AC4 File Offset: 0x00002CC4
  639. private static int CompareCreateTime(string fileX, string fileY)
  640. {
  641. return DateTime.Compare(File.GetLastWriteTime(fileX), File.GetCreationTime(fileY));
  642. }
  643. // Token: 0x06000039 RID: 57 RVA: 0x00004AD8 File Offset: 0x00002CD8
  644. private void guiDebug(ref float xPos, float yPos, float windowHeight)
  645. {
  646. float num = 200f;
  647. if (GUI.Button(new Rect(xPos, yPos, num, GuiStyles.ControlHeight), "プリセット保存", GuiStyles.ButtonStyle))
  648. {
  649. List<Maid> visibleMaidList = CommonUtil.GetVisibleMaidList();
  650. if (this._selectedMaid >= 0 && visibleMaidList.Count - 1 >= this._selectedMaid)
  651. {
  652. Maid f_maid = visibleMaidList[this._selectedMaid];
  653. GameMain.Instance.CharacterMgr.PresetSave(f_maid, CharacterMgr.PresetType.All);
  654. }
  655. }
  656. yPos += GuiStyles.ControlHeight + GuiStyles.Margin + GuiStyles.Margin;
  657. xPos += num + GuiStyles.Margin;
  658. }
  659. // Token: 0x0600003A RID: 58 RVA: 0x00004B6C File Offset: 0x00002D6C
  660. private void guiSelectedPreset(ref float xPos, float yPos, float windowHeight)
  661. {
  662. float num = 300f;
  663. float num2 = 4f;
  664. float num3 = num / num2;
  665. float num4 = (float)((double)num3 * 1.5);
  666. if (this._selectedPresetList.Count > 0)
  667. {
  668. int count = this._selectedPresetList.Count;
  669. int num5 = ((float)count % num2 == 0f) ? 0 : 1;
  670. Rect viewRect = new Rect(0f, 0f, num, (float)((int)((float)count / num2) + num5) * num4);
  671. Rect position = new Rect(xPos, yPos, viewRect.width + GuiStyles.ScrollWidth, windowHeight - yPos - (float)GuiStyles.FontSize);
  672. this._scrollPosition = GUI.BeginScrollView(position, this._scrollPosition, viewRect);
  673. new List<int>();
  674. new Rect(0f, 0f, num3, num4);
  675. for (int i = 0; i < count; i++)
  676. {
  677. Rect position2 = new Rect(num3 * ((float)i % num2), num4 * (float)((int)((float)i / num2)), num3, num4);
  678. new Rect(num3 * ((float)i % num2), num4 * (float)((int)((float)i / num2)), 20f, 20f);
  679. if (Event.current.type == EventType.Repaint)
  680. {
  681. if (GUI.Button(position2, this._selectedPresetList[i].texThum))
  682. {
  683. List<Maid> visibleMaidList = CommonUtil.GetVisibleMaidList();
  684. if (this._selectedMaid >= 0 && visibleMaidList.Count - 1 >= this._selectedMaid)
  685. {
  686. Maid maid = visibleMaidList[this._selectedMaid];
  687. MPN[] array = new MPN[]
  688. {
  689. MPN.megane,
  690. MPN.acckami,
  691. MPN.acckamisub,
  692. MPN.hairt,
  693. MPN.headset,
  694. MPN.acchat
  695. };
  696. this.presetRestoreDic_.Clear();
  697. foreach (MPN mpn in array)
  698. {
  699. MaidProp prop = maid.GetProp(mpn);
  700. this.presetRestoreDic_.Add(mpn, prop.strFileName);
  701. }
  702. GameMain.Instance.CharacterMgr.PresetSet(maid, this._selectedPresetList[i]);
  703. }
  704. }
  705. }
  706. else if (GUI.Button(position2, this._selectedPresetList[i].texThum))
  707. {
  708. List<Maid> visibleMaidList2 = CommonUtil.GetVisibleMaidList();
  709. if (this._selectedMaid >= 0 && visibleMaidList2.Count - 1 >= this._selectedMaid)
  710. {
  711. Maid maid2 = visibleMaidList2[this._selectedMaid];
  712. MPN[] array3 = new MPN[]
  713. {
  714. MPN.megane,
  715. MPN.acckami,
  716. MPN.acckamisub,
  717. MPN.hairt,
  718. MPN.headset,
  719. MPN.acchat
  720. };
  721. this.presetRestoreDic_.Clear();
  722. foreach (MPN mpn2 in array3)
  723. {
  724. MaidProp prop2 = maid2.GetProp(mpn2);
  725. this.presetRestoreDic_.Add(mpn2, prop2.strFileName);
  726. }
  727. GameMain.Instance.CharacterMgr.PresetSet(maid2, this._selectedPresetList[i]);
  728. }
  729. }
  730. }
  731. GUI.EndScrollView();
  732. xPos += num + GuiStyles.ScrollWidth + GuiStyles.Margin;
  733. }
  734. }
  735. // Token: 0x0600003B RID: 59 RVA: 0x00004E68 File Offset: 0x00003068
  736. private void guiSelectedItemFilter(float xPos, float yPos)
  737. {
  738. float num = xPos;
  739. float num2 = yPos - GuiStyles.ControlHeight - GuiStyles.Margin;
  740. string[] array = new string[]
  741. {
  742. "全て",
  743. "製品",
  744. "MOD"
  745. };
  746. int num3 = 112;
  747. if (this._folders[this._selectedFolder].Name == "全て" || this._folders[this._selectedFolder].Name == "選択中")
  748. {
  749. num += 40f;
  750. }
  751. else
  752. {
  753. num3 += 40;
  754. }
  755. GUI.Label(new Rect(num, num2, (float)(GuiStyles.FontSize * 6), GuiStyles.ControlHeight), "フィルタ:", GuiStyles.LabelStyle);
  756. num += (float)(GuiStyles.FontSize * 5) + GuiStyles.Margin;
  757. Rect position = new Rect(num, num2 - GuiStyles.ControlHeight, (float)(GuiStyles.FontSize * 7), GuiStyles.ControlHeight);
  758. this._isFavFilter = GUI.Toggle(position, this._isFavFilter, "お気に入り", GuiStyles.ToggleStyle);
  759. Rect position2 = new Rect(num, num2, (float)(GuiStyles.FontSize * 4), GuiStyles.ControlHeight);
  760. if (GUI.Button(position2, array[this._selectedFilter], GuiStyles.ButtonStyle))
  761. {
  762. this._selectedFilter = ((this._selectedFilter == 2) ? 0 : (this._selectedFilter + 1));
  763. this._scrollPosition.y = 0f;
  764. }
  765. num += (float)(GuiStyles.FontSize * 4) + GuiStyles.Margin;
  766. Rect position3 = new Rect(num, num2, (float)num3, GuiStyles.ControlHeight);
  767. this._selectedFilterText = GUI.TextField(position3, this._selectedFilterText, GuiStyles.TextFieldStyle);
  768. num += (float)(num3 + 4);
  769. position2.Set(num, num2, (float)(GuiStyles.FontSize * 2), GuiStyles.ControlHeight);
  770. if (GUI.Button(position2, "▽", GuiStyles.ButtonStyle))
  771. {
  772. this._isShowFilterSetting = true;
  773. }
  774. num += (float)(GuiStyles.FontSize * 2) + GuiStyles.Margin;
  775. position2.Set(num, num2, (float)(GuiStyles.FontSize * 2), GuiStyles.ControlHeight);
  776. if (GUI.Button(position2, "x", GuiStyles.ButtonStyle))
  777. {
  778. this._selectedFilterText = string.Empty;
  779. }
  780. }
  781. // Token: 0x0600003C RID: 60 RVA: 0x00005074 File Offset: 0x00003274
  782. private List<MenuInfo> getItemList()
  783. {
  784. List<MenuInfo> list = new List<MenuInfo>();
  785. if (this._folders[this._selectedFolder].Name == "全て")
  786. {
  787. using (Dictionary<string, MPN>.ValueCollection.Enumerator enumerator = this._categoryMPNDic.Values.GetEnumerator())
  788. {
  789. while (enumerator.MoveNext())
  790. {
  791. MPN key = enumerator.Current;
  792. List<MenuInfo> collection = null;
  793. if (this._mpnMenuListDictionary.TryGetValue(key, out collection))
  794. {
  795. list.AddRange(collection);
  796. }
  797. }
  798. return list;
  799. }
  800. }
  801. if (this._folders[this._selectedFolder].Name == "選択中")
  802. {
  803. List<Maid> visibleMaidList = CommonUtil.GetVisibleMaidList();
  804. if (this._selectedMaid < 0 || this._selectedMaid > visibleMaidList.Count - 1)
  805. {
  806. return list;
  807. }
  808. Maid maid = visibleMaidList[this._selectedMaid];
  809. using (Dictionary<string, MPN>.ValueCollection.Enumerator enumerator2 = this._categoryMPNDic.Values.GetEnumerator())
  810. {
  811. while (enumerator2.MoveNext())
  812. {
  813. MPN mpn = enumerator2.Current;
  814. if (mpn != MPN.set_maidwear && mpn != MPN.set_mywear && mpn != MPN.set_underwear)
  815. {
  816. List<MenuInfo> list2 = null;
  817. if (this._mpnMenuListDictionary.TryGetValue(mpn, out list2))
  818. {
  819. string selectedMenuFileName = CommonUtil.GetSelectedMenuFileName(new MPN?(mpn), maid);
  820. bool flag = false;
  821. foreach (MenuInfo menuInfo in list2)
  822. {
  823. if (menuInfo != null)
  824. {
  825. foreach (MenuInfo menuInfo2 in menuInfo.VariationMenuList)
  826. {
  827. if (menuInfo2.FileName.IndexOf(selectedMenuFileName, StringComparison.OrdinalIgnoreCase) == 0)
  828. {
  829. if (menuInfo2.IconName != "_I_del.tex")
  830. {
  831. list.Add(menuInfo);
  832. }
  833. flag = true;
  834. break;
  835. }
  836. }
  837. if (flag)
  838. {
  839. break;
  840. }
  841. }
  842. }
  843. }
  844. }
  845. }
  846. return list;
  847. }
  848. }
  849. this._mpnMenuListDictionary.TryGetValue(this._selectedMPN, out list);
  850. return list;
  851. }
  852. // Token: 0x0600003D RID: 61 RVA: 0x000052C0 File Offset: 0x000034C0
  853. private void guiSelectedItem(ref float xPos, float yPos, float windowHeight)
  854. {
  855. List<MenuInfo> itemList = this.getItemList();
  856. if (itemList == null || itemList.Count == 0)
  857. {
  858. return;
  859. }
  860. float num = 8f;
  861. float num2 = 20f;
  862. float num3 = 8f;
  863. float num4 = 3f;
  864. float num5 = 0f;
  865. float num6 = 0f;
  866. float num7 = num6;
  867. int num8 = itemList.Count;
  868. int num9 = 0;
  869. if (this._selectedMPN == MPN.set_maidwear || this._selectedMPN == MPN.set_mywear || this._selectedMPN == MPN.set_underwear)
  870. {
  871. num6 = 75f;
  872. num7 = num6 * 1.44f;
  873. num4 = 4f;
  874. num = 16f;
  875. num2 = 16f;
  876. num3 = 10f;
  877. }
  878. else
  879. {
  880. num6 = 60f;
  881. num7 = 60f;
  882. num4 = 5f;
  883. num = 18f;
  884. num2 = 24f;
  885. num3 = 6f;
  886. }
  887. num5 = num6 * num4;
  888. ReadOnlyDictionary<string, bool> havePartsItems = GameMain.Instance.CharacterMgr.status.havePartsItems;
  889. for (int i = 0; i < num8; i++)
  890. {
  891. MenuInfo menuInfo = itemList[i];
  892. menuInfo.IsHave = true;
  893. if (menuInfo.IsShopTarget && havePartsItems.ContainsKey(menuInfo.FileName) && !havePartsItems[menuInfo.FileName])
  894. {
  895. num9++;
  896. menuInfo.IsHave = false;
  897. }
  898. else
  899. {
  900. if (this._selectedFilter == 1)
  901. {
  902. if (menuInfo.IsMod)
  903. {
  904. num9++;
  905. menuInfo.IsHave = false;
  906. goto IL_1DC;
  907. }
  908. }
  909. else if (this._selectedFilter == 2 && !menuInfo.IsMod)
  910. {
  911. num9++;
  912. menuInfo.IsHave = false;
  913. goto IL_1DC;
  914. }
  915. if (this._isFavFilter && !menuInfo.IsFavorite)
  916. {
  917. num9++;
  918. menuInfo.IsHave = false;
  919. }
  920. else if (!string.IsNullOrEmpty(this._selectedFilterText) && menuInfo.ItemName.IndexOf(this._selectedFilterText, StringComparison.OrdinalIgnoreCase) == -1 && menuInfo.FilePath.IndexOf(this._selectedFilterText, StringComparison.OrdinalIgnoreCase) == -1)
  921. {
  922. num9++;
  923. menuInfo.IsHave = false;
  924. }
  925. }
  926. IL_1DC:;
  927. }
  928. num8 -= num9;
  929. int num10 = ((float)num8 % num4 == 0f) ? 0 : 1;
  930. int num11 = (int)(windowHeight - yPos - (float)GuiStyles.FontSize - GuiStyles.ControlHeight);
  931. Rect viewRect = new Rect(0f, 0f, num6 * num4, (float)((int)((float)num8 / num4) + num10) * num7);
  932. if (this._folders[this._selectedFolder].Name == "選択中")
  933. {
  934. viewRect = new Rect(0f, 0f, num6 * num4, (float)((int)((float)(num8 + 5) / num4) + num10) * num7);
  935. }
  936. Rect position = new Rect(xPos, yPos + GuiStyles.ControlHeight, viewRect.width + GuiStyles.ScrollWidth, (float)num11);
  937. this._scrollPosition = GUI.BeginScrollView(position, this._scrollPosition, viewRect);
  938. new List<int>();
  939. new Rect(0f, 0f, num6, num7);
  940. GUIStyle guistyle = new GUIStyle();
  941. guistyle.alignment = TextAnchor.UpperRight;
  942. guistyle.fontSize = 10;
  943. guistyle.normal = new GUIStyleState
  944. {
  945. textColor = Color.black
  946. };
  947. GUIStyle guistyle2 = new GUIStyle("button");
  948. guistyle2.fontSize = 14;
  949. guistyle2.alignment = TextAnchor.UpperRight;
  950. guistyle2.normal.textColor = Color.white;
  951. guistyle2.hover.textColor = Color.white;
  952. guistyle2.padding = new RectOffset(0, 3, 1, 0);
  953. GUIStyle guistyle3 = new GUIStyle("button");
  954. guistyle3.fontSize = 14;
  955. guistyle3.alignment = TextAnchor.UpperRight;
  956. guistyle3.normal.textColor = Color.yellow;
  957. guistyle3.hover.textColor = Color.yellow;
  958. guistyle3.padding = new RectOffset(0, 3, 1, 0);
  959. GUIStyle guistyle4 = new GUIStyle("button");
  960. guistyle4.fontSize = 14;
  961. guistyle4.alignment = TextAnchor.UpperRight;
  962. guistyle4.normal.textColor = Color.white;
  963. guistyle4.hover.textColor = Color.white;
  964. guistyle4.padding = new RectOffset(0, 6, 1, 0);
  965. GUIStyle guistyle5 = new GUIStyle("button");
  966. guistyle5.fontSize = 14;
  967. guistyle5.alignment = TextAnchor.UpperRight;
  968. guistyle5.normal.textColor = Color.red;
  969. guistyle5.hover.textColor = Color.red;
  970. guistyle5.padding = new RectOffset(0, 6, 1, 0);
  971. Maid maid = null;
  972. string text = string.Empty;
  973. List<Maid> visibleMaidList = CommonUtil.GetVisibleMaidList();
  974. if (this._selectedMaid >= 0 && visibleMaidList.Count - 1 >= this._selectedMaid)
  975. {
  976. maid = visibleMaidList[this._selectedMaid];
  977. text = CommonUtil.GetSelectedMenuFileName(new MPN?(this._selectedMPN), maid);
  978. }
  979. float y = this._scrollPosition.y;
  980. float num12 = this._scrollPosition.y + (float)num11;
  981. int num13 = 0;
  982. for (int j = 0; j < itemList.Count; j++)
  983. {
  984. MenuInfo menuInfo2 = itemList[j];
  985. if (menuInfo2.IsHave)
  986. {
  987. bool enabled = true;
  988. if (!string.IsNullOrEmpty(text))
  989. {
  990. if (menuInfo2.FileName.IndexOf(text, StringComparison.OrdinalIgnoreCase) == 0)
  991. {
  992. enabled = false;
  993. this._selectedItem = menuInfo2;
  994. this._selectedVariationItem = menuInfo2.VariationMenuList[0];
  995. }
  996. else if (menuInfo2.VariationMenuList.Count > 1)
  997. {
  998. foreach (MenuInfo menuInfo3 in menuInfo2.VariationMenuList)
  999. {
  1000. if (menuInfo3.FileName.IndexOf(text, StringComparison.OrdinalIgnoreCase) == 0)
  1001. {
  1002. this._selectedItem = menuInfo2;
  1003. this._selectedVariationItem = menuInfo3;
  1004. enabled = false;
  1005. break;
  1006. }
  1007. }
  1008. }
  1009. }
  1010. float num14 = num7 * (float)((int)((float)num13 / num4));
  1011. float num15 = num14 + num7;
  1012. if ((y <= num14 && num15 <= num12) || (num14 <= y && y <= num15) || (y <= num14 && num14 <= num12))
  1013. {
  1014. if (menuInfo2.Icon == null && !string.IsNullOrEmpty(menuInfo2.IconName) && !menuInfo2.IsError)
  1015. {
  1016. if (!menuInfo2.IsOfficialMOD)
  1017. {
  1018. try
  1019. {
  1020. menuInfo2.Icon = ImportCM.CreateTexture(menuInfo2.IconName);
  1021. goto IL_632;
  1022. }
  1023. catch (Exception)
  1024. {
  1025. menuInfo2.IsError = true;
  1026. goto IL_D64;
  1027. }
  1028. }
  1029. MenuInfo menuInfo4 = MenuModParser.parseMod(menuInfo2.FilePath);
  1030. menuInfo2.Icon = menuInfo4.Icon;
  1031. }
  1032. IL_632:
  1033. string tooltip = menuInfo2.ItemName;
  1034. if (this._folders[this._selectedFolder].Name == "全て" || this._folders[this._selectedFolder].Name == "選択中")
  1035. {
  1036. tooltip = menuInfo2.CategoryName + ":" + menuInfo2.ItemName;
  1037. }
  1038. Rect position2 = new Rect(num6 * ((float)num13 % num4), num7 * (float)((int)((float)num13 / num4)), num6, num7);
  1039. Rect position3 = new Rect(position2.x, position2.y + position2.height - 20f, 20f, 20f);
  1040. Rect position4 = new Rect(position2.x, position2.y, 20f, 20f);
  1041. Rect position5 = new Rect(position2.x + position2.width - 20f, position2.y + position2.height - 20f, 20f, 20f);
  1042. if (Event.current.type == EventType.Repaint)
  1043. {
  1044. GUI.enabled = enabled;
  1045. if (GUI.Button(position2, new GUIContent(menuInfo2.Icon, tooltip)))
  1046. {
  1047. this._selectedItem = menuInfo2;
  1048. this._selectedVariationItem = menuInfo2.VariationMenuList[0];
  1049. List<Maid> visibleMaidList2 = CommonUtil.GetVisibleMaidList();
  1050. if (this._selectedMaid >= 0 && visibleMaidList2.Count - 1 >= this._selectedMaid)
  1051. {
  1052. if (UserConfig.Instance.IsOutputInfoLog)
  1053. {
  1054. Console.WriteLine("PropMyItem:change item = " + menuInfo2.FileName);
  1055. }
  1056. visibleMaidList2[this._selectedMaid].SetProp(menuInfo2.MPN, menuInfo2.FileName, Path.GetFileName(menuInfo2.FileName).GetHashCode(), false, false);
  1057. if ((menuInfo2.MPN == MPN.folder_eye || menuInfo2.MPN == MPN.folder_mayu || menuInfo2.MPN == MPN.folder_skin || menuInfo2.MPN == MPN.folder_underhair || menuInfo2.MPN == MPN.chikubi) && menuInfo2.ColorSetMenuList.Count > 0)
  1058. {
  1059. MenuInfo menuInfo5 = this._selectedVariationItem.ColorSetMenuList[0];
  1060. visibleMaidList2[this._selectedMaid].SetProp(menuInfo2.ColorSetMPN, menuInfo5.FileName, Path.GetFileName(menuInfo5.FileName).GetHashCode(), false, false);
  1061. }
  1062. visibleMaidList2[this._selectedMaid].AllProcProp();
  1063. }
  1064. }
  1065. GUI.enabled = true;
  1066. GUIStyle style = guistyle2;
  1067. if (menuInfo2.IsFavorite)
  1068. {
  1069. style = guistyle3;
  1070. }
  1071. if (GUI.Button(position3, new GUIContent("★", tooltip), style))
  1072. {
  1073. if (menuInfo2.IsFavorite)
  1074. {
  1075. menuInfo2.IsFavorite = false;
  1076. UserConfig.Instance.FavList.Remove(menuInfo2.FileName.ToLower());
  1077. }
  1078. else
  1079. {
  1080. menuInfo2.IsFavorite = true;
  1081. UserConfig.Instance.FavList.Add(menuInfo2.FileName.ToLower());
  1082. }
  1083. UserConfig.Instance.Save();
  1084. }
  1085. if (this._folders[this._selectedFolder].Name == "選択中")
  1086. {
  1087. if (GUI.Button(position4, new GUIContent("×", tooltip)))
  1088. {
  1089. maid.DelProp(menuInfo2.MPN, false);
  1090. maid.AllProcProp();
  1091. }
  1092. GUIStyle style2 = guistyle4;
  1093. if (menuInfo2.IsColorLock)
  1094. {
  1095. style2 = guistyle5;
  1096. }
  1097. if (GUI.Button(position5, new GUIContent("■", tooltip), style2))
  1098. {
  1099. if (menuInfo2.IsColorLock)
  1100. {
  1101. menuInfo2.IsColorLock = false;
  1102. UserConfig.Instance.ColorLockList.Remove(menuInfo2.FileName.ToLower());
  1103. }
  1104. else
  1105. {
  1106. menuInfo2.IsColorLock = true;
  1107. UserConfig.Instance.ColorLockList.Add(menuInfo2.FileName.ToLower());
  1108. }
  1109. UserConfig.Instance.Save();
  1110. }
  1111. }
  1112. }
  1113. else
  1114. {
  1115. if (this._folders[this._selectedFolder].Name == "選択中")
  1116. {
  1117. if (GUI.Button(position4, new GUIContent("×", tooltip)))
  1118. {
  1119. maid.DelProp(menuInfo2.MPN, false);
  1120. maid.AllProcProp();
  1121. }
  1122. GUIStyle style3 = guistyle4;
  1123. if (menuInfo2.IsColorLock)
  1124. {
  1125. style3 = guistyle5;
  1126. }
  1127. if (GUI.Button(position5, new GUIContent("■", tooltip), style3))
  1128. {
  1129. if (menuInfo2.IsColorLock)
  1130. {
  1131. menuInfo2.IsColorLock = false;
  1132. UserConfig.Instance.ColorLockList.Remove(menuInfo2.FileName.ToLower());
  1133. }
  1134. else
  1135. {
  1136. menuInfo2.IsColorLock = true;
  1137. UserConfig.Instance.ColorLockList.Add(menuInfo2.FileName.ToLower());
  1138. }
  1139. UserConfig.Instance.Save();
  1140. }
  1141. }
  1142. GUIStyle style4 = guistyle2;
  1143. if (menuInfo2.IsFavorite)
  1144. {
  1145. style4 = guistyle3;
  1146. }
  1147. if (GUI.Button(position3, new GUIContent("★", tooltip), style4))
  1148. {
  1149. if (menuInfo2.IsFavorite)
  1150. {
  1151. menuInfo2.IsFavorite = false;
  1152. UserConfig.Instance.FavList.Remove(menuInfo2.FileName.ToLower());
  1153. }
  1154. else
  1155. {
  1156. menuInfo2.IsFavorite = true;
  1157. UserConfig.Instance.FavList.Add(menuInfo2.FileName.ToLower());
  1158. }
  1159. UserConfig.Instance.Save();
  1160. }
  1161. GUI.enabled = enabled;
  1162. if (GUI.Button(position2, new GUIContent(menuInfo2.Icon, tooltip)))
  1163. {
  1164. this._selectedItem = menuInfo2;
  1165. this._selectedVariationItem = menuInfo2.VariationMenuList[0];
  1166. List<Maid> visibleMaidList3 = CommonUtil.GetVisibleMaidList();
  1167. if (this._selectedMaid >= 0 && visibleMaidList3.Count - 1 >= this._selectedMaid)
  1168. {
  1169. if (UserConfig.Instance.IsOutputInfoLog)
  1170. {
  1171. Console.WriteLine("PropMyItem:change item = " + menuInfo2.FileName);
  1172. }
  1173. visibleMaidList3[this._selectedMaid].SetProp(menuInfo2.MPN, menuInfo2.FileName, Path.GetFileName(menuInfo2.FileName).GetHashCode(), false, false);
  1174. if ((menuInfo2.MPN == MPN.folder_eye || menuInfo2.MPN == MPN.folder_mayu || menuInfo2.MPN == MPN.folder_skin || menuInfo2.MPN == MPN.folder_underhair || menuInfo2.MPN == MPN.chikubi) && menuInfo2.ColorSetMenuList.Count > 0)
  1175. {
  1176. MenuInfo menuInfo6 = this._selectedVariationItem.ColorSetMenuList[0];
  1177. visibleMaidList3[this._selectedMaid].SetProp(menuInfo2.ColorSetMPN, menuInfo6.FileName, Path.GetFileName(menuInfo6.FileName).GetHashCode(), false, false);
  1178. }
  1179. visibleMaidList3[this._selectedMaid].AllProcProp();
  1180. }
  1181. }
  1182. GUI.enabled = true;
  1183. }
  1184. int count = menuInfo2.VariationMenuList.Count;
  1185. if (count > 1)
  1186. {
  1187. Rect position6 = new Rect(position2.x + position2.width - num, position2.y + num3, 10f, 10f);
  1188. if (menuInfo2.MPN == MPN.set_maidwear || menuInfo2.MPN == MPN.set_mywear || menuInfo2.MPN == MPN.set_underwear)
  1189. {
  1190. position6 = new Rect(position2.x + position2.width - num2, position2.y + num3, 10f, 10f);
  1191. }
  1192. GUI.Label(position6, count.ToString(), guistyle);
  1193. }
  1194. }
  1195. num13++;
  1196. }
  1197. IL_D64:;
  1198. }
  1199. if (this._folders[this._selectedFolder].Name == "選択中")
  1200. {
  1201. float num16 = num7 * (float)((int)((float)num13 / num4));
  1202. num16 = (((float)num13 % num4 == 0f) ? num16 : (num16 + num7));
  1203. Rect position7 = new Rect(0f, num16, num6 * 2f, num7);
  1204. Rect position8 = new Rect(num6 * 3f, num16, num6 * 2f, num7);
  1205. MPN[] array = new MPN[]
  1206. {
  1207. MPN.acchat,
  1208. MPN.headset,
  1209. MPN.wear,
  1210. MPN.skirt,
  1211. MPN.onepiece,
  1212. MPN.mizugi,
  1213. MPN.bra,
  1214. MPN.panz,
  1215. MPN.stkg,
  1216. MPN.shoes,
  1217. MPN.acckami,
  1218. MPN.megane,
  1219. MPN.acchead,
  1220. MPN.acchana,
  1221. MPN.accmimi,
  1222. MPN.glove,
  1223. MPN.acckubi,
  1224. MPN.acckubiwa,
  1225. MPN.acckamisub,
  1226. MPN.accnip,
  1227. MPN.accude,
  1228. MPN.accheso,
  1229. MPN.accashi,
  1230. MPN.accsenaka,
  1231. MPN.accshippo,
  1232. MPN.accxxx
  1233. };
  1234. if (GUI.Button(position7, "カラバリ変更(前)", GuiStyles.ButtonStyle) && maid != null)
  1235. {
  1236. foreach (MPN mpn in array)
  1237. {
  1238. MaidProp prop = maid.GetProp(mpn);
  1239. string text2 = prop.strFileName.ToLower();
  1240. string basename = prop.strFileName.ToLower();
  1241. if (Regex.IsMatch(text2, "_z\\d{1,4}"))
  1242. {
  1243. Match match = Regex.Match(text2, "_z\\d{1,4}");
  1244. basename = text2.Replace(match.Value, "");
  1245. }
  1246. this.nextPattern(maid, mpn, basename, text2, true);
  1247. }
  1248. }
  1249. if (GUI.Button(position8, "カラバリ変更(後)", GuiStyles.ButtonStyle) && maid != null)
  1250. {
  1251. foreach (MPN mpn2 in array)
  1252. {
  1253. try
  1254. {
  1255. MaidProp prop2 = maid.GetProp(mpn2);
  1256. string text3 = prop2.strFileName.ToLower();
  1257. string basename2 = prop2.strFileName.ToLower();
  1258. if (Regex.IsMatch(text3, "_z\\d{1,4}"))
  1259. {
  1260. Match match2 = Regex.Match(text3, "_z\\d{1,4}");
  1261. basename2 = text3.Replace(match2.Value, "");
  1262. }
  1263. this.nextPattern(maid, mpn2, basename2, text3, false);
  1264. }
  1265. catch (Exception ex)
  1266. {
  1267. Console.WriteLine(ex.ToString());
  1268. }
  1269. }
  1270. }
  1271. }
  1272. GUI.EndScrollView();
  1273. GuiStyles.LabelStyle.alignment = TextAnchor.UpperLeft;
  1274. Rect position9 = new Rect(xPos, yPos, num6 * num4 + GuiStyles.ScrollWidth, GuiStyles.ControlHeight);
  1275. xPos += num5 + GuiStyles.ScrollWidth + 8f;
  1276. GUI.Label(position9, GUI.tooltip, GuiStyles.LabelStyle);
  1277. GuiStyles.LabelStyle.alignment = TextAnchor.MiddleCenter;
  1278. if (this._selectedItem != null && this._selectedItem.VariationMenuList.Count > 1)
  1279. {
  1280. this.guiSelectedVariation(ref xPos, yPos, this._selectedItem, num6, num7, windowHeight, text);
  1281. }
  1282. }
  1283. // Token: 0x0600003E RID: 62 RVA: 0x00006364 File Offset: 0x00004564
  1284. private void guiSelectedVariation(ref float posX, float posY, MenuInfo itemMenuInfo, float iconWidth, float iconHeight, float windowHeight, string selectedFileName)
  1285. {
  1286. int count = itemMenuInfo.VariationMenuList.Count;
  1287. Rect viewRect = new Rect(0f, 0f, iconWidth, (float)count * (iconWidth + 4f));
  1288. Rect position = new Rect(posX, posY + GuiStyles.ControlHeight, viewRect.width + GuiStyles.ScrollWidth, windowHeight - posY - (float)GuiStyles.FontSize - GuiStyles.ControlHeight);
  1289. this._colorItemScrollPosition = GUI.BeginScrollView(position, this._colorItemScrollPosition, viewRect);
  1290. new Rect(0f, 0f, iconWidth, iconWidth);
  1291. int i = 0;
  1292. while (i < count)
  1293. {
  1294. MenuInfo menuInfo = itemMenuInfo.VariationMenuList[i];
  1295. if (menuInfo.Icon == null && !string.IsNullOrEmpty(menuInfo.IconName) && !menuInfo.IsError)
  1296. {
  1297. if (!menuInfo.IsOfficialMOD)
  1298. {
  1299. try
  1300. {
  1301. menuInfo.Icon = ImportCM.CreateTexture(menuInfo.IconName);
  1302. goto IL_10A;
  1303. }
  1304. catch (Exception)
  1305. {
  1306. menuInfo.IsError = true;
  1307. goto IL_101;
  1308. }
  1309. }
  1310. MenuInfo menuInfo2 = MenuModParser.parseMod(menuInfo.FilePath);
  1311. menuInfo.Icon = menuInfo2.Icon;
  1312. goto IL_10A;
  1313. }
  1314. goto IL_10A;
  1315. IL_101:
  1316. i++;
  1317. continue;
  1318. IL_10A:
  1319. string tooltip = menuInfo.ItemName;
  1320. if (this._folders[this._selectedFolder].Name == "全て" || this._folders[this._selectedFolder].Name == "選択中")
  1321. {
  1322. tooltip = menuInfo.CategoryName + ":" + menuInfo.ItemName;
  1323. }
  1324. if (!string.IsNullOrEmpty(selectedFileName) && menuInfo.FileName.IndexOf(selectedFileName, StringComparison.OrdinalIgnoreCase) == 0)
  1325. {
  1326. GUI.enabled = false;
  1327. }
  1328. if (GUI.Button(new Rect(0f, (iconWidth + 4f) * (float)i, iconWidth, iconWidth), new GUIContent(menuInfo.Icon, tooltip)))
  1329. {
  1330. this._selectedVariationItem = menuInfo;
  1331. List<Maid> visibleMaidList = CommonUtil.GetVisibleMaidList();
  1332. if (this._selectedMaid >= 0 && visibleMaidList.Count - 1 >= this._selectedMaid)
  1333. {
  1334. visibleMaidList[this._selectedMaid].SetProp(menuInfo.MPN, menuInfo.FileName, Path.GetFileName(menuInfo.FileName).GetHashCode(), false, false);
  1335. visibleMaidList[this._selectedMaid].AllProcProp();
  1336. if (UserConfig.Instance.IsOutputInfoLog)
  1337. {
  1338. Console.WriteLine("PropMyItem:change item = " + menuInfo.FileName);
  1339. }
  1340. }
  1341. }
  1342. GUI.enabled = true;
  1343. goto IL_101;
  1344. }
  1345. GUI.EndScrollView();
  1346. posX += iconWidth + GuiStyles.ScrollWidth + 8f;
  1347. }
  1348. // Token: 0x0600003F RID: 63 RVA: 0x00006600 File Offset: 0x00004800
  1349. private void guiSelectedColorSet(ref float posX, ref float posY)
  1350. {
  1351. if (this._selectedVariationItem != null && this._selectedVariationItem.ColorSetMenuList.Count > 0)
  1352. {
  1353. string value = string.Empty;
  1354. List<Maid> visibleMaidList = CommonUtil.GetVisibleMaidList();
  1355. if (this._selectedMaid >= 0 && visibleMaidList.Count - 1 >= this._selectedMaid)
  1356. {
  1357. Maid maid = visibleMaidList[this._selectedMaid];
  1358. value = CommonUtil.GetSelectedMenuFileName(new MPN?(this._selectedVariationItem.ColorSetMPN), maid);
  1359. }
  1360. float num = (float)(420 / this._selectedVariationItem.ColorSetMenuList.Count);
  1361. num = ((num > 28f) ? 28f : num);
  1362. int i = 0;
  1363. while (i < this._selectedVariationItem.ColorSetMenuList.Count)
  1364. {
  1365. MenuInfo menuInfo = this._selectedVariationItem.ColorSetMenuList[i];
  1366. if (menuInfo.Icon == null && !string.IsNullOrEmpty(menuInfo.IconName) && !menuInfo.IsError)
  1367. {
  1368. if (!menuInfo.IsOfficialMOD)
  1369. {
  1370. try
  1371. {
  1372. menuInfo.Icon = ImportCM.CreateTexture(menuInfo.IconName);
  1373. goto IL_125;
  1374. }
  1375. catch (Exception)
  1376. {
  1377. menuInfo.IsError = true;
  1378. goto IL_11C;
  1379. }
  1380. }
  1381. MenuInfo menuInfo2 = MenuModParser.parseMod(menuInfo.FilePath);
  1382. menuInfo.Icon = menuInfo2.Icon;
  1383. goto IL_125;
  1384. }
  1385. goto IL_125;
  1386. IL_11C:
  1387. i++;
  1388. continue;
  1389. IL_125:
  1390. if (!string.IsNullOrEmpty(value) && menuInfo.FileName.IndexOf(value, StringComparison.OrdinalIgnoreCase) == 0)
  1391. {
  1392. if (menuInfo.FileName.IndexOf("mugen", StringComparison.OrdinalIgnoreCase) != -1)
  1393. {
  1394. this._isFreeColor = true;
  1395. }
  1396. else
  1397. {
  1398. this._isFreeColor = false;
  1399. }
  1400. GUI.enabled = false;
  1401. }
  1402. if (GUI.Button(new Rect(posX, posY + 10f + (num + 1f) * (float)i, num, num), menuInfo.Icon))
  1403. {
  1404. if (menuInfo.FileName.IndexOf("mugen", StringComparison.OrdinalIgnoreCase) != -1)
  1405. {
  1406. this._isFreeColor = true;
  1407. }
  1408. else
  1409. {
  1410. this._isFreeColor = false;
  1411. }
  1412. List<Maid> visibleMaidList2 = CommonUtil.GetVisibleMaidList();
  1413. if (this._selectedMaid >= 0 && visibleMaidList2.Count - 1 >= this._selectedMaid)
  1414. {
  1415. visibleMaidList2[this._selectedMaid].SetProp(menuInfo.MPN, menuInfo.FileName, Path.GetFileName(menuInfo.FileName).GetHashCode(), false, false);
  1416. visibleMaidList2[this._selectedMaid].AllProcProp();
  1417. }
  1418. }
  1419. GUI.enabled = true;
  1420. goto IL_11C;
  1421. }
  1422. posX += num + 8f;
  1423. return;
  1424. }
  1425. this._isFreeColor = false;
  1426. }
  1427. // Token: 0x06000040 RID: 64 RVA: 0x00006874 File Offset: 0x00004A74
  1428. private void guiSelectedMugenColor(ref float posX, ref float posY)
  1429. {
  1430. if (this._isFreeColor)
  1431. {
  1432. int fontSize = GuiStyles.FontSize;
  1433. float controlHeight = GuiStyles.ControlHeight;
  1434. GUIStyle buttonStyle = GuiStyles.ButtonStyle;
  1435. GUIStyle labelStyle = GuiStyles.LabelStyle;
  1436. List<Maid> visibleMaidList = CommonUtil.GetVisibleMaidList();
  1437. if (this._selectedMaid >= 0 && visibleMaidList.Count - 1 >= this._selectedMaid)
  1438. {
  1439. float num = posY;
  1440. Maid maid = visibleMaidList[this._selectedMaid];
  1441. MaidParts.PARTS_COLOR parts_COLOR = MaidParts.PARTS_COLOR.SKIN;
  1442. MPN mpn = this._selectedItem.MPN;
  1443. switch (mpn)
  1444. {
  1445. case MPN.hairf:
  1446. case MPN.hairr:
  1447. case MPN.hairt:
  1448. case MPN.hairs:
  1449. case MPN.hairaho:
  1450. case MPN.haircolor:
  1451. parts_COLOR = MaidParts.PARTS_COLOR.HAIR;
  1452. goto IL_189;
  1453. case MPN.skin:
  1454. break;
  1455. case MPN.acctatoo:
  1456. case MPN.accnail:
  1457. case MPN.hokuro:
  1458. case MPN.lip:
  1459. case MPN.eye_hi:
  1460. case MPN.eye_hi_r:
  1461. goto IL_189;
  1462. case MPN.underhair:
  1463. goto IL_F8;
  1464. case MPN.mayu:
  1465. goto IL_100;
  1466. case MPN.eye:
  1467. goto IL_108;
  1468. case MPN.chikubi:
  1469. case MPN.chikubicolor:
  1470. parts_COLOR = MaidParts.PARTS_COLOR.NIPPLE;
  1471. goto IL_189;
  1472. default:
  1473. switch (mpn)
  1474. {
  1475. case MPN.folder_eye:
  1476. goto IL_108;
  1477. case MPN.folder_mayu:
  1478. goto IL_100;
  1479. case MPN.folder_underhair:
  1480. goto IL_F8;
  1481. case MPN.folder_skin:
  1482. break;
  1483. default:
  1484. goto IL_189;
  1485. }
  1486. break;
  1487. }
  1488. parts_COLOR = MaidParts.PARTS_COLOR.SKIN;
  1489. goto IL_189;
  1490. IL_F8:
  1491. parts_COLOR = MaidParts.PARTS_COLOR.UNDER_HAIR;
  1492. goto IL_189;
  1493. IL_100:
  1494. parts_COLOR = MaidParts.PARTS_COLOR.EYE_BROW;
  1495. goto IL_189;
  1496. IL_108:
  1497. string text = string.Empty;
  1498. if (this._selectedEyeClorType == 0)
  1499. {
  1500. parts_COLOR = MaidParts.PARTS_COLOR.EYE_L;
  1501. text = "両目";
  1502. }
  1503. else if (this._selectedEyeClorType == 1)
  1504. {
  1505. parts_COLOR = MaidParts.PARTS_COLOR.EYE_L;
  1506. text = "左目";
  1507. }
  1508. else if (this._selectedEyeClorType == 2)
  1509. {
  1510. parts_COLOR = MaidParts.PARTS_COLOR.EYE_R;
  1511. text = "右目";
  1512. }
  1513. if (GUI.Button(new Rect(posX, posY, (float)(fontSize * 8), controlHeight), text, buttonStyle))
  1514. {
  1515. this._selectedEyeClorType = ((this._selectedEyeClorType == 2) ? 0 : (this._selectedEyeClorType + 1));
  1516. }
  1517. num = controlHeight + 8f + posY;
  1518. IL_189:
  1519. MaidParts.PartsColor partsColor = maid.Parts.GetPartsColor(parts_COLOR);
  1520. string[] array = new string[]
  1521. {
  1522. "色相\u3000",
  1523. "彩度\u3000",
  1524. "明度\u3000",
  1525. "対称\u3000",
  1526. "影率\u3000",
  1527. "影色 色相",
  1528. "影色 彩度",
  1529. "影色 明度",
  1530. "影色 対称"
  1531. };
  1532. int[] array2 = new int[]
  1533. {
  1534. partsColor.m_nMainHue,
  1535. partsColor.m_nMainChroma,
  1536. partsColor.m_nMainBrightness,
  1537. partsColor.m_nMainContrast,
  1538. partsColor.m_nShadowRate,
  1539. partsColor.m_nShadowHue,
  1540. partsColor.m_nShadowChroma,
  1541. partsColor.m_nShadowBrightness,
  1542. partsColor.m_nShadowContrast
  1543. };
  1544. int[] array3 = new int[]
  1545. {
  1546. 255,
  1547. 255,
  1548. 510,
  1549. 200,
  1550. 255,
  1551. 255,
  1552. 255,
  1553. 510,
  1554. 200
  1555. };
  1556. float num2 = controlHeight * 0.8f;
  1557. for (int i = 0; i < array.Length; i++)
  1558. {
  1559. float num3 = num + (float)i * (num2 * 2f + 8f);
  1560. Rect position = new Rect(posX, num3, (float)(fontSize * array[i].Length), num2);
  1561. Rect position2 = new Rect(posX + (float)(fontSize * array[i].Length + 4), num3, (float)(fontSize * 4), num2);
  1562. Rect position3 = new Rect(posX, num3 + num2, (float)(fontSize * 2), num2);
  1563. Rect position4 = new Rect(posX + (float)(fontSize * 2) + 4f, num3 + num2 + (float)((double)num2 * 0.25), 80f, num2);
  1564. Rect position5 = new Rect(posX + 80f + (float)(fontSize * 2) + 8f, num3 + num2, (float)(fontSize * 2), num2);
  1565. GUI.Label(position, array[i], labelStyle);
  1566. GUI.Label(position2, array2[i].ToString(), labelStyle);
  1567. float num4 = (float)((int)GUI.HorizontalSlider(position4, (float)array2[i], 0f, (float)array3[i]));
  1568. if (num4 != (float)array2[i])
  1569. {
  1570. array2[i] = (int)num4;
  1571. this.changeColor(partsColor, parts_COLOR, array2, maid);
  1572. }
  1573. if (GUI.Button(position3, "-", buttonStyle))
  1574. {
  1575. int num5 = array2[i] - 1;
  1576. num5 = ((num5 < 0) ? 0 : num5);
  1577. array2[i] = num5;
  1578. this.changeColor(partsColor, parts_COLOR, array2, maid);
  1579. }
  1580. if (GUI.Button(position5, "+", buttonStyle))
  1581. {
  1582. int num6 = array2[i] + 1;
  1583. num6 = ((num6 > array3[i]) ? array3[i] : num6);
  1584. array2[i] = num6;
  1585. this.changeColor(partsColor, parts_COLOR, array2, maid);
  1586. }
  1587. }
  1588. posX += (float)(80 + fontSize * 2 + 8 + fontSize * 2 + 8);
  1589. }
  1590. }
  1591. }
  1592. // Token: 0x06000041 RID: 65 RVA: 0x00006CA4 File Offset: 0x00004EA4
  1593. private void changeColor(MaidParts.PartsColor partsColor, MaidParts.PARTS_COLOR partsColorType, int[] values, Maid maid)
  1594. {
  1595. partsColor.m_nMainHue = values[0];
  1596. partsColor.m_nMainChroma = values[1];
  1597. partsColor.m_nMainBrightness = values[2];
  1598. partsColor.m_nMainContrast = values[3];
  1599. partsColor.m_nShadowRate = values[4];
  1600. partsColor.m_nShadowHue = values[5];
  1601. partsColor.m_nShadowChroma = values[6];
  1602. partsColor.m_nShadowBrightness = values[7];
  1603. partsColor.m_nShadowContrast = values[8];
  1604. maid.Parts.SetPartsColor(partsColorType, partsColor);
  1605. if (partsColorType == MaidParts.PARTS_COLOR.EYE_L && this._selectedEyeClorType == 0)
  1606. {
  1607. partsColor.m_nMainHue = values[0];
  1608. partsColor.m_nMainChroma = values[1];
  1609. partsColor.m_nMainBrightness = values[2];
  1610. partsColor.m_nMainContrast = values[3];
  1611. partsColor.m_nShadowRate = values[4];
  1612. partsColor.m_nShadowHue = values[5];
  1613. partsColor.m_nShadowChroma = values[6];
  1614. partsColor.m_nShadowBrightness = values[7];
  1615. partsColor.m_nShadowContrast = values[8];
  1616. maid.Parts.SetPartsColor(MaidParts.PARTS_COLOR.EYE_R, partsColor);
  1617. }
  1618. }
  1619. // Token: 0x06000042 RID: 66 RVA: 0x00006D8C File Offset: 0x00004F8C
  1620. public void LoadMenuFiles(bool isInit = false)
  1621. {
  1622. try
  1623. {
  1624. List<SMenuInfo> menuItems = new List<SMenuInfo>();
  1625. Dictionary<string, MenuInfo> dictionary = new Dictionary<string, MenuInfo>();
  1626. if (!isInit)
  1627. {
  1628. using (List<SMenuInfo>.Enumerator enumerator = Config.Instance.MenuItems.GetEnumerator())
  1629. {
  1630. while (enumerator.MoveNext())
  1631. {
  1632. SMenuInfo smenuInfo = enumerator.Current;
  1633. if (!dictionary.ContainsKey(smenuInfo.FileName))
  1634. {
  1635. dictionary.Add(smenuInfo.FileName, new MenuInfo(smenuInfo));
  1636. }
  1637. }
  1638. goto IL_CA;
  1639. }
  1640. }
  1641. this._mpnMenuListDictionary = new Dictionary<MPN, List<MenuInfo>>();
  1642. foreach (object obj in Enum.GetValues(typeof(MPN)))
  1643. {
  1644. MPN key = (MPN)obj;
  1645. this._mpnMenuListDictionary.Add(key, new List<MenuInfo>());
  1646. }
  1647. IL_CA:
  1648. if (dictionary.Count == 0)
  1649. {
  1650. Console.Write("PropMyItem:準備中...");
  1651. }
  1652. Dictionary<string, string> dictionary2 = new Dictionary<string, string>();
  1653. foreach (string text in UserConfig.Instance.FavList)
  1654. {
  1655. if (!dictionary2.ContainsKey(text))
  1656. {
  1657. dictionary2.Add(text.ToLower(), text);
  1658. }
  1659. }
  1660. Dictionary<string, string> dictionary3 = new Dictionary<string, string>();
  1661. foreach (string text2 in UserConfig.Instance.ColorLockList)
  1662. {
  1663. if (!dictionary3.ContainsKey(text2))
  1664. {
  1665. dictionary3.Add(text2.ToLower(), text2);
  1666. }
  1667. }
  1668. List<MenuInfo> list = new List<MenuInfo>();
  1669. this.GetMainMenuFiles(ref list, dictionary, dictionary2, dictionary3, ref menuItems);
  1670. this.GetModFiles(ref list, dictionary, dictionary2, dictionary3, ref menuItems);
  1671. this.SetVariationMenu(dictionary2, dictionary3, ref list);
  1672. this.sort(false, true);
  1673. this.setColorSet();
  1674. Config.Instance.MenuItems = menuItems;
  1675. Config.Instance.Save();
  1676. if (dictionary.Count == 0)
  1677. {
  1678. Console.WriteLine("PropMyItem:完了");
  1679. }
  1680. this._selectedFolder = 0;
  1681. this._selectedMPN = MPN.null_mpn;
  1682. this._selectedCategory = -1;
  1683. this._selectedItem = null;
  1684. this._selectedVariationItem = null;
  1685. this._selectedPresetList.Clear();
  1686. this._selectedItem = null;
  1687. this._selectedVariationItem = null;
  1688. this._scrollPosition.y = 0f;
  1689. MPN selectedMPN = MPN.head;
  1690. if (this._categoryMPNDic.TryGetValue(this._folders[this._selectedFolder].Categories[0], out selectedMPN))
  1691. {
  1692. this._selectedMPN = selectedMPN;
  1693. }
  1694. this._selectedCategory = 0;
  1695. }
  1696. catch (Exception value)
  1697. {
  1698. Console.WriteLine(value);
  1699. }
  1700. }
  1701. // Token: 0x06000043 RID: 67 RVA: 0x00007088 File Offset: 0x00005288
  1702. private void sort(bool isFilePath, bool isColorNumber)
  1703. {
  1704. Comparison<MenuInfo> comparator = (a, b) =>
  1705. {
  1706. if (isFilePath)
  1707. {
  1708. if (a.IsMod && !b.IsMod)
  1709. {
  1710. return 1;
  1711. }
  1712. if (!a.IsMod && b.IsMod)
  1713. {
  1714. return -1;
  1715. }
  1716. if (a.IsMod && b.IsMod)
  1717. {
  1718. return string.Compare(a.FilePath, b.FilePath);
  1719. }
  1720. }
  1721. if ((int)a.Priority != (int)b.Priority)
  1722. {
  1723. return (int)a.Priority - (int)b.Priority;
  1724. }
  1725. return string.Compare(a.ItemName, b.ItemName);
  1726. };
  1727. foreach (MPN key in this._mpnMenuListDictionary.Keys)
  1728. {
  1729. List<MenuInfo> list = this._mpnMenuListDictionary[key];
  1730. list.Sort(comparator);
  1731. if (isColorNumber)
  1732. {
  1733. foreach (MenuInfo menuInfo in this._mpnMenuListDictionary[key])
  1734. {
  1735. if (menuInfo.VariationMenuList.Count > 1)
  1736. {
  1737. menuInfo.VariationMenuList.Sort(delegate (MenuInfo a, MenuInfo b)
  1738. {
  1739. if (a.ColorNumber != b.ColorNumber)
  1740. {
  1741. return a.ColorNumber - b.ColorNumber;
  1742. }
  1743. return string.Compare(a.FileName, b.FileName);
  1744. });
  1745. }
  1746. }
  1747. }
  1748. }
  1749. }
  1750. // Token: 0x06000044 RID: 68 RVA: 0x000071A0 File Offset: 0x000053A0
  1751. private void GetMainMenuFiles(ref List<MenuInfo> variationMenuList, Dictionary<string, MenuInfo> loadItems, Dictionary<string, string> favDic, Dictionary<string, string> colorLockDic, ref List<SMenuInfo> saveItems)
  1752. {
  1753. this._menuList.Clear();
  1754. string[] files = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.menu", SearchOption.AllDirectories);
  1755. Dictionary<string, string> dictionary = new Dictionary<string, string>();
  1756. foreach (string text in files)
  1757. {
  1758. string key = Path.GetFileName(text).ToLower();
  1759. if (!dictionary.ContainsKey(key))
  1760. {
  1761. dictionary.Add(key, text);
  1762. }
  1763. }
  1764. List<string> list = new List<string>();
  1765. MenuDataBase database = GameMain.Instance.MenuDataBase;
  1766. // foreach (string text2 in menuFiles)
  1767. for (int i = 0; i < database.GetDataSize(); i++)
  1768. {
  1769. database.SetIndex(i);
  1770. string menuFile = database.GetMenuFileName();
  1771. ParseMainMenuFile(menuFile, list, ref variationMenuList, loadItems, dictionary, favDic, colorLockDic, ref saveItems);
  1772. }
  1773. foreach (string menuFile in GameUty.ModOnlysMenuFiles)
  1774. {
  1775. ParseMainMenuFile(menuFile, list, ref variationMenuList, loadItems, dictionary, favDic, colorLockDic, ref saveItems);
  1776. }
  1777. }
  1778. // lmao
  1779. private void ParseMainMenuFile(string menuFile, List<string> list, ref List<MenuInfo> variationMenuList, Dictionary<string, MenuInfo> loadItems, Dictionary<string, string> dictionary, Dictionary<string, string> favDic, Dictionary<string, string> colorLockDic, ref List<SMenuInfo> saveItems)
  1780. {
  1781. ReadOnlyDictionary<string, bool> havePartsItems = GameMain.Instance.CharacterMgr.status.havePartsItems;
  1782. try
  1783. {
  1784. if (menuFile.IndexOf("_i_man_") != 0 && menuFile.IndexOf("mbody") != 0 && menuFile.IndexOf("mhead") != 0 && !(Path.GetExtension(menuFile) != ".menu"))
  1785. {
  1786. string fileName = Path.GetFileName(menuFile);
  1787. this._menuList.Add(fileName.ToLower());
  1788. if (fileName.Contains("cv_pattern"))
  1789. {
  1790. this._myPatternList.Add(fileName.ToLower());
  1791. }
  1792. if (!list.Contains(fileName))
  1793. {
  1794. MenuInfo menuInfo = null;
  1795. if (!loadItems.TryGetValue(fileName, out menuInfo))
  1796. {
  1797. menuInfo = MenuModParser.ParseMenu(menuFile);
  1798. }
  1799. if (menuInfo != null && menuInfo.MPN != MPN.null_mpn)
  1800. {
  1801. menuInfo.FileName = fileName;
  1802. if (havePartsItems.ContainsKey(fileName))
  1803. {
  1804. menuInfo.IsShopTarget = true;
  1805. }
  1806. else
  1807. {
  1808. menuInfo.IsShopTarget = false;
  1809. }
  1810. string filePath = menuFile;
  1811. if (dictionary.TryGetValue(fileName, out filePath))
  1812. {
  1813. menuInfo.IsMod = true;
  1814. menuInfo.FilePath = filePath;
  1815. }
  1816. else
  1817. {
  1818. menuInfo.IsMod = false;
  1819. menuInfo.FilePath = fileName;
  1820. }
  1821. string empty = string.Empty;
  1822. if (this._menuMPNCategoryDic.TryGetValue(menuInfo.MPN, out empty))
  1823. {
  1824. menuInfo.CategoryName = empty;
  1825. }
  1826. list.Add(fileName);
  1827. if (!string.IsNullOrEmpty(menuInfo.IconName))
  1828. {
  1829. if (Regex.IsMatch(menuFile, "_z\\d{1,4}") || menuFile.Contains("_zurashi") || menuFile.Contains("_mekure") || menuFile.Contains("_porori") || menuFile.Contains("_back"))
  1830. {
  1831. variationMenuList.Add(menuInfo);
  1832. }
  1833. else
  1834. {
  1835. if (favDic.ContainsKey(menuInfo.FileName))
  1836. {
  1837. menuInfo.IsFavorite = true;
  1838. }
  1839. if (colorLockDic.ContainsKey(menuInfo.FileName))
  1840. {
  1841. menuInfo.IsColorLock = true;
  1842. }
  1843. menuInfo.ColorNumber = 0;
  1844. menuInfo.VariationMenuList.Add(menuInfo);
  1845. this._mpnMenuListDictionary[menuInfo.MPN].Add(menuInfo);
  1846. }
  1847. }
  1848. saveItems.Add(new SMenuInfo(menuInfo));
  1849. }
  1850. }
  1851. }
  1852. }
  1853. catch (Exception)
  1854. {
  1855. }
  1856. }
  1857. // Token: 0x06000045 RID: 69 RVA: 0x00007484 File Offset: 0x00005684
  1858. private void GetModFiles(ref List<MenuInfo> variationMenuList, Dictionary<string, MenuInfo> loadItems, Dictionary<string, string> favDic, Dictionary<string, string> colorLockDic, ref List<SMenuInfo> saveItems)
  1859. {
  1860. List<string> list = new List<string>();
  1861. string[] files = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.mod", SearchOption.AllDirectories);
  1862. Dictionary<string, string> dictionary = new Dictionary<string, string>();
  1863. foreach (string text in files)
  1864. {
  1865. string fileName = Path.GetFileName(text);
  1866. if (!dictionary.ContainsKey(fileName))
  1867. {
  1868. list.Add(text);
  1869. dictionary.Add(fileName, text);
  1870. }
  1871. }
  1872. foreach (string text2 in list)
  1873. {
  1874. try
  1875. {
  1876. if (Path.GetExtension(text2) == ".mod")
  1877. {
  1878. MenuInfo menuInfo = null;
  1879. string fileName2 = Path.GetFileName(text2);
  1880. if (!loadItems.TryGetValue(fileName2, out menuInfo))
  1881. {
  1882. menuInfo = MenuModParser.parseMod(text2);
  1883. }
  1884. menuInfo.FileName = fileName2;
  1885. menuInfo.IsShopTarget = false;
  1886. menuInfo.IsMod = true;
  1887. menuInfo.IsOfficialMOD = true;
  1888. menuInfo.FilePath = text2;
  1889. string empty = string.Empty;
  1890. if (this._menuMPNCategoryDic.TryGetValue(menuInfo.MPN, out empty))
  1891. {
  1892. menuInfo.CategoryName = empty;
  1893. }
  1894. string text3 = fileName2.ToLower();
  1895. if (Regex.IsMatch(text3, "_z\\d{1,4}") || text3.Contains("_porori") || text3.Contains("_zurashi") || text3.Contains("_mekure") || text3.Contains("_back"))
  1896. {
  1897. variationMenuList.Add(menuInfo);
  1898. }
  1899. else
  1900. {
  1901. if (favDic.ContainsKey(menuInfo.FileName.ToLower()))
  1902. {
  1903. menuInfo.IsFavorite = true;
  1904. }
  1905. if (colorLockDic.ContainsKey(menuInfo.FileName.ToLower()))
  1906. {
  1907. menuInfo.IsColorLock = true;
  1908. }
  1909. menuInfo.ColorNumber = 0;
  1910. menuInfo.VariationMenuList.Add(menuInfo);
  1911. this._mpnMenuListDictionary[menuInfo.MPN].Add(menuInfo);
  1912. }
  1913. saveItems.Add(new SMenuInfo(menuInfo));
  1914. }
  1915. }
  1916. catch (Exception ex)
  1917. {
  1918. Console.WriteLine(ex.StackTrace);
  1919. }
  1920. }
  1921. }
  1922. // Token: 0x06000046 RID: 70 RVA: 0x000076B4 File Offset: 0x000058B4
  1923. private void SetVariationMenu(Dictionary<string, string> favDic, Dictionary<string, string> colorLockDic, ref List<MenuInfo> variationMenuList)
  1924. {
  1925. List<MenuInfo> list = new List<MenuInfo>();
  1926. List<MenuInfo> list2 = new List<MenuInfo>();
  1927. foreach (MenuInfo menuInfo in variationMenuList)
  1928. {
  1929. string fileName = Path.GetFileName(menuInfo.FileName.ToLower());
  1930. int colorNumber = 0;
  1931. string[] array = Regex.Split(fileName, "_z\\d{1,4}");
  1932. if (array.Length > 1)
  1933. {
  1934. int.TryParse(array[1].Remove(0, 3).Split(new char[]
  1935. {
  1936. '.',
  1937. '_'
  1938. })[0], out colorNumber);
  1939. }
  1940. menuInfo.ColorNumber = colorNumber;
  1941. string text = Regex.Replace(fileName, "_z\\d{1,4}", "");
  1942. text = Regex.Replace(text, "_zurashi\\d{0,4}", "");
  1943. text = Regex.Replace(text, "_mekure\\d{0,4}", "");
  1944. text = Regex.Replace(text, "_porori\\d{0,4}", "");
  1945. text = Regex.Replace(text, "_back\\d{0,4}", "");
  1946. text = text.Replace("_i.", "_i_.");
  1947. if (this._mpnMenuListDictionary.TryGetValue(menuInfo.MPN, out list))
  1948. {
  1949. bool flag = false;
  1950. foreach (MenuInfo menuInfo2 in list)
  1951. {
  1952. if (menuInfo2.FileName.IndexOf(text, StringComparison.OrdinalIgnoreCase) == 0)
  1953. {
  1954. flag = true;
  1955. menuInfo2.VariationMenuList.Add(menuInfo);
  1956. break;
  1957. }
  1958. }
  1959. if (!flag)
  1960. {
  1961. if (favDic.ContainsKey(menuInfo.FileName.ToLower()))
  1962. {
  1963. menuInfo.IsFavorite = true;
  1964. }
  1965. if (colorLockDic.ContainsKey(menuInfo.FileName.ToLower()))
  1966. {
  1967. menuInfo.IsColorLock = true;
  1968. }
  1969. menuInfo.ColorNumber = 0;
  1970. menuInfo.VariationMenuList.Add(menuInfo);
  1971. list2.Add(menuInfo);
  1972. }
  1973. }
  1974. }
  1975. foreach (MenuInfo menuInfo3 in list2)
  1976. {
  1977. this._mpnMenuListDictionary[menuInfo3.MPN].Add(menuInfo3);
  1978. }
  1979. }
  1980. // Token: 0x06000047 RID: 71 RVA: 0x00007918 File Offset: 0x00005B18
  1981. private void setColorSet()
  1982. {
  1983. foreach (MPN key in this._mpnMenuListDictionary.Keys)
  1984. {
  1985. foreach (MenuInfo menuInfo in this._mpnMenuListDictionary[key])
  1986. {
  1987. List<MenuInfo> list = new List<MenuInfo>();
  1988. list.AddRange(menuInfo.VariationMenuList);
  1989. foreach (MenuInfo menuInfo2 in list)
  1990. {
  1991. if (!string.IsNullOrEmpty(menuInfo2.ColorSetMenuName))
  1992. {
  1993. List<MenuInfo> list2 = new List<MenuInfo>();
  1994. List<MenuInfo> list3 = new List<MenuInfo>();
  1995. if (this._mpnMenuListDictionary.TryGetValue(menuInfo2.ColorSetMPN, out list3))
  1996. {
  1997. string pattern = Regex.Replace(menuInfo2.ColorSetMenuName, ".", new MatchEvaluator(CommonUtil.WildCardMatchEvaluator));
  1998. foreach (MenuInfo menuInfo3 in list3)
  1999. {
  2000. if (Regex.IsMatch(menuInfo3.FileName, pattern, RegexOptions.IgnoreCase))
  2001. {
  2002. list2.Add(menuInfo3);
  2003. }
  2004. }
  2005. }
  2006. menuInfo2.ColorSetMenuList.AddRange(list2);
  2007. }
  2008. }
  2009. }
  2010. }
  2011. }
  2012. private bool _menuFilesReady = false;
  2013. // Token: 0x04000028 RID: 40
  2014. private int _sceneLevel;
  2015. // Token: 0x04000029 RID: 41
  2016. private Rect _windowRect;
  2017. // Token: 0x0400002A RID: 42
  2018. private AutoShoesHide _autoShoesHide = new AutoShoesHide();
  2019. // Token: 0x0400002B RID: 43
  2020. private bool _isMinimum;
  2021. // Token: 0x0400002C RID: 44
  2022. private bool _isVisible;
  2023. // Token: 0x0400002D RID: 45
  2024. private bool _isPluginKeyChange;
  2025. // Token: 0x0400002E RID: 46
  2026. private bool _isShowSetting;
  2027. // Token: 0x0400002F RID: 47
  2028. private bool _isShowFilterSetting;
  2029. // Token: 0x04000030 RID: 48
  2030. private string _selectedFilterText = string.Empty;
  2031. // Token: 0x04000031 RID: 49
  2032. private Vector2 _scrollFilterPosition;
  2033. // Token: 0x04000032 RID: 50
  2034. private Vector2 _categoryScrollPosition;
  2035. // Token: 0x04000033 RID: 51
  2036. private Vector2 _scrollPosition;
  2037. // Token: 0x04000034 RID: 52
  2038. private Vector2 _colorItemScrollPosition;
  2039. // Token: 0x04000035 RID: 53
  2040. private List<PropMyItem.FolderMenu> _folders = new List<PropMyItem.FolderMenu>();
  2041. // Token: 0x04000036 RID: 54
  2042. private int _selectedMaid;
  2043. // Token: 0x04000037 RID: 55
  2044. private int _selectedFolder;
  2045. // Token: 0x04000038 RID: 56
  2046. private MPN _selectedMPN;
  2047. // Token: 0x04000039 RID: 57
  2048. private int _selectedCategory = -1;
  2049. // Token: 0x0400003A RID: 58
  2050. private MenuInfo _selectedItem;
  2051. // Token: 0x0400003B RID: 59
  2052. private MenuInfo _selectedVariationItem;
  2053. // Token: 0x0400003C RID: 60
  2054. private Dictionary<string, MPN> _categoryMPNDic = new Dictionary<string, MPN>();
  2055. // Token: 0x0400003D RID: 61
  2056. private Dictionary<MPN, string> _menuMPNCategoryDic = new Dictionary<MPN, string>();
  2057. // Token: 0x0400003E RID: 62
  2058. private List<CharacterMgr.Preset> _selectedPresetList = new List<CharacterMgr.Preset>();
  2059. // Token: 0x0400003F RID: 63
  2060. private int _selectedFilter;
  2061. // Token: 0x04000040 RID: 64
  2062. private bool _isFavFilter;
  2063. // Token: 0x04000041 RID: 65
  2064. public Dictionary<MPN, List<MenuInfo>> _mpnMenuListDictionary = new Dictionary<MPN, List<MenuInfo>>();
  2065. // Token: 0x04000042 RID: 66
  2066. private int _selectedEyeClorType;
  2067. // Token: 0x04000043 RID: 67
  2068. private bool _isFreeColor;
  2069. // Token: 0x04000044 RID: 68
  2070. private bool _isForcedInit;
  2071. // Token: 0x04000045 RID: 69
  2072. private bool _isStartUpLoadead;
  2073. // Token: 0x04000046 RID: 70
  2074. private Dictionary<MPN, string> presetRestoreDic_ = new Dictionary<MPN, string>();
  2075. // Token: 0x04000047 RID: 71
  2076. private List<string> _menuList = new List<string>();
  2077. // Token: 0x0400004A RID: 74
  2078. private CharacterMgr.PresetType _selectedPresetType = CharacterMgr.PresetType.All;
  2079. // Token: 0x0400004B RID: 75
  2080. private SavePreset _savepreset = new SavePreset();
  2081. // Token: 0x0400004C RID: 76
  2082. private List<string> _myPatternList = new List<string>();
  2083. // Token: 0x02000010 RID: 16
  2084. private class FolderMenu
  2085. {
  2086. // Token: 0x0600006B RID: 107 RVA: 0x000085F9 File Offset: 0x000067F9
  2087. public FolderMenu(string name, string[] categories)
  2088. {
  2089. this.Name = name;
  2090. this.Categories = categories;
  2091. }
  2092. // Token: 0x04000070 RID: 112
  2093. public string Name = string.Empty;
  2094. // Token: 0x04000071 RID: 113
  2095. public string[] Categories;
  2096. }
  2097. }
  2098. }