BsEditorGUI.cpp 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821
  1. #include "BsEditorGUI.h"
  2. #include "BsGUIElementStyle.h"
  3. #include "BsGUILabel.h"
  4. #include "BsGUIButton.h"
  5. #include "BsGUIInputBox.h"
  6. #include "BsGUIToggle.h"
  7. #include "BsGUIColor.h"
  8. #include "BsTextSprite.h"
  9. #include "BsSpriteTexture.h"
  10. #include "BsGUITreeViewEditBox.h"
  11. #include "CmFont.h"
  12. #include "CmFontImportOptions.h"
  13. #include "CmImporter.h"
  14. #include "CmRTTIType.h"
  15. #include "CmFileSystem.h"
  16. namespace BansheeEngine
  17. {
  18. const WString EditorGUI::DefaultFontPath = L"arial.ttf";
  19. const UINT32 EditorGUI::DefaultFontSize = 10;
  20. const WString EditorGUI::DefaultFolder = L"..\\..\\..\\..\\Data\\Editor\\Skin\\";
  21. const WString EditorGUI::WindowBackgroundTexture = L"WindowBgTile.psd";
  22. const WString EditorGUI::ButtonNormalTex = L"ButtonNormal.psd";
  23. const WString EditorGUI::ButtonHoverTex = L"ButtonHover.psd";
  24. const WString EditorGUI::ButtonActiveTex = L"ButtonActive.psd";
  25. const WString EditorGUI::ToggleNormalTex = L"ToggleNormal.psd";
  26. const WString EditorGUI::ToggleHoverTex = L"ToggleHover.psd";
  27. const WString EditorGUI::ToggleActiveTex = L"ToggleActive.psd";
  28. const WString EditorGUI::ToggleNormalOnTex = L"ToggleOnNormal.psd";
  29. const WString EditorGUI::ToggleHoverOnTex = L"ToggleOnHover.psd";
  30. const WString EditorGUI::ToggleActiveOnTex = L"ToggleOnActive.psd";
  31. const WString EditorGUI::ObjectDropBtnNormalTex = L"ObjectFieldDropNormal.psd";
  32. const WString EditorGUI::ObjectDropBtnNormalOnTex = L"ObjectFieldDropNormalOn.psd";
  33. const WString EditorGUI::ObjectClearBtnNormalTex = L"ObjectFieldBtnNormal.psd";
  34. const WString EditorGUI::ObjectClearBtnHoverTex = L"ObjectFieldBtnHover.psd";
  35. const WString EditorGUI::ObjectClearBtnActiveTex = L"ObjectFieldBtnActive.psd";
  36. const WString EditorGUI::FoldoutOpenNormalTex = L"FoldoutOpenNormal.psd";
  37. const WString EditorGUI::FoldoutOpenHoverTex = L"FoldoutOpenHover.psd";
  38. const WString EditorGUI::FoldoutClosedNormalTex = L"FoldoutClosedNormal.psd";
  39. const WString EditorGUI::FoldoutClosedHoverTex = L"FoldoutClosedHover.psd";
  40. const WString EditorGUI::FoldoutBackgroundTex = L"FoldoutBackground.psd";
  41. const WString EditorGUI::WindowFrameNormal = L"WindowFrameNormal.psd";
  42. const WString EditorGUI::WindowFrameFocused = L"WindowFrameFocused.psd";
  43. const WString EditorGUI::WindowTitleBarBg = L"WindowTitleBarBg.psd";
  44. const WString EditorGUI::WindowCloseButtonNormal = L"WindowCloseBtnNormal.psd";
  45. const WString EditorGUI::WindowCloseButtonHover = L"WindowCloseBtnHover.psd";
  46. const WString EditorGUI::WindowMinButtonNormal = L"WindowMaxBtnNormal.psd";
  47. const WString EditorGUI::WindowMinButtonHover = L"WindowMaxBtnHover.psd";
  48. const WString EditorGUI::WindowMaxButtonNormal = L"WindowMinBtnNormal.psd";
  49. const WString EditorGUI::WindowMaxButtonHover = L"WindowMinBtnHover.psd";
  50. const WString EditorGUI::TabbedBarBtnNormal = L"TabbedButtonNormal.psd";
  51. const WString EditorGUI::TabbedBarBtnActive = L"TabbedButtonActive.psd";
  52. const WString EditorGUI::InputBoxNormalTex = L"InputBoxNormal.psd";
  53. const WString EditorGUI::InputBoxHoverTex = L"InputBoxHover.psd";
  54. const WString EditorGUI::InputBoxFocusedTex = L"InputBoxFocused.psd";
  55. const WString EditorGUI::ScrollBarUpNormalTex = L"ScrollBarUpNormal.psd";
  56. const WString EditorGUI::ScrollBarUpHoverTex = L"ScrollBarUpHover.psd";
  57. const WString EditorGUI::ScrollBarUpActiveTex = L"ScrollBarUpActive.psd";
  58. const WString EditorGUI::ScrollBarDownNormalTex = L"ScrollBarDownNormal.psd";
  59. const WString EditorGUI::ScrollBarDownHoverTex = L"ScrollBarDownHover.psd";
  60. const WString EditorGUI::ScrollBarDownActiveTex = L"ScrollBarDownActive.psd";
  61. const WString EditorGUI::ScrollBarLeftNormalTex = L"ScrollBarLeftNormal.psd";
  62. const WString EditorGUI::ScrollBarLeftHoverTex = L"ScrollBarLeftHover.psd";
  63. const WString EditorGUI::ScrollBarLeftActiveTex = L"ScrollBarLeftActive.psd";
  64. const WString EditorGUI::ScrollBarRightNormalTex = L"ScrollBarRightNormal.psd";
  65. const WString EditorGUI::ScrollBarRightHoverTex = L"ScrollBarRightHover.psd";
  66. const WString EditorGUI::ScrollBarRightActiveTex = L"ScrollBarRightActive.psd";
  67. const WString EditorGUI::ScrollBarHandleHorzNormalTex = L"ScrollBarHorzHandleNormal.psd";
  68. const WString EditorGUI::ScrollBarHandleHorzHoverTex = L"ScrollBarHorzHandleHover.psd";
  69. const WString EditorGUI::ScrollBarHandleHorzActiveTex = L"ScrollBarHorzHandleActive.psd";
  70. const WString EditorGUI::ScrollBarHandleVertNormalTex = L"ScrollBarVertHandleNormal.psd";
  71. const WString EditorGUI::ScrollBarHandleVertHoverTex = L"ScrollBarVertHandleHover.psd";
  72. const WString EditorGUI::ScrollBarHandleVertActiveTex = L"ScrollBarVertHandleActive.psd";
  73. const WString EditorGUI::DropDownBtnNormalTex = L"DropDownNormal.psd";
  74. const WString EditorGUI::DropDownBtnHoverTex = L"DropDownHover.psd";
  75. const WString EditorGUI::DropDownBoxBgTex = L"DropDownBoxBg.psd";
  76. const WString EditorGUI::DropDownBoxEntryNormalTex = L"DropDownButtonNormal.psd";
  77. const WString EditorGUI::DropDownBoxEntryHoverTex = L"DropDownButtonHover.psd";
  78. const WString EditorGUI::DropDownBoxBtnUpNormalTex = L"DropDownBoxBtnUpNormal.psd";
  79. const WString EditorGUI::DropDownBoxBtnUpHoverTex = L"DropDownBoxBtnUpHover.psd";
  80. const WString EditorGUI::DropDownBoxBtnDownNormalTex = L"DropDownBoxBtnDownNormal.psd";
  81. const WString EditorGUI::DropDownBoxBtnDownHoverTex = L"DropDownBoxBtnDownHover.psd";
  82. const WString EditorGUI::DropDownBoxEntryExpNormalTex = L"DropDownExpNormal.psd";
  83. const WString EditorGUI::DropDownBoxEntryExpHoverTex = L"DropDownExpHover.psd";
  84. const WString EditorGUI::DropDownSeparatorTex = L"DropDownSeparator.psd";
  85. const WString EditorGUI::DropDownBoxBtnUpArrowTex = L"DropDownBoxBtnUpArrow.psd";
  86. const WString EditorGUI::DropDownBoxBtnDownArrowTex = L"DropDownBoxBtnDownArrow.psd";
  87. const WString EditorGUI::ScrollBarBgTex = L"ScrollBarBg.psd";
  88. const WString EditorGUI::MenuBarBgTex = L"MenuBarBg.psd";
  89. const WString EditorGUI::MenuBarBtnNormalTex = L"MenuBarButtonNormal.psd";
  90. const WString EditorGUI::MenuBarBtnHoverTex = L"MenuBarButtonHover.psd";
  91. const WString EditorGUI::MenuBarBansheeLogoTex = L"MenuBarBansheeLogo.psd";
  92. const WString EditorGUI::DockSliderNormalTex = L"DockSliderBtn.psd";
  93. const WString EditorGUI::TreeViewExpandButtonOffNormal = L"TreeViewExpandButtonOffNormal.psd";
  94. const WString EditorGUI::TreeViewExpandButtonOffHover = L"TreeViewExpandButtonOffHover.psd";
  95. const WString EditorGUI::TreeViewExpandButtonOnNormal = L"TreeViewExpandButtonOnNormal.psd";
  96. const WString EditorGUI::TreeViewExpandButtonOnHover = L"TreeViewExpandButtonOnHover.psd";
  97. const WString EditorGUI::TreeViewSelectionBackground = L"TreeViewSelectionBackground.psd";
  98. const WString EditorGUI::TreeViewEditBox = L"TreeViewEditBox.psd";
  99. const WString EditorGUI::TreeViewElementHighlight = L"TreeViewElementHighlight.psd";
  100. const WString EditorGUI::TreeViewElementSepHighlight = L"TreeViewElementSepHighlight.psd";
  101. EditorGUI::EditorGUI()
  102. {
  103. // TODO - Normally I want to load this from some file
  104. // Label
  105. // TODO - Instead of importing font every time, try to save a resource and then just load it?
  106. HFont font;
  107. {
  108. WString fontPath = DefaultFolder + DefaultFontPath;
  109. ImportOptionsPtr fontImportOptions = Importer::instance().createImportOptions(fontPath);
  110. if(rtti_is_of_type<FontImportOptions>(fontImportOptions))
  111. {
  112. FontImportOptions* importOptions = static_cast<FontImportOptions*>(fontImportOptions.get());
  113. Vector<BansheeEngine::UINT32>::type fontSizes;
  114. fontSizes.push_back(DefaultFontSize);
  115. importOptions->setFontSizes(fontSizes);
  116. importOptions->setAntialiasing(false);
  117. }
  118. font = Importer::instance().import(fontPath, fontImportOptions);
  119. }
  120. GUIElementStyle labelStyle;
  121. labelStyle.font = font;
  122. labelStyle.fontSize = DefaultFontSize;
  123. labelStyle.fixedWidth = false;
  124. labelStyle.fixedHeight = true;
  125. labelStyle.height = 11;
  126. labelStyle.minWidth = 10;
  127. mSkin.setStyle(GUILabel::getGUITypeName(), labelStyle);
  128. // Window frame
  129. GUIElementStyle windowFrameStyle;
  130. windowFrameStyle.normal.texture = getTexture(WindowFrameNormal);
  131. windowFrameStyle.focused.texture = getTexture(WindowFrameFocused);
  132. windowFrameStyle.border.left = 1;
  133. windowFrameStyle.border.right = 1;
  134. windowFrameStyle.border.top = 1;
  135. windowFrameStyle.border.bottom = 1;
  136. mSkin.setStyle("WindowFrame", windowFrameStyle);
  137. // Button
  138. GUIElementStyle buttonStyle;
  139. buttonStyle.normal.texture = getTexture(ButtonNormalTex);
  140. buttonStyle.hover.texture = getTexture(ButtonHoverTex);
  141. buttonStyle.active.texture = getTexture(ButtonActiveTex);
  142. buttonStyle.border.left = 6;
  143. buttonStyle.border.right = 6;
  144. buttonStyle.border.top = 6;
  145. buttonStyle.border.bottom = 6;
  146. buttonStyle.contentOffset.left = 3;
  147. buttonStyle.contentOffset.right = 3;
  148. buttonStyle.fixedHeight = true;
  149. buttonStyle.height = 15;
  150. buttonStyle.minWidth = 50;
  151. buttonStyle.font = font;
  152. buttonStyle.fontSize = DefaultFontSize;
  153. buttonStyle.textHorzAlign = THA_Center;
  154. buttonStyle.textVertAlign = TVA_Center;
  155. mSkin.setStyle(GUIButton::getGUITypeName(), buttonStyle);
  156. // Toggle
  157. GUIElementStyle toggleStyle;
  158. toggleStyle.normal.texture = getTexture(ToggleNormalTex);
  159. toggleStyle.hover.texture = getTexture(ToggleHoverTex);
  160. toggleStyle.active.texture = getTexture(ToggleActiveTex);
  161. toggleStyle.normalOn.texture = getTexture(ToggleNormalOnTex);
  162. toggleStyle.hoverOn.texture = getTexture(ToggleHoverOnTex);
  163. toggleStyle.activeOn.texture = getTexture(ToggleActiveOnTex);
  164. toggleStyle.fixedHeight = true;
  165. toggleStyle.fixedWidth = true;
  166. toggleStyle.height = 15;
  167. toggleStyle.width = 15;
  168. mSkin.setStyle(GUIToggle::getGUITypeName(), toggleStyle);
  169. // Color
  170. GUIElementStyle colorStyle;
  171. colorStyle.margins.left = 2;
  172. colorStyle.margins.right = 2;
  173. colorStyle.margins.top = 2;
  174. colorStyle.margins.bottom = 2;
  175. colorStyle.fixedHeight = true;
  176. colorStyle.height = 10;
  177. colorStyle.minWidth = 10;
  178. mSkin.setStyle(GUIColor::getGUITypeName(), colorStyle);
  179. // Window background texture
  180. GUIElementStyle windowBgStyle;
  181. windowBgStyle.normal.texture = getTexture(WindowBackgroundTexture);
  182. mSkin.setStyle("WindowBackground", windowBgStyle);
  183. // Window title bar background
  184. GUIElementStyle titleBarBgStyle;
  185. titleBarBgStyle.normal.texture = getTexture(WindowTitleBarBg);
  186. titleBarBgStyle.fixedHeight = true;
  187. titleBarBgStyle.height = 13;
  188. mSkin.setStyle("TitleBarBackground", titleBarBgStyle);
  189. // Tabbed title bar tab button
  190. GUIElementStyle tabbedBarButton;
  191. tabbedBarButton.normal.texture = getTexture(TabbedBarBtnNormal);
  192. tabbedBarButton.hover.texture = getTexture(TabbedBarBtnActive);
  193. tabbedBarButton.active.texture = tabbedBarButton.hover.texture;
  194. tabbedBarButton.normalOn.texture = tabbedBarButton.hover.texture;
  195. tabbedBarButton.hoverOn.texture = tabbedBarButton.hover.texture;
  196. tabbedBarButton.activeOn.texture = tabbedBarButton.hover.texture;
  197. tabbedBarButton.fixedHeight = true;
  198. tabbedBarButton.height = 13;
  199. tabbedBarButton.minWidth = 10;
  200. tabbedBarButton.maxWidth = 110;
  201. tabbedBarButton.font = font;
  202. tabbedBarButton.fontSize = DefaultFontSize;
  203. tabbedBarButton.textHorzAlign = THA_Center;
  204. tabbedBarButton.textVertAlign = TVA_Center;
  205. mSkin.setStyle("TabbedBarBtn", tabbedBarButton);
  206. // Tabbed title bar drag/drop button
  207. GUIElementStyle tabbedBarDropButton;
  208. tabbedBarDropButton.fixedHeight = true;
  209. tabbedBarDropButton.fixedWidth = true;
  210. tabbedBarDropButton.height = 13;
  211. tabbedBarDropButton.width = 6;
  212. mSkin.setStyle("TabbedBarDropArea", tabbedBarDropButton);
  213. // Window minimize button
  214. GUIElementStyle winMinButtonStyle;
  215. winMinButtonStyle.normal.texture = getTexture(WindowMinButtonNormal);
  216. winMinButtonStyle.hover.texture = getTexture(WindowMinButtonHover);
  217. winMinButtonStyle.active.texture = winMinButtonStyle.hover.texture;
  218. winMinButtonStyle.fixedHeight = true;
  219. winMinButtonStyle.fixedWidth = true;
  220. winMinButtonStyle.height = 7;
  221. winMinButtonStyle.width = 8;
  222. mSkin.setStyle("WinMinimizeBtn", winMinButtonStyle);
  223. // Window maximize button
  224. GUIElementStyle winMaxButtonStyle;
  225. winMaxButtonStyle.normal.texture = getTexture(WindowMaxButtonNormal);
  226. winMaxButtonStyle.hover.texture = getTexture(WindowMaxButtonHover);
  227. winMaxButtonStyle.active.texture = winMaxButtonStyle.hover.texture;
  228. winMaxButtonStyle.fixedHeight = true;
  229. winMaxButtonStyle.fixedWidth = true;
  230. winMaxButtonStyle.height = 8;
  231. winMaxButtonStyle.width = 8;
  232. mSkin.setStyle("WinMaximizeBtn", winMaxButtonStyle);
  233. // Window close button
  234. GUIElementStyle winCloseButtonStyle;
  235. winCloseButtonStyle.normal.texture = getTexture(WindowCloseButtonNormal);
  236. winCloseButtonStyle.hover.texture = getTexture(WindowCloseButtonHover);
  237. winCloseButtonStyle.active.texture = winCloseButtonStyle.hover.texture;
  238. winCloseButtonStyle.fixedHeight = true;
  239. winCloseButtonStyle.fixedWidth = true;
  240. winCloseButtonStyle.height = 7;
  241. winCloseButtonStyle.width = 8;
  242. mSkin.setStyle("WinCloseBtn", winCloseButtonStyle);
  243. // Input box
  244. GUIElementStyle inputBoxStyle;
  245. inputBoxStyle.normal.texture = getTexture(InputBoxNormalTex);
  246. inputBoxStyle.hover.texture = getTexture(InputBoxHoverTex);
  247. inputBoxStyle.focused.texture = getTexture(InputBoxFocusedTex);
  248. inputBoxStyle.active.texture = inputBoxStyle.normal.texture;
  249. inputBoxStyle.border.left = 1;
  250. inputBoxStyle.border.right = 1;
  251. inputBoxStyle.border.top = 1;
  252. inputBoxStyle.border.bottom = 1;
  253. inputBoxStyle.contentOffset.left = 3;
  254. inputBoxStyle.contentOffset.right = 3;
  255. inputBoxStyle.contentOffset.top = 2;
  256. inputBoxStyle.contentOffset.bottom = 2;
  257. inputBoxStyle.fixedHeight = true;
  258. inputBoxStyle.height = 15;
  259. inputBoxStyle.minWidth = 10;
  260. inputBoxStyle.font = font;
  261. inputBoxStyle.fontSize = DefaultFontSize;
  262. inputBoxStyle.textHorzAlign = THA_Left;
  263. inputBoxStyle.textVertAlign = TVA_Top;
  264. mSkin.setStyle(GUIInputBox::getGUITypeName(), inputBoxStyle);
  265. // Foldout
  266. GUIElementStyle foldoutBtnStyle;
  267. foldoutBtnStyle.normal.texture = getTexture(FoldoutClosedNormalTex);
  268. foldoutBtnStyle.hover.texture = getTexture(FoldoutClosedHoverTex);
  269. foldoutBtnStyle.active.texture = foldoutBtnStyle.hover.texture;
  270. foldoutBtnStyle.normalOn.texture = getTexture(FoldoutOpenNormalTex);
  271. foldoutBtnStyle.hoverOn.texture = getTexture(FoldoutOpenHoverTex);
  272. foldoutBtnStyle.activeOn.texture = foldoutBtnStyle.hoverOn.texture;
  273. foldoutBtnStyle.fixedHeight = true;
  274. foldoutBtnStyle.fixedWidth = true;
  275. foldoutBtnStyle.height = 8;
  276. foldoutBtnStyle.width = 8;
  277. mSkin.setStyle("FoldoutButton", foldoutBtnStyle);
  278. GUIElementStyle foldoutBackgroundStyle;
  279. foldoutBackgroundStyle.normal.texture = getTexture(FoldoutBackgroundTex);
  280. mSkin.setStyle("FoldoutBackground", foldoutBackgroundStyle);
  281. /************************************************************************/
  282. /* SCROLL BAR */
  283. /************************************************************************/
  284. // Up button
  285. GUIElementStyle scrollUpBtnStyle;
  286. scrollUpBtnStyle.normal.texture = getTexture(ScrollBarUpNormalTex);
  287. scrollUpBtnStyle.hover.texture = getTexture(ScrollBarUpHoverTex);
  288. scrollUpBtnStyle.active.texture = getTexture(ScrollBarUpActiveTex);
  289. scrollUpBtnStyle.fixedHeight = true;
  290. scrollUpBtnStyle.fixedWidth = true;
  291. scrollUpBtnStyle.height = 4;
  292. scrollUpBtnStyle.width = 8;
  293. mSkin.setStyle("ScrollUpBtn", scrollUpBtnStyle);
  294. // Down button
  295. GUIElementStyle scrollDownBtnStyle;
  296. scrollDownBtnStyle.normal.texture = getTexture(ScrollBarDownNormalTex);
  297. scrollDownBtnStyle.hover.texture = getTexture(ScrollBarDownHoverTex);
  298. scrollDownBtnStyle.active.texture = getTexture(ScrollBarDownActiveTex);
  299. scrollDownBtnStyle.fixedHeight = true;
  300. scrollDownBtnStyle.fixedWidth = true;
  301. scrollDownBtnStyle.height = 4;
  302. scrollDownBtnStyle.width = 8;
  303. mSkin.setStyle("ScrollDownBtn", scrollDownBtnStyle);
  304. // Left button
  305. GUIElementStyle scrollLeftBtnStyle;
  306. scrollLeftBtnStyle.normal.texture = getTexture(ScrollBarLeftNormalTex);
  307. scrollLeftBtnStyle.hover.texture = getTexture(ScrollBarLeftHoverTex);
  308. scrollLeftBtnStyle.active.texture = getTexture(ScrollBarLeftActiveTex);
  309. scrollLeftBtnStyle.fixedHeight = true;
  310. scrollLeftBtnStyle.fixedWidth = true;
  311. scrollLeftBtnStyle.height = 8;
  312. scrollLeftBtnStyle.width = 4;
  313. mSkin.setStyle("ScrollLeftBtn", scrollLeftBtnStyle);
  314. // Right button
  315. GUIElementStyle scrollRightBtnStyle;
  316. scrollRightBtnStyle.normal.texture = getTexture(ScrollBarRightNormalTex);
  317. scrollRightBtnStyle.hover.texture = getTexture(ScrollBarRightHoverTex);
  318. scrollRightBtnStyle.active.texture = getTexture(ScrollBarRightActiveTex);
  319. scrollRightBtnStyle.fixedHeight = true;
  320. scrollRightBtnStyle.fixedWidth = true;
  321. scrollRightBtnStyle.height = 8;
  322. scrollRightBtnStyle.width = 4;
  323. mSkin.setStyle("ScrollRightBtn", scrollRightBtnStyle);
  324. // Horizontal handle
  325. GUIElementStyle scrollBarHorzBtnStyle;
  326. scrollBarHorzBtnStyle.normal.texture = getTexture(ScrollBarHandleHorzNormalTex);
  327. scrollBarHorzBtnStyle.hover.texture = getTexture(ScrollBarHandleHorzHoverTex);
  328. scrollBarHorzBtnStyle.active.texture = getTexture(ScrollBarHandleHorzActiveTex);
  329. scrollBarHorzBtnStyle.fixedHeight = true;
  330. scrollBarHorzBtnStyle.fixedWidth = true;
  331. scrollBarHorzBtnStyle.height = 6;
  332. scrollBarHorzBtnStyle.width = 4;
  333. mSkin.setStyle("ScrollBarHorzBtn", scrollBarHorzBtnStyle);
  334. // Vertical handle
  335. GUIElementStyle scrollBarVertBtnStyle;
  336. scrollBarVertBtnStyle.normal.texture = getTexture(ScrollBarHandleVertNormalTex);
  337. scrollBarVertBtnStyle.hover.texture = getTexture(ScrollBarHandleVertHoverTex);
  338. scrollBarVertBtnStyle.active.texture = getTexture(ScrollBarHandleVertActiveTex);
  339. scrollBarVertBtnStyle.fixedHeight = true;
  340. scrollBarVertBtnStyle.fixedWidth = true;
  341. scrollBarVertBtnStyle.height = 4;
  342. scrollBarVertBtnStyle.width = 6;
  343. mSkin.setStyle("ScrollBarVertBtn", scrollBarVertBtnStyle);
  344. HSpriteTexture scrollBarBgPtr = getTexture(ScrollBarBgTex);
  345. // Vertical scroll bar
  346. GUIElementStyle vertScrollBarStyle;
  347. vertScrollBarStyle.normal.texture = scrollBarBgPtr;
  348. vertScrollBarStyle.hover.texture = scrollBarBgPtr;
  349. vertScrollBarStyle.active.texture = scrollBarBgPtr;
  350. vertScrollBarStyle.fixedHeight = false;
  351. vertScrollBarStyle.fixedWidth = true;
  352. vertScrollBarStyle.minHeight = 16;
  353. vertScrollBarStyle.width = 8;
  354. mSkin.setStyle("ScrollBarVert", vertScrollBarStyle);
  355. // Horizontal scroll bar
  356. GUIElementStyle horzScrollBarStyle;
  357. horzScrollBarStyle.normal.texture = scrollBarBgPtr;
  358. horzScrollBarStyle.hover.texture = scrollBarBgPtr;
  359. horzScrollBarStyle.active.texture = scrollBarBgPtr;
  360. horzScrollBarStyle.fixedHeight = true;
  361. horzScrollBarStyle.fixedWidth = false;
  362. horzScrollBarStyle.minWidth = 16;
  363. horzScrollBarStyle.height = 8;
  364. mSkin.setStyle("ScrollBarHorz", horzScrollBarStyle);
  365. /************************************************************************/
  366. /* DROP DOWN BOX */
  367. /************************************************************************/
  368. // ListBox button
  369. GUIElementStyle dropDownListStyle;
  370. dropDownListStyle.normal.texture = getTexture(DropDownBtnNormalTex);
  371. dropDownListStyle.hover.texture = getTexture(DropDownBtnHoverTex);
  372. dropDownListStyle.active.texture = dropDownListStyle.hover.texture;
  373. dropDownListStyle.normalOn.texture = dropDownListStyle.hover.texture;
  374. dropDownListStyle.hoverOn.texture = dropDownListStyle.hover.texture;
  375. dropDownListStyle.activeOn.texture = dropDownListStyle.hover.texture;
  376. dropDownListStyle.fixedHeight = true;
  377. dropDownListStyle.fixedWidth = false;
  378. dropDownListStyle.height = 13;
  379. dropDownListStyle.width = 30;
  380. dropDownListStyle.contentOffset.left = 3;
  381. dropDownListStyle.contentOffset.right = 11;
  382. dropDownListStyle.contentOffset.top = 1;
  383. dropDownListStyle.contentOffset.bottom = 1;
  384. dropDownListStyle.border.left = 1;
  385. dropDownListStyle.border.right = 10;
  386. dropDownListStyle.border.top = 1;
  387. dropDownListStyle.border.bottom = 1;
  388. dropDownListStyle.font = font;
  389. dropDownListStyle.fontSize = DefaultFontSize;
  390. dropDownListStyle.textHorzAlign = THA_Left;
  391. dropDownListStyle.textVertAlign = TVA_Top;
  392. mSkin.setStyle("ListBox", dropDownListStyle);
  393. // DropDown scroll up button arrow
  394. HTexture dropDownBtnScrollUpArrow = getTexture(DropDownBoxBtnUpArrowTex);
  395. GUIElementStyle dropDownScrollUpBtnArrowStyle;
  396. dropDownScrollUpBtnArrowStyle.normal.texture = getTexture(DropDownBoxBtnUpArrowTex);
  397. dropDownScrollUpBtnArrowStyle.hover.texture = dropDownScrollUpBtnArrowStyle.normal.texture;
  398. dropDownScrollUpBtnArrowStyle.active.texture = dropDownScrollUpBtnArrowStyle.hover.texture;
  399. dropDownScrollUpBtnArrowStyle.fixedHeight = true;
  400. dropDownScrollUpBtnArrowStyle.fixedWidth = false;
  401. dropDownScrollUpBtnArrowStyle.height = 7;
  402. dropDownScrollUpBtnArrowStyle.width = 30;
  403. dropDownScrollUpBtnArrowStyle.border.left = 1;
  404. dropDownScrollUpBtnArrowStyle.border.right = 1;
  405. dropDownScrollUpBtnArrowStyle.border.top = 1;
  406. dropDownScrollUpBtnArrowStyle.border.bottom = 1;
  407. mSkin.setStyle("ListBoxScrollUpBtnArrow", dropDownScrollUpBtnArrowStyle);
  408. mSkin.setStyle("MenuBarScrollUpBtnArrow", dropDownScrollUpBtnArrowStyle);
  409. mSkin.setStyle("ContextMenuScrollUpBtnArrow", dropDownScrollUpBtnArrowStyle);
  410. // DropDown scroll up button
  411. GUIElementStyle dropDownScrollUpBtnStyle;
  412. dropDownScrollUpBtnStyle.normal.texture = getTexture(DropDownBoxBtnUpNormalTex);
  413. dropDownScrollUpBtnStyle.hover.texture = getTexture(DropDownBoxBtnUpHoverTex);
  414. dropDownScrollUpBtnStyle.active.texture = dropDownScrollUpBtnStyle.hover.texture;
  415. dropDownScrollUpBtnStyle.fixedHeight = true;
  416. dropDownScrollUpBtnStyle.fixedWidth = false;
  417. dropDownScrollUpBtnStyle.height = 7;
  418. dropDownScrollUpBtnStyle.width = 30;
  419. dropDownScrollUpBtnStyle.border.left = 1;
  420. dropDownScrollUpBtnStyle.border.right = 1;
  421. dropDownScrollUpBtnStyle.border.top = 1;
  422. dropDownScrollUpBtnStyle.border.bottom = 1;
  423. mSkin.setStyle("ListBoxScrollUpBtn", dropDownScrollUpBtnStyle);
  424. mSkin.setStyle("MenuBarScrollUpBtn", dropDownScrollUpBtnStyle);
  425. mSkin.setStyle("ContextMenuScrollUpBtn", dropDownScrollUpBtnStyle);
  426. // DropDown scroll down button arrow
  427. GUIElementStyle dropDownScrollDownBtnArrowStyle;
  428. dropDownScrollDownBtnArrowStyle.normal.texture = getTexture(DropDownBoxBtnDownArrowTex);
  429. dropDownScrollDownBtnArrowStyle.hover.texture = dropDownScrollDownBtnArrowStyle.normal.texture;
  430. dropDownScrollDownBtnArrowStyle.active.texture = dropDownScrollDownBtnArrowStyle.hover.texture;
  431. dropDownScrollDownBtnArrowStyle.fixedHeight = true;
  432. dropDownScrollDownBtnArrowStyle.fixedWidth = false;
  433. dropDownScrollDownBtnArrowStyle.height = 7;
  434. dropDownScrollDownBtnArrowStyle.width = 30;
  435. dropDownScrollDownBtnArrowStyle.border.left = 1;
  436. dropDownScrollDownBtnArrowStyle.border.right = 1;
  437. dropDownScrollDownBtnArrowStyle.border.top = 1;
  438. dropDownScrollDownBtnArrowStyle.border.bottom = 1;
  439. mSkin.setStyle("ListBoxScrollDownBtnArrow", dropDownScrollDownBtnArrowStyle);
  440. mSkin.setStyle("MenuBarScrollDownBtnArrow", dropDownScrollDownBtnArrowStyle);
  441. mSkin.setStyle("ContextMenuScrollDownBtnArrow", dropDownScrollDownBtnArrowStyle);
  442. // DropDown scroll down button
  443. GUIElementStyle dropDownScrollDownBtnStyle;
  444. dropDownScrollDownBtnStyle.normal.texture = getTexture(DropDownBoxBtnDownNormalTex);
  445. dropDownScrollDownBtnStyle.hover.texture = getTexture(DropDownBoxBtnDownHoverTex);
  446. dropDownScrollDownBtnStyle.active.texture = dropDownScrollDownBtnStyle.hover.texture;
  447. dropDownScrollDownBtnStyle.fixedHeight = true;
  448. dropDownScrollDownBtnStyle.fixedWidth = false;
  449. dropDownScrollDownBtnStyle.height = 7;
  450. dropDownScrollDownBtnStyle.width = 30;
  451. dropDownScrollDownBtnStyle.border.left = 1;
  452. dropDownScrollDownBtnStyle.border.right = 1;
  453. dropDownScrollDownBtnStyle.border.top = 1;
  454. dropDownScrollDownBtnStyle.border.bottom = 1;
  455. mSkin.setStyle("ListBoxScrollDownBtn", dropDownScrollDownBtnStyle);
  456. mSkin.setStyle("MenuBarScrollDownBtn", dropDownScrollDownBtnStyle);
  457. mSkin.setStyle("ContextMenuScrollDownBtn", dropDownScrollDownBtnStyle);
  458. // DropDown entry button
  459. GUIElementStyle dropDownEntryBtnStyle;
  460. dropDownEntryBtnStyle.normal.texture = getTexture(DropDownBoxEntryNormalTex);
  461. dropDownEntryBtnStyle.hover.texture = getTexture(DropDownBoxEntryHoverTex);
  462. dropDownEntryBtnStyle.active.texture = dropDownEntryBtnStyle.hover.texture;
  463. dropDownEntryBtnStyle.fixedHeight = true;
  464. dropDownEntryBtnStyle.fixedWidth = false;
  465. dropDownEntryBtnStyle.height = 14;
  466. dropDownEntryBtnStyle.width = 30;
  467. dropDownEntryBtnStyle.border.left = 1;
  468. dropDownEntryBtnStyle.border.right = 1;
  469. dropDownEntryBtnStyle.border.top = 1;
  470. dropDownEntryBtnStyle.border.bottom = 1;
  471. dropDownEntryBtnStyle.font = font;
  472. dropDownEntryBtnStyle.fontSize = DefaultFontSize;
  473. dropDownEntryBtnStyle.textHorzAlign = THA_Left;
  474. dropDownEntryBtnStyle.textVertAlign = TVA_Top;
  475. mSkin.setStyle("ListBoxEntryBtn", dropDownEntryBtnStyle);
  476. mSkin.setStyle("MenuBarEntryBtn", dropDownEntryBtnStyle);
  477. mSkin.setStyle("ContextMenuEntryBtn", dropDownEntryBtnStyle);
  478. // DropDown entry button with expand
  479. GUIElementStyle dropDownEntryExpBtnStyle;
  480. dropDownEntryExpBtnStyle.normal.texture = getTexture(DropDownBoxEntryExpNormalTex);
  481. dropDownEntryExpBtnStyle.hover.texture = getTexture(DropDownBoxEntryExpHoverTex);
  482. dropDownEntryExpBtnStyle.active.texture = dropDownEntryExpBtnStyle.hover.texture;
  483. dropDownEntryExpBtnStyle.fixedHeight = true;
  484. dropDownEntryExpBtnStyle.fixedWidth = false;
  485. dropDownEntryExpBtnStyle.height = 14;
  486. dropDownEntryExpBtnStyle.width = 30;
  487. dropDownEntryExpBtnStyle.border.left = 1;
  488. dropDownEntryExpBtnStyle.border.right = 6;
  489. dropDownEntryExpBtnStyle.border.top = 1;
  490. dropDownEntryExpBtnStyle.border.bottom = 1;
  491. dropDownEntryExpBtnStyle.font = font;
  492. dropDownEntryExpBtnStyle.fontSize = DefaultFontSize;
  493. dropDownEntryExpBtnStyle.textHorzAlign = THA_Left;
  494. dropDownEntryExpBtnStyle.textVertAlign = TVA_Top;
  495. mSkin.setStyle("ListBoxEntryExpBtn", dropDownEntryExpBtnStyle);
  496. mSkin.setStyle("MenuBarEntryExpBtn", dropDownEntryExpBtnStyle);
  497. mSkin.setStyle("ContextMenuEntryExpBtn", dropDownEntryExpBtnStyle);
  498. // DropDown box frame
  499. GUIElementStyle dropDownBoxStyle;
  500. dropDownBoxStyle.normal.texture = getTexture(DropDownBoxBgTex);
  501. dropDownBoxStyle.hover.texture = dropDownEntryBtnStyle.normal.texture;
  502. dropDownBoxStyle.active.texture = dropDownEntryBtnStyle.hover.texture;
  503. dropDownBoxStyle.fixedHeight = false;
  504. dropDownBoxStyle.fixedWidth = false;
  505. dropDownBoxStyle.border.left = 1;
  506. dropDownBoxStyle.border.right = 1;
  507. dropDownBoxStyle.border.top = 1;
  508. dropDownBoxStyle.border.bottom = 1;
  509. dropDownBoxStyle.margins.left = 1;
  510. dropDownBoxStyle.margins.right = 1;
  511. dropDownBoxStyle.margins.top = 1;
  512. dropDownBoxStyle.margins.bottom = 1;
  513. mSkin.setStyle("ListBoxFrame", dropDownBoxStyle);
  514. mSkin.setStyle("MenuBarFrame", dropDownBoxStyle);
  515. mSkin.setStyle("ContextMenuFrame", dropDownBoxStyle);
  516. // Drop down separator
  517. GUIElementStyle dropDownSeparatorStyle;
  518. dropDownSeparatorStyle.normal.texture = getTexture(DropDownSeparatorTex);
  519. dropDownSeparatorStyle.fixedHeight = true;
  520. dropDownSeparatorStyle.fixedWidth = false;
  521. dropDownSeparatorStyle.height = 3;
  522. dropDownSeparatorStyle.width = 30;
  523. dropDownSeparatorStyle.border.left = 1;
  524. dropDownSeparatorStyle.border.right = 1;
  525. dropDownSeparatorStyle.border.top = 1;
  526. dropDownSeparatorStyle.border.bottom = 1;
  527. mSkin.setStyle("ListBoxSeparator", dropDownSeparatorStyle);
  528. mSkin.setStyle("MenuBarSeparator", dropDownSeparatorStyle);
  529. mSkin.setStyle("ContextMenuSeparator", dropDownSeparatorStyle);
  530. /************************************************************************/
  531. /* MENU BAR */
  532. /************************************************************************/
  533. // MenuBar background
  534. GUIElementStyle menuBarBgStyle;
  535. menuBarBgStyle.normal.texture = getTexture(MenuBarBgTex);
  536. menuBarBgStyle.fixedHeight = false;
  537. menuBarBgStyle.fixedWidth = false;
  538. menuBarBgStyle.height = 4;
  539. menuBarBgStyle.width = 4;
  540. mSkin.setStyle("MenuBarBg", menuBarBgStyle);
  541. // MenuBar Banshee logo
  542. GUIElementStyle menuBarBansheeLogoStyle;
  543. menuBarBansheeLogoStyle.normal.texture = getTexture(MenuBarBansheeLogoTex);
  544. menuBarBansheeLogoStyle.fixedHeight = true;
  545. menuBarBansheeLogoStyle.fixedWidth = true;
  546. menuBarBansheeLogoStyle.height = 7;
  547. menuBarBansheeLogoStyle.width = 51;
  548. mSkin.setStyle("MenuBarBansheeLogo", menuBarBansheeLogoStyle);
  549. // MenuBar button
  550. GUIElementStyle menuBarBtnStyle;
  551. menuBarBtnStyle.normal.texture = getTexture(MenuBarBtnNormalTex);
  552. menuBarBtnStyle.hover.texture = getTexture(MenuBarBtnHoverTex);
  553. menuBarBtnStyle.active.texture = menuBarBtnStyle.hover.texture;
  554. menuBarBtnStyle.normalOn.texture = menuBarBtnStyle.hover.texture;
  555. menuBarBtnStyle.hoverOn.texture = menuBarBtnStyle.hover.texture;
  556. menuBarBtnStyle.activeOn.texture = menuBarBtnStyle.hover.texture;
  557. menuBarBtnStyle.fixedHeight = true;
  558. menuBarBtnStyle.fixedWidth = false;
  559. menuBarBtnStyle.height = 15;
  560. menuBarBtnStyle.width = 4;
  561. menuBarBtnStyle.margins.left = 2;
  562. menuBarBtnStyle.margins.right = 2;
  563. menuBarBtnStyle.margins.top = 2;
  564. menuBarBtnStyle.margins.bottom = 2;
  565. menuBarBtnStyle.font = font;
  566. menuBarBtnStyle.fontSize = DefaultFontSize;
  567. menuBarBtnStyle.textHorzAlign = THA_Left;
  568. menuBarBtnStyle.textVertAlign = TVA_Top;
  569. mSkin.setStyle("MenuBarBtn", menuBarBtnStyle);
  570. /************************************************************************/
  571. /* DOCK SLIDER */
  572. /************************************************************************/
  573. GUIElementStyle dockSliderBtnStyle;
  574. dockSliderBtnStyle.normal.texture = getTexture(DockSliderNormalTex);
  575. dockSliderBtnStyle.fixedHeight = false;
  576. dockSliderBtnStyle.fixedWidth = false;
  577. dockSliderBtnStyle.height = 2;
  578. dockSliderBtnStyle.width = 2;
  579. mSkin.setStyle("DockSliderBtn", dockSliderBtnStyle);
  580. /************************************************************************/
  581. /* TREE VIEW */
  582. /************************************************************************/
  583. // Expand button
  584. GUIElementStyle treeViewExpandButtonStyle;
  585. treeViewExpandButtonStyle.normal.texture = getTexture(TreeViewExpandButtonOffNormal);
  586. treeViewExpandButtonStyle.hover.texture = getTexture(TreeViewExpandButtonOffHover);
  587. treeViewExpandButtonStyle.active.texture = treeViewExpandButtonStyle.hover.texture;
  588. treeViewExpandButtonStyle.normalOn.texture = getTexture(TreeViewExpandButtonOnNormal);
  589. treeViewExpandButtonStyle.hoverOn.texture = getTexture(TreeViewExpandButtonOnHover);
  590. treeViewExpandButtonStyle.activeOn.texture = treeViewExpandButtonStyle.hoverOn.texture;
  591. treeViewExpandButtonStyle.margins.left = 4;
  592. treeViewExpandButtonStyle.margins.right = 4;
  593. treeViewExpandButtonStyle.margins.top = 5;
  594. treeViewExpandButtonStyle.margins.bottom = 4;
  595. treeViewExpandButtonStyle.fixedHeight = true;
  596. treeViewExpandButtonStyle.fixedWidth = true;
  597. treeViewExpandButtonStyle.height = 16;
  598. treeViewExpandButtonStyle.width = 16;
  599. mSkin.setStyle("TreeViewFoldoutBtn", treeViewExpandButtonStyle);
  600. // Entry
  601. GUIElementStyle treeViewEntryStyle;
  602. treeViewEntryStyle.font = font;
  603. treeViewEntryStyle.fontSize = DefaultFontSize;
  604. treeViewEntryStyle.fixedWidth = false;
  605. treeViewEntryStyle.fixedHeight = true;
  606. treeViewEntryStyle.height = 16;
  607. treeViewEntryStyle.minWidth = 10;
  608. mSkin.setStyle("TreeViewElementBtn", treeViewEntryStyle);
  609. // Selection background
  610. GUIElementStyle treeViewSelBackgroundStyle;
  611. treeViewSelBackgroundStyle.normal.texture = getTexture(TreeViewSelectionBackground);
  612. treeViewSelBackgroundStyle.fixedHeight = false;
  613. treeViewSelBackgroundStyle.fixedWidth = false;
  614. treeViewSelBackgroundStyle.height = 2;
  615. treeViewSelBackgroundStyle.width = 2;
  616. mSkin.setStyle("TreeViewSelectionBackground", treeViewSelBackgroundStyle);
  617. // Edit box
  618. GUIElementStyle treeViewEditBox;
  619. treeViewEditBox.normal.texture = getTexture(TreeViewEditBox);
  620. treeViewEditBox.hover.texture = treeViewEditBox.normal.texture;
  621. treeViewEditBox.focused.texture = treeViewEditBox.normal.texture;
  622. treeViewEditBox.active.texture = treeViewEditBox.normal.texture;
  623. treeViewEditBox.border.left = 1;
  624. treeViewEditBox.border.right = 1;
  625. treeViewEditBox.border.top = 1;
  626. treeViewEditBox.border.bottom = 1;
  627. treeViewEditBox.margins.left = 1;
  628. treeViewEditBox.margins.right = 1;
  629. treeViewEditBox.margins.top = 1;
  630. treeViewEditBox.margins.bottom = 1;
  631. treeViewEditBox.fixedHeight = true;
  632. treeViewEditBox.height = 13;
  633. treeViewEditBox.minWidth = 10;
  634. treeViewEditBox.font = font;
  635. treeViewEditBox.fontSize = DefaultFontSize;
  636. treeViewEditBox.textHorzAlign = THA_Left;
  637. treeViewEditBox.textVertAlign = TVA_Top;
  638. mSkin.setStyle(GUITreeViewEditBox::getGUITypeName(), treeViewEditBox);
  639. // Element highlight
  640. GUIElementStyle treeViewElementHighlight;
  641. treeViewElementHighlight.normal.texture = getTexture(TreeViewElementHighlight);
  642. treeViewElementHighlight.border.left = 1;
  643. treeViewElementHighlight.border.right = 1;
  644. treeViewElementHighlight.border.top = 1;
  645. treeViewElementHighlight.border.bottom = 1;
  646. mSkin.setStyle("TreeViewElementHighlight", treeViewElementHighlight);
  647. // Element separator highlight
  648. GUIElementStyle treeViewElementSepHighlight;
  649. treeViewElementSepHighlight.normal.texture = getTexture(TreeViewElementSepHighlight);
  650. treeViewElementSepHighlight.border.left = 1;
  651. treeViewElementSepHighlight.border.right = 1;
  652. treeViewElementSepHighlight.border.top = 1;
  653. treeViewElementSepHighlight.border.bottom = 1;
  654. mSkin.setStyle("TreeViewElementSepHighlight", treeViewElementSepHighlight);
  655. /************************************************************************/
  656. /* OBJECT DROP FIELD */
  657. /************************************************************************/
  658. GUIElementStyle objectDropStyle;
  659. objectDropStyle.normal.texture = getTexture(ObjectDropBtnNormalTex);
  660. objectDropStyle.normalOn.texture = getTexture(ObjectDropBtnNormalOnTex);
  661. objectDropStyle.fixedHeight = true;
  662. objectDropStyle.height = 15;
  663. objectDropStyle.minWidth = 50;
  664. objectDropStyle.font = font;
  665. objectDropStyle.fontSize = DefaultFontSize;
  666. objectDropStyle.textHorzAlign = THA_Center;
  667. objectDropStyle.textVertAlign = TVA_Center;
  668. mSkin.setStyle("DropButton", objectDropStyle);
  669. GUIElementStyle objectClearBtnStyle;
  670. objectClearBtnStyle.normal.texture = getTexture(ObjectClearBtnNormalTex);
  671. objectClearBtnStyle.hover.texture = getTexture(ObjectClearBtnHoverTex);
  672. objectClearBtnStyle.active.texture = getTexture(ObjectClearBtnActiveTex);
  673. objectClearBtnStyle.fixedHeight = true;
  674. objectClearBtnStyle.fixedWidth = true;
  675. objectClearBtnStyle.height = 15;
  676. objectClearBtnStyle.width = 13;
  677. mSkin.setStyle("ObjectClearButton", objectClearBtnStyle);
  678. }
  679. HSpriteTexture EditorGUI::getTexture(const WString& name)
  680. {
  681. return SpriteTexture::create(static_resource_cast<Texture>(Importer::instance().import(FileSystem::getWorkingDirectoryPath() + L"\\" + DefaultFolder + name)));
  682. }
  683. }