guiProfiles.cs 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2013 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. function AppCore::SetProfileColors(%this)
  23. {
  24. %this.color[1] = "43 43 43 255";
  25. %this.color[2] = "81 92 102 255";
  26. %this.color[3] = "224 224 224 255";
  27. %this.color[4] = "54 135 196 255";
  28. %this.color[5] = "245 210 50 255";
  29. %this.color[6] = "196 54 71 255";
  30. }
  31. function AppCore::SetProfileFont(%this)
  32. {
  33. if ($platform $= "windows")
  34. %this.platformFontType = "share tech mono";
  35. else if ($platform $= "Android")
  36. %this.platformFontType = "Droid";
  37. else
  38. %this.platformFontType = "monaco";
  39. if ($platform $= "ios")
  40. %this.platformFontSize = 18;
  41. else if ($platform $= "Android")
  42. %this.platformFontSize = 14;
  43. else
  44. %this.platformFontSize = 12;
  45. }
  46. function AppCore::AdjustColorValue(%this, %color, %percent)
  47. {
  48. %red = getWord(%color, 0);
  49. %green = getWord(%color, 1);
  50. %blue = getWord(%color, 2);
  51. %alpha = getWord(%color, 3);
  52. %largest = mGetMax(%red, mGetMax(%blue, %green));
  53. %currentValue = %largest / 255;
  54. %fullRed = %red / %currentValue;
  55. %fullGreen = %green / %currentValue;
  56. %fullBlue = %blue / %currentValue;
  57. %newValue = %currentValue += (%percent/100);
  58. %newValue = mClamp(%newValue, 0, 100);
  59. %newColor = mRound(mClamp((%fullRed * %newValue), 0, 255)) SPC
  60. mRound(mClamp((%fullGreen * %newValue), 0, 255)) SPC
  61. mRound(mClamp((%fullBlue * %newValue), 0, 255)) SPC %alpha;
  62. return %newColor;
  63. }
  64. function AppCore::SetColorAlpha(%this, %color, %newAlpha)
  65. {
  66. %red = getWord(%color, 0);
  67. %green = getWord(%color, 1);
  68. %blue = getWord(%color, 2);
  69. return %red SPC %green SPC %blue SPC mRound(mClamp(%newAlpha, 0, 255));
  70. }
  71. function AppCore::SafeCreateNamedObject(%this, %name, %object)
  72. {
  73. if(isObject(%name))
  74. {
  75. %originalObject = nameToID(%name);
  76. if(%originalObject.getClassName() !$= %object.getClassName())
  77. {
  78. warn("Attempted to change the class of the named object " @ %name @ "!");
  79. warn("Original Class: " @ %originalObject.getClassName());
  80. warn("New Class: " @ %object.getClassName());
  81. return;
  82. }
  83. %originalObject.assignFieldsFrom(%object);
  84. %object.delete();
  85. }
  86. else
  87. {
  88. %object.setName(%name);
  89. }
  90. }
  91. function AppCore::createGuiProfiles(%this)
  92. {
  93. %this.SetProfileColors();
  94. %this.SetProfileFont();
  95. %this.SafeCreateNamedObject("DefaultCursor", new GuiCursor()
  96. {
  97. hotSpot = "1 1";
  98. renderOffset = "0 0";
  99. bitmapName = "^AppCore/gui/images/cursors/defaultCursor";
  100. });
  101. %this.SafeCreateNamedObject("LeftRightCursor", new GuiCursor()
  102. {
  103. hotSpot = "0.5 0";
  104. renderOffset = "0.5 0.4";
  105. bitmapName = "^AppCore/gui/images/cursors/leftRight";
  106. });
  107. %this.SafeCreateNamedObject("UpDownCursor", new GuiCursor()
  108. {
  109. hotSpot = "1 1";
  110. renderOffset = "0.5 0.5";
  111. bitmapName = "^AppCore/gui/images/cursors/upDown";
  112. });
  113. %this.SafeCreateNamedObject("NWSECursor", new GuiCursor()
  114. {
  115. hotSpot = "1 1";
  116. renderOffset = "0.5 0.5";
  117. bitmapName = "^AppCore/gui/images/cursors/NWSE";
  118. });
  119. %this.SafeCreateNamedObject("NESWCursor", new GuiCursor()
  120. {
  121. hotSpot = "1 1";
  122. renderOffset = "0.5 0.5";
  123. bitmapName = "^AppCore/gui/images/cursors/NESW";
  124. });
  125. %this.SafeCreateNamedObject("MoveCursor", new GuiCursor()
  126. {
  127. hotSpot = "1 1";
  128. renderOffset = "0.5 0.5";
  129. bitmapName = "^AppCore/gui/images/cursors/move";
  130. });
  131. %this.SafeCreateNamedObject("EditCursor", new GuiCursor()
  132. {
  133. hotSpot = "0 0";
  134. renderOffset = "0.5 0.5";
  135. bitmapName = "^AppCore/gui/images/cursors/ibeam";
  136. });
  137. //Changing the default gui profile and border profile might cause engine instability! Consider making a new child profile instead.
  138. %this.SafeCreateNamedObject("GuiDefaultBorderProfile", new GuiBorderProfile()
  139. {
  140. // Default margin
  141. margin = 0;
  142. marginHL = 0;
  143. marginSL = 0;
  144. marginNA = 0;
  145. //Default Border
  146. border = 0;
  147. borderHL = 0;
  148. borderSL = 0;
  149. borderNA = 0;
  150. //Default border color
  151. borderColor = %this.color1;
  152. borderColorHL = %this.AdjustColorValue(%this.color1, 10);
  153. borderColorSL = %this.AdjustColorValue(%this.color1, 10);
  154. borderColorNA = %this.SetColorAlpha(%this.color1, 100);
  155. //Default Padding
  156. padding = 0;
  157. paddingHL = 0;
  158. paddingSL = 0;
  159. paddingNA = 0;
  160. //Default underfill
  161. underfill = true;
  162. });
  163. //See the warning above! You should avoid changing this.
  164. %this.SafeCreateNamedObject("GuiDefaultProfile", new GuiControlProfile()
  165. {
  166. // fill color
  167. fillColor = "0 0 0 0";
  168. // font
  169. fontType = %this.platformFontType;
  170. fontDirectory = expandPath( "^AppCore/fonts" );
  171. fontSize = %this.platformFontSize;
  172. fontColor = "255 255 255 255";
  173. align = center;
  174. vAlign = middle;
  175. cursorColor = "0 0 0 255";
  176. borderDefault = GuiDefaultBorderProfile;
  177. category = "default";
  178. });
  179. %this.SafeCreateNamedObject("GuiBrightBorderProfile", new GuiBorderProfile()
  180. {
  181. border = 2;
  182. borderHL = 2;
  183. borderSL = 2;
  184. borderNA = 2;
  185. borderColor = "255 255 255 50";
  186. borderColorHL = "255 255 255 50";
  187. borderColorSL = "255 255 255 50";
  188. borderColorNA = "255 255 255 50";
  189. underfill = true;
  190. });
  191. %this.SafeCreateNamedObject("GuiDarkBorderProfile", new GuiBorderProfile()
  192. {
  193. border = 2;
  194. borderHL = 2;
  195. borderSL = 2;
  196. borderNA = 2;
  197. borderColor = "0 0 0 50";
  198. borderColorHL = "0 0 0 50";
  199. borderColorSL = "0 0 0 50";
  200. borderColorNA = "0 0 0 50";
  201. underfill = true;
  202. });
  203. %this.SafeCreateNamedObject("GuiPanelProfile", new GuiControlProfile()
  204. {
  205. fillColor = %this.color1;
  206. fillColorHL = %this.AdjustColorValue(%this.color1, 10);
  207. fillColorSL = %this.AdjustColorValue(%this.color1, 15);
  208. fillColorNA = %this.SetColorAlpha(%this.color1, 100);
  209. borderDefault = GuiBrightBorderProfile;
  210. category = "defaultPanel";
  211. });
  212. %this.SafeCreateNamedObject("GuiListBoxBorderProfile", new GuiBorderProfile()
  213. {
  214. margin = 1;
  215. marginHL = 1;
  216. marginSL = 1;
  217. marginNA = 1;
  218. padding = 4;
  219. paddingHL = 4;
  220. paddingSL = 4;
  221. paddingNA = 4;
  222. });
  223. %this.SafeCreateNamedObject("GuiListBoxProfile", new GuiControlProfile()
  224. {
  225. // fill color
  226. fillColor = %this.color1;
  227. fillColorHL = %this.AdjustColorValue(%this.color1, 10);
  228. fillColorSL = %this.color4;
  229. fillColorNA = %this.SetColorAlpha(%this.color1, 100);
  230. align = left;
  231. tab = false;
  232. canKeyFocus = true;
  233. category = "defaultListBox";
  234. fontColor = %this.color3;
  235. fontColorHL = %this.AdjustColorValue(%this.color3, 20);
  236. fontColorSL = %this.AdjustColorValue(%this.color3, 20);
  237. fontColorNA = %this.AdjustColorValue(%this.color3, -30);
  238. borderDefault = GuiListBoxBorderProfile;
  239. });
  240. %this.SafeCreateNamedObject("GuiWindowBorderProfile", new GuiBorderProfile()
  241. {
  242. padding = 10;
  243. paddingHL = 10;
  244. paddingSL = 10;
  245. paddingNA = 4;
  246. });
  247. %this.SafeCreateNamedObject("GuiWindowProfile", new GuiControlProfile()
  248. {
  249. fillColor = %this.AdjustColorValue(%this.color1, 10);
  250. fillColorHL = %this.AdjustColorValue(%this.color1, 12);
  251. fillColorSL = %this.color4;
  252. fillColorNA = %this.color1;
  253. category = "defaultWindow";
  254. align = "Left";
  255. fontColorSL = %this.color5;
  256. borderLeft = GuiWindowBorderProfile;
  257. });
  258. %this.SafeCreateNamedObject("GuiWindowContentBorderProfile", new GuiBorderProfile()
  259. {
  260. borderColor = %this.AdjustColorValue(%this.color1, 10);
  261. borderColorSL = %this.AdjustColorValue(%this.color4, -10);
  262. border = 3;
  263. borderSL = 3;
  264. });
  265. %this.SafeCreateNamedObject("GuiWindowContentProfile", new GuiControlProfile()
  266. {
  267. fillColor = %this.AdjustColorValue(%this.color1, -10);
  268. fillColorSL = %this.AdjustColorValue(%this.color1, -10);
  269. borderDefault = GuiWindowContentBorderProfile;
  270. borderTop = GuiDefaultBorderProfile;
  271. });
  272. %this.SafeCreateNamedObject("GuiWindowButtonBorderProfile", new GuiBorderProfile()
  273. {
  274. margin = 1;
  275. marginHL = 1;
  276. marginSL = 1;
  277. marginNA = 1;
  278. padding = 3;
  279. paddingHL = 3;
  280. paddingSL = 3;
  281. paddingNA = 3;
  282. });
  283. %this.SafeCreateNamedObject("GuiWindowCloseButtonProfile", new GuiControlProfile()
  284. {
  285. fillColor = %this.SetColorAlpha(%this.color1, 150);
  286. fillColorHL = %this.SetColorAlpha(%this.color6, 150);
  287. fillColorSL = %this.AdjustColorValue(%this.color6, 10);
  288. fillColorNA = %this.color1;
  289. fontColor = %this.SetColorAlpha(%this.color3, 150);
  290. fontColorHL = %this.SetColorAlpha(%this.color3, 170);
  291. fontColorSL = %this.color5;
  292. fontColorNA = %this.SetColorAlpha(%this.color3, 150);
  293. borderDefault = GuiWindowButtonBorderProfile;
  294. });
  295. %this.SafeCreateNamedObject("GuiWindowMinButtonProfile", new GuiControlProfile()
  296. {
  297. fillColor = %this.SetColorAlpha(%this.color1, 150);
  298. fillColorHL = %this.SetColorAlpha(%this.color4, 150);
  299. fillColorSL = %this.AdjustColorValue(%this.color4, 10);
  300. fillColorNA = %this.color1;
  301. fontColor = %this.SetColorAlpha(%this.color3, 150);
  302. fontColorHL = %this.SetColorAlpha(%this.color3, 170);
  303. fontColorSL = %this.color5;
  304. fontColorNA = %this.SetColorAlpha(%this.color3, 150);
  305. borderDefault = GuiWindowButtonBorderProfile;
  306. });
  307. %this.SafeCreateNamedObject("GuiWindowMaxButtonProfile", new GuiControlProfile()
  308. {
  309. fillColor = %this.SetColorAlpha(%this.color1, 150);
  310. fillColorHL = %this.SetColorAlpha(%this.color4, 150);
  311. fillColorSL = %this.AdjustColorValue(%this.color4, 10);
  312. fillColorNA = %this.color1;
  313. fontColor = %this.SetColorAlpha(%this.color3, 150);
  314. fontColorHL = %this.SetColorAlpha(%this.color3, 170);
  315. fontColorSL = %this.color5;
  316. fontColorNA = %this.SetColorAlpha(%this.color3, 150);
  317. borderDefault = GuiWindowButtonBorderProfile;
  318. });
  319. %this.SafeCreateNamedObject("GuiTransparentProfile", new GuiControlProfile());
  320. %this.SafeCreateNamedObject("GuiGridProfile", new GuiControlProfile());
  321. %this.SafeCreateNamedObject("GuiChainProfile", new GuiControlProfile());
  322. %this.SafeCreateNamedObject("GuiTabBookProfile", new GuiControlProfile()
  323. {
  324. fillColor = %this.SetColorAlpha(%this.color1, 100);
  325. category = "defaultTabBook";
  326. });
  327. %this.SafeCreateNamedObject("GuiTabProfile", new GuiControlProfile()
  328. {
  329. fontColor = "255 255 255 255";
  330. fontColorHL = "232 240 248 255";
  331. fontColorSL= "255 255 255 255";
  332. fontColorNA = "0 0 0 255";
  333. fillColor = %this.color1;
  334. fillColorHL = %this.AdjustColorValue(%this.color1, 10);
  335. fillColorSL = %this.AdjustColorValue(%this.color1, 15);
  336. fillColorNA = %this.SetColorAlpha(%this.color1, 100);
  337. borderDefault = GuiBrightBorderProfile;
  338. align = Center;
  339. category = "defaultTab";
  340. });
  341. %this.SafeCreateNamedObject("GuiTabPageProfile", new GuiControlProfile()
  342. {
  343. fillColor = %this.color1;
  344. fillColorHL = %this.AdjustColorValue(%this.color1, 10);
  345. fillColorSL = %this.AdjustColorValue(%this.color1, 15);
  346. fillColorNA = %this.SetColorAlpha(%this.color1, 100);
  347. category = "defaultTabPage";
  348. });
  349. %this.SafeCreateNamedObject("GuiSpriteProfile", new GuiControlProfile());
  350. %this.SafeCreateNamedObject("GuiTreeViewProfile", new GuiControlProfile()
  351. {
  352. fontColor = "255 255 255 255";
  353. fontColorHL = "232 240 248 255";
  354. fontColorSL= "255 255 255 255";
  355. fontColorNA = "0 0 0 255";
  356. fillColor = %this.color1;
  357. fillColorHL = %this.AdjustColorValue(%this.color1, 10);
  358. fillColorSL = %this.AdjustColorValue(%this.color1, 15);
  359. fillColorNA = %this.SetColorAlpha(%this.color1, 100);
  360. bitmap = "./images/treeView";
  361. canKeyFocus = true;
  362. autoSizeHeight = true;
  363. });
  364. %this.SafeCreateNamedObject("GuiSolidBorderProfile", new GuiBorderProfile()
  365. {
  366. border = 1;
  367. padding = 10;
  368. paddingHL = 10;
  369. paddingSL = 10;
  370. paddingNA = 10;
  371. });
  372. %this.SafeCreateNamedObject("GuiSolidProfile", new GuiControlProfile()
  373. {
  374. // fill color
  375. fillColor = %this.color1;
  376. fillColorHL = %this.AdjustColorValue(%this.color1, 10);
  377. fillColorSL = %this.AdjustColorValue(%this.color1, 15);
  378. fillColorNA = %this.SetColorAlpha(%this.color1, 100);
  379. borderDefault = GuiSolidBorderProfile;
  380. });
  381. %this.SafeCreateNamedObject("GuiToolTipProfile", new GuiControlProfile()
  382. {
  383. fillColor = %this.SetColorAlpha(%this.color1, 220);
  384. fontColor = %this.color5;
  385. borderDefault = GuiBrightBorderProfile;
  386. });
  387. %this.SafeCreateNamedObject("GuiTextProfile", new GuiControlProfile()
  388. {
  389. fontColor = %this.color3;
  390. align = "left";
  391. autoSizeWidth = false;
  392. autoSizeHeight = false;
  393. returnTab = false;
  394. numbersOnly = false;
  395. cursorColor = "0 0 0 255";
  396. });
  397. %this.SafeCreateNamedObject("GuiTextArrayProfile", new GuiControlProfile()
  398. {
  399. fontColor = %this.color3;
  400. align = "left";
  401. autoSizeWidth = false;
  402. autoSizeHeight = false;
  403. returnTab = false;
  404. numbersOnly = false;
  405. cursorColor = "0 0 0 255";
  406. fontColorHL = %this.color3;
  407. fillColorHL = %this.AdjustColorValue(%this.color1, 10);
  408. });
  409. %this.SafeCreateNamedObject("GuiTextRightProfile", new GuiControlProfile()
  410. {
  411. fontColor = %this.color3;
  412. align = "right";
  413. autoSizeWidth = false;
  414. autoSizeHeight = false;
  415. returnTab = false;
  416. numbersOnly = false;
  417. cursorColor = "0 0 0 255";
  418. });
  419. %this.SafeCreateNamedObject("GuiCheckBoxProfile", new GuiControlProfile()
  420. {
  421. fillColor = %this.color3;
  422. fillColorHL = %this.AdjustColorValue(%this.color3, -10);
  423. fillColorSL = %this.color4;
  424. fillColorNA = %this.SetColorAlpha(%this.color3, 100);
  425. fontColor = %this.color3;
  426. fontColorHL = %this.AdjustColorValue(%this.color5, -10);
  427. fontColorSL = %this.color5;
  428. fontColorNA = %this.SetColorAlpha(%this.color3, 100);
  429. align = "left";
  430. tab = true;
  431. borderDefault = "GuiBrightBorderProfile";
  432. borderRight = "GuiDarkBorderProfile";
  433. borderBottom = "GuiDarkBorderProfile";
  434. });
  435. %this.SafeCreateNamedObject("GuiTextEditProfile", new GuiControlProfile()
  436. {
  437. fillColor = "232 240 248 255";
  438. fillColorHL = "242 250 255 255";
  439. fillColorNA = "127 127 127 52";
  440. fillColorTextSL = "251 170 0 255";
  441. fontColor = "27 59 95 255";
  442. fontColorHL = "27 59 95 255";
  443. fontColorNA = "0 0 0 52";
  444. fontColorSL = "0 0 0 255";
  445. textOffset = "5 2";
  446. tab = false;
  447. canKeyFocus = true;
  448. returnTab = true;
  449. });
  450. %this.SafeCreateNamedObject("GuiScrollTrackProfile", new GuiControlProfile()
  451. {
  452. fillColor = %this.color1;
  453. fillColorHL = %this.color1;
  454. fillColorSL = %this.color1;
  455. fillColorNA = %this.color1;
  456. });
  457. %this.SafeCreateNamedObject("GuiScrollBrightBorderProfile", new GuiBorderProfile()
  458. {
  459. padding = 3;
  460. paddingHL = 2;
  461. paddingSL = 2;
  462. paddingNA = 3;
  463. border = 1;
  464. borderHL = 2;
  465. borderSL = 2;
  466. borderNA = 1;
  467. borderColor = "255 255 255 50";
  468. borderColorHL = "255 255 255 50";
  469. borderColorSL = "255 255 255 50";
  470. borderColorNA = "255 255 255 50";
  471. underfill = true;
  472. });
  473. %this.SafeCreateNamedObject("GuiScrollDarkBorderProfile", new GuiBorderProfile()
  474. {
  475. padding = 3;
  476. paddingHL = 2;
  477. paddingSL = 2;
  478. paddingNA = 3;
  479. border = 1;
  480. borderHL = 2;
  481. borderSL = 2;
  482. borderNA = 1;
  483. borderColor = "0 0 0 20";
  484. borderColorHL = "0 0 0 20";
  485. borderColorSL = "0 0 0 20";
  486. borderColorNA = "0 0 0 20";
  487. underfill = true;
  488. });
  489. %this.SafeCreateNamedObject("GuiScrollThumbProfile", new GuiControlProfile()
  490. {
  491. fillColor = %this.color3;
  492. fillColorHL = %this.AdjustColorValue(%this.color3, 10);
  493. fillColorSL = %this.color4;
  494. fillColorNA = %this.SetColorAlpha(%this.color3, 100);
  495. borderDefault = GuiScrollBrightBorderProfile;
  496. borderRight = GuiScrollDarkBorderProfile;
  497. borderBottom = GuiScrollDarkBorderProfile;
  498. });
  499. %this.SafeCreateNamedObject("GuiScrollArrowProfile", new GuiControlProfile()
  500. {
  501. fillColor = %this.color3;
  502. fillColorHL = %this.AdjustColorValue(%this.color3, 10);
  503. fillColorSL = %this.color4;
  504. fillColorNA = %this.SetColorAlpha(%this.color3, 100);
  505. fontColor = "0 0 0 100";
  506. fontColorHL = "0 0 0 150";
  507. fontColorSL = %this.color5;
  508. fontColorNA = "0 0 0 50";
  509. borderDefault = GuiScrollBrightBorderProfile;
  510. borderRight = GuiScrollDarkBorderProfile;
  511. borderBottom = GuiScrollDarkBorderProfile;
  512. });
  513. %this.SafeCreateNamedObject("GuiScrollProfile", new GuiControlProfile()
  514. {
  515. fillColor = %this.color2;
  516. borderDefault = GuiDefaultBorderProfile;
  517. });
  518. %this.SafeCreateNamedObject("GuiTransparentScrollProfile", new GuiControlProfile()
  519. {
  520. fillColor = "255 255 255 0";
  521. fillColor = %this.color2;
  522. borderDefault = GuiDefaultBorderProfile;
  523. });
  524. %this.SafeCreateNamedObject("GuiDarkButtonBorderProfile", new GuiBorderProfile()
  525. {
  526. padding = 4;
  527. paddingHL = 4;
  528. paddingSL = 4;
  529. paddingNA = 4;
  530. border = 3;
  531. borderHL = 3;
  532. borderSL = 3;
  533. borderNA = 3;
  534. borderColor = "0 0 0 50";
  535. borderColorHL = "0 0 0 50";
  536. borderColorSL = "0 0 0 50";
  537. borderColorNA = "0 0 0 50";
  538. underfill = true;
  539. });
  540. %this.SafeCreateNamedObject("GuiBrightButtonBorderProfile", new GuiBorderProfile()
  541. {
  542. padding = 4;
  543. paddingHL = 4;
  544. paddingSL = 4;
  545. paddingNA = 4;
  546. border = 3;
  547. borderHL = 3;
  548. borderSL = 3;
  549. borderNA = 3;
  550. borderColor = "255 255 255 50";
  551. borderColorHL = "255 255 255 50";
  552. borderColorSL = "255 255 255 50";
  553. borderColorNA = "255 255 255 50";
  554. underfill = true;
  555. });
  556. %this.SafeCreateNamedObject("GuiButtonProfile", new GuiControlProfile()
  557. {
  558. fillColor = %this.color3;
  559. fillColorHL = %this.AdjustColorValue(%this.color3, 10);
  560. fillColorSL = %this.AdjustColorValue(%this.color3, 15);
  561. fillColorNA = %this.SetColorAlpha(%this.color3, 80);
  562. fontColor = %this.color1;
  563. fontColorHL = %this.color4;
  564. fontColorSL = %this.color1;
  565. fontColorNA = %this.SetColorAlpha(%this.color1, 100);
  566. align = center;
  567. vAlign = middle;
  568. borderLeft = GuiBrightButtonBorderProfile;
  569. borderRight = GuiDarkButtonBorderProfile;
  570. borderTop = GuiBrightButtonBorderProfile;
  571. borderBottom = GuiDarkButtonBorderProfile;
  572. canKeyFocus = true;
  573. tab = true;
  574. });
  575. %this.SafeCreateNamedObject("GuiRadioProfile", new GuiControlProfile()
  576. {
  577. fillColor = %this.color3;
  578. fillColorHL = %this.AdjustColorValue(%this.color3, -10);
  579. fillColorSL = %this.color4;
  580. fillColorNA = %this.SetColorAlpha(%this.color3, 100);
  581. fontColor = %this.color3;
  582. fontColorHL = %this.AdjustColorValue(%this.color5, -10);
  583. fontColorSL = %this.color5;
  584. fontColorNA = %this.SetColorAlpha(%this.color3, 100);
  585. align = "left";
  586. tab = true;
  587. borderLeft = GuiBrightButtonBorderProfile;
  588. borderRight = GuiDarkButtonBorderProfile;
  589. borderTop = GuiBrightButtonBorderProfile;
  590. borderBottom = GuiDarkButtonBorderProfile;
  591. canKeyFocus = true;
  592. tab = true;
  593. });
  594. %this.SafeCreateNamedObject("GuiHeaderProfile", new GuiControlProfile()
  595. {
  596. fillColor = %this.color2;
  597. fillColorHL = %this.AdjustColorValue(%this.color1, 10);
  598. fillColorSL = %this.AdjustColorValue(%this.color1, 15);
  599. fillColorNA = %this.SetColorAlpha(%this.color1, 100);
  600. fontColor = %this.color3;
  601. fontSize = %this.platformFontSize + 2;
  602. align = "left";
  603. borderDefault = "GuiBrightBorderProfile";
  604. borderRight = "GuiDarkBorderProfile";
  605. borderBottom = "GuiDarkBorderProfile";
  606. });
  607. %this.SafeCreateNamedObject("GuiLabelProfile", new GuiControlProfile()
  608. {
  609. fontColor = "255 255 255 255";
  610. fontSize = %this.platformFontSize;
  611. align = "left";
  612. });
  613. %this.SafeCreateNamedObject("GuiDragAndDropProfile", new GuiControlProfile()
  614. {
  615. fillColor = %this.SetColorAlpha(%this.color4, 50);
  616. fontColor = %this.color5;
  617. });
  618. %this.SafeCreateNamedObject("GuiProgressBorderProfile", new GuiBorderProfile()
  619. {
  620. padding = 2;
  621. paddingHL = 0;
  622. paddingSL = 0;
  623. border = 2;
  624. borderHL = 2;
  625. borderSL = 2;
  626. margin = 0;
  627. marginHL = 3;
  628. marginSL = 3;
  629. borderColor = %this.AdjustColorValue(%this.color1, -10);
  630. borderColorHL = "255 255 255 50";
  631. borderColorSL = "255 255 255 50";
  632. });
  633. %this.SafeCreateNamedObject("GuiProgressDarkBorderProfile", new GuiBorderProfile()
  634. {
  635. padding = 2;
  636. paddingHL = 0;
  637. paddingSL = 0;
  638. border = 2;
  639. borderHL = 2;
  640. borderSL = 2;
  641. margin = 0;
  642. marginHL = 3;
  643. marginSL = 3;
  644. borderColor = %this.AdjustColorValue(%this.color1, -10);
  645. borderColorHL = "0 0 0 50";
  646. borderColorSL = "0 0 0 50";
  647. });
  648. %this.SafeCreateNamedObject("GuiProgressProfile", new GuiControlProfile()
  649. {
  650. fillColor = %this.color1;
  651. fillColorHL = %this.color4;
  652. fillColorSL = %this.AdjustColorValue(%this.color4, 10);
  653. fontColorHL = %this.color3;
  654. fontColorSL = %this.color5;
  655. borderDefault = GuiProgressBorderProfile;
  656. borderBottom = GuiProgressDarkBorderProfile;
  657. borderRight = GuiProgressDarkBorderProfile;
  658. });
  659. %this.SafeCreateNamedObject("GuiDropDownDarkBorderProfile", new GuiBorderProfile()
  660. {
  661. padding = 4;
  662. paddingHL = 4;
  663. paddingSL = 4;
  664. paddingNA = 4;
  665. border = 2;
  666. borderHL = 2;
  667. borderSL = 2;
  668. borderNA = 2;
  669. borderColor = "0 0 0 50";
  670. borderColorHL = "0 0 0 50";
  671. borderColorSL = "0 0 0 50";
  672. borderColorNA = "0 0 0 50";
  673. underfill = true;
  674. });
  675. %this.SafeCreateNamedObject("GuiDropDownBrightBorderProfile", new GuiBorderProfile()
  676. {
  677. padding = 4;
  678. paddingHL = 4;
  679. paddingSL = 4;
  680. paddingNA = 4;
  681. border = 2;
  682. borderHL = 2;
  683. borderSL = 2;
  684. borderNA = 2;
  685. borderColor = "255 255 255 50";
  686. borderColorHL = "255 255 255 50";
  687. borderColorSL = "255 255 255 50";
  688. borderColorNA = "255 255 255 50";
  689. underfill = true;
  690. });
  691. %this.SafeCreateNamedObject("GuiDropDownProfile", new GuiControlProfile()
  692. {
  693. // fill color
  694. fillColor = %this.AdjustColorValue(%this.color3, -15);
  695. fillColorHL = %this.AdjustColorValue(%this.color3, -8);
  696. fillColorSL = %this.color4;
  697. fillColorNA = %this.SetColorAlpha(%this.color3, 100);
  698. fontColor = %this.color1;
  699. fontColorHL = %this.color1;
  700. fontColorSL = %this.color3;
  701. fontColorNA = %this.SetColorAlpha(%this.color1, 100);
  702. align = "left";
  703. tab = true;
  704. canKeyFocus = true;
  705. borderDefault = GuiDropDownBrightBorderProfile;
  706. borderRight = GuiDropDownDarkBorderProfile;
  707. borderBottom = GuiDropDownDarkBorderProfile;
  708. category = "dropDown";
  709. });
  710. %this.SafeCreateNamedObject("GuiMenuBarBorderProfile", new GuiBorderProfile()
  711. {
  712. padding = 2;
  713. });
  714. %this.SafeCreateNamedObject("GuiMenuBarProfile", new GuiControlProfile()
  715. {
  716. fillColor = %this.AdjustColorValue(%this.color1, -7);
  717. canKeyFocus = true;
  718. borderDefault = GuiMenuBarBorderProfile;
  719. category = "defaultMenuBar";
  720. });
  721. %this.SafeCreateNamedObject("GuiMenuBorderProfile", new GuiBorderProfile()
  722. {
  723. margin = 2;
  724. marginHL = 0;
  725. marginSL = 0;
  726. marginNA = 2;
  727. border = 0;
  728. borderHL = 2;
  729. borderSL = 2;
  730. borderNA = 0;
  731. borderColorHL = "255 255 255 30";
  732. borderColorSL = %this.color4;
  733. });
  734. %this.SafeCreateNamedObject("GuiMenuBottomBorderProfile", new GuiBorderProfile()
  735. {
  736. fillColor = %this.AdjustColorValue(%this.color1, -7);
  737. canKeyFocus = true;
  738. borderDefault = GuiMenuBarBorderProfile;
  739. category = "defaultMenuBar";
  740. paddingSL = 2;
  741. marginSL = 0;
  742. borderSL = 0;
  743. });
  744. %this.SafeCreateNamedObject("GuiMenuSideBorderProfile", new GuiBorderProfile()
  745. {
  746. border = 0;
  747. borderHL = 2;
  748. borderSL = 2;
  749. borderNA = 0;
  750. padding = 10;
  751. paddingHL = 8;
  752. paddingSL = 8;
  753. paddingNA = 10;
  754. borderColorHL = "255 255 255 30";
  755. borderColorSL = %this.color4;
  756. });
  757. %this.SafeCreateNamedObject("GuiMenuProfile", new GuiControlProfile()
  758. {
  759. fillColor = "0 0 0 0";
  760. fillColorHL = "255 255 255 10";
  761. fillColorSL = %this.AdjustColorValue(%this.color4, -15);
  762. fillColorNA = "0 0 0 0";
  763. borderDefault = GuiMenuBorderProfile;
  764. borderLeft = GuiMenuSideBorderProfile;
  765. borderRight = GuiMenuSideBorderProfile;
  766. borderBottom = GuiMenuBottomBorderProfile;
  767. category = "defaultMenuBar";
  768. fontColor = %this.color3;
  769. fontColorHL = %this.AdjustColorValue(%this.color3, 10);
  770. fontColorSL = %this.color3;
  771. fontColorNA = %this.SetColorAlpha(%this.color3, 100);
  772. });
  773. %this.SafeCreateNamedObject("GuiMenuContentVertBorderProfile", new GuiBorderProfile()
  774. {
  775. border = 2;
  776. padding = 4;
  777. borderColor = %this.color4;
  778. });
  779. %this.SafeCreateNamedObject("GuiMenuContentSideBorderProfile", new GuiBorderProfile()
  780. {
  781. border = 2;
  782. padding = 0;
  783. borderColor = %this.color4;
  784. });
  785. %this.SafeCreateNamedObject("GuiMenuContentProfile", new GuiControlProfile()
  786. {
  787. fillColor = %this.AdjustColorValue(%this.color1, -5);
  788. borderDefault = GuiMenuContentSideBorderProfile;
  789. borderTop = GuiMenuContentVertBorderProfile;
  790. borderBottom = GuiMenuContentVertBorderProfile;
  791. });
  792. %this.SafeCreateNamedObject("GuiMenuItemBorderTopProfile", new GuiBorderProfile()
  793. {
  794. padding = 6;
  795. paddingHL = 6;
  796. paddingSL = 0;
  797. paddingNA = 6;
  798. marginSL = 4;
  799. borderSL = 1;
  800. borderColorSL = "0 0 0 50";
  801. });
  802. %this.SafeCreateNamedObject("GuiMenuItemBorderBottomProfile", new GuiBorderProfile()
  803. {
  804. padding = 6;
  805. paddingHL = 6;
  806. paddingSL = 0;
  807. paddingNA = 6;
  808. marginSL = 4;
  809. borderSL = 1;
  810. borderColorSL = "255 255 255 50";
  811. });
  812. %this.SafeCreateNamedObject("GuiMenuItemBorderSideProfile", new GuiBorderProfile()
  813. {
  814. padding = 6;
  815. paddingHL = 6;
  816. paddingSL = 0;
  817. paddingNA = 6;
  818. marginSL = 0;
  819. borderSL = 0;
  820. paddingSL = 6;
  821. });
  822. %this.SafeCreateNamedObject("GuiMenuItemProfile", new GuiControlProfile()
  823. {
  824. fillColor = %this.AdjustColorValue(%this.color1, -5);
  825. fillColorHL = %this.AdjustColorValue(%this.color4, -15);
  826. fillColorNA = %this.color1;
  827. align = left;
  828. fontColor = %this.color3;
  829. fontColorHL = %this.AdjustColorValue(%this.color3, 10);
  830. fontColorNA = %this.SetColorAlpha(%this.color3, 150);
  831. borderDefault = GuiMenuItemBorderSideProfile;
  832. borderTop = GuiMenuItemBorderTopProfile;
  833. borderBottom = GuiMenuItemBorderBottomProfile;
  834. });
  835. %this.SafeCreateNamedObject("GuiTextEditProfile", new GuiControlProfile()
  836. {
  837. fillColor = %this.color4;
  838. fillColorHL = %this.AdjustColorValue(%this.color4, 10);
  839. fillColorSL = %this.color4;
  840. fillColorNA = %this.AdjustColorValue(%this.color4, 80);
  841. fillColorTextSL = %this.color5;
  842. fontColor = %this.SetColorAlpha(%this.color1, 220);
  843. fontColorHL = %this.AdjustColorValue(%this.color1, 10);
  844. fontColorSL = %this.color1;
  845. fontColorNA = %this.SetColorAlpha(%this.color1, 100);
  846. fontColorTextSL = %this.color1;
  847. align = left;
  848. vAlign = middle;
  849. cursorColor = %this.color2;
  850. tab = true;
  851. canKeyFocus = true;
  852. returnTab = true;
  853. });
  854. %this.SafeCreateNamedObject("GuiButtonProfile", new GuiControlProfile()
  855. {
  856. fillColor = %this.color4;
  857. fillColorHL = %this.AdjustColorValue(%this.color4, 10);
  858. fillColorSL = %this.color5;
  859. fillColorNA = %this.SetColorAlpha(%this.color4, 80);
  860. fontColor = %this.color1;
  861. fontColorHL = %this.AdjustColorValue(%this.color1, 10);
  862. fontColorSL = %this.color1;
  863. fontColorNA = %this.SetColorAlpha(%this.color1, 100);
  864. align = center;
  865. vAlign = middle;
  866. borderLeft = GuiBrightBorderProfile;
  867. borderRight = GuiDarkBorderProfile;
  868. borderTop = GuiBrightBorderProfile;
  869. borderBottom = GuiDarkBorderProfile;
  870. canKeyFocus = true;
  871. tab = true;
  872. });
  873. %this.SafeCreateNamedObject("GuiCheckboxProfile", new GuiControlProfile()
  874. {
  875. fillColor = %this.color4;
  876. fillColorHL = %this.AdjustColorValue(%this.color4, 10);
  877. fillColorSL = %this.color5;
  878. fillColorNA = %this.SetColorAlpha(%this.color4, 80);
  879. fontColor = %this.color1;
  880. fontColorHL = %this.AdjustColorValue(%this.color1, 10);
  881. fontColorSL = %this.color1;
  882. fontColorNA = %this.SetColorAlpha(%this.color1, 100);
  883. align = center;
  884. vAlign = middle;
  885. borderLeft = GuiBrightBorderProfile;
  886. borderRight = GuiDarkBorderProfile;
  887. borderTop = GuiBrightBorderProfile;
  888. borderBottom = GuiDarkBorderProfile;
  889. canKeyFocus = true;
  890. tab = true;
  891. });
  892. %this.SafeCreateNamedObject("GuiColorPopupBorderProfile", new GuiBorderProfile()
  893. {
  894. border = 1;
  895. borderHL = 1;
  896. borderSL = 1;
  897. borderNA = 1;
  898. borderColor = %this.AdjustColorValue(%this.color1, -5);
  899. borderColorHL = %this.AdjustColorValue(%this.color1, -5);
  900. borderColorSL = %this.AdjustColorValue(%this.color1, -5);
  901. borderColorNA = %this.AdjustColorValue(%this.color1, -5);
  902. padding = 3;
  903. paddingHL = 3;
  904. paddingSL = 3;
  905. paddingNA = 3;
  906. });
  907. %this.SafeCreateNamedObject("GuiColorPopupProfile", new GuiControlProfile()
  908. {
  909. fillColor = %this.color1;
  910. fillColorHL = %this.color1;
  911. fillColorSL = %this.color1;
  912. fillColorNA = %this.color1;
  913. borderDefault = GuiColorPopupBorderProfile;
  914. });
  915. %this.SafeCreateNamedObject("GuiColorPickerBorderProfile", new GuiBorderProfile()
  916. {
  917. border = 1;
  918. borderHL = 1;
  919. borderSL = 1;
  920. borderNA = 1;
  921. borderColor = %this.color1;
  922. borderColorHL = %this.color2;
  923. borderColorSL = %this.color4;
  924. borderColorNA = %this.color1;
  925. padding = 1;
  926. paddingHL = 1;
  927. paddingSL = 1;
  928. paddingNA = 1;
  929. margin = 1;
  930. marginHL = 1;
  931. marginSL = 1;
  932. marginNA = 1;
  933. });
  934. %this.SafeCreateNamedObject("GuiColorPickerProfile", new GuiControlProfile()
  935. {
  936. fillColor = "0 0 0 0";
  937. fillColorHL = "0 0 0 0";
  938. fillColorSL = "0 0 0 0";
  939. fillColorNA = "0 0 0 0";
  940. borderDefault = GuiColorPickerBorderProfile;
  941. tab = false;
  942. canKeyFocus = true;
  943. underfill = true;
  944. });
  945. %this.SafeCreateNamedObject("GuiColorSelectorBorderProfile", new GuiBorderProfile()
  946. {
  947. border = 1;
  948. borderHL = 1;
  949. borderSL = 1;
  950. borderColor = "0 0 0 180";
  951. borderColorHL = "0 0 0 190";
  952. borderColorSL = "0 0 0 220";
  953. //Margin and padding are used to determine the size of the selector ring in the normal state.
  954. padding = 2;//Radius of the outer circle minus the inner circle. The meat of the donut.
  955. margin = 1;//Radius of the inner circle plus 1. This is different from the normal use of the margin.
  956. });
  957. %this.SafeCreateNamedObject("GuiColorSelectorProfile", new GuiControlProfile()
  958. {
  959. fillColor = "240 240 240 255";
  960. fillColorHL = "250 250 250 255";
  961. fillColorSL = %this.color5;
  962. borderDefault = GuiColorSelectorBorderProfile;
  963. });
  964. }