BsEditorGUI.cpp 35 KB

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