PropMyItem.cs 102 KB

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