BsBuiltinEditorResources.cpp 87 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006
  1. #include "BsBuiltinEditorResources.h"
  2. #include "BsBuiltinResources.h"
  3. #include "BsGUIElementStyle.h"
  4. #include "BsGUILabel.h"
  5. #include "BsGUITexture.h"
  6. #include "BsGUIButton.h"
  7. #include "BsGUIInputBox.h"
  8. #include "BsGUIToggle.h"
  9. #include "BsGUIColor.h"
  10. #include "BsTextSprite.h"
  11. #include "BsSpriteTexture.h"
  12. #include "BsGUITreeViewEditBox.h"
  13. #include "BsGUIIntField.h"
  14. #include "BsGUIFloatField.h"
  15. #include "BsGUIColorField.h"
  16. #include "BsGUITextField.h"
  17. #include "BsGUIToggleField.h"
  18. #include "BsGUIVector2Field.h"
  19. #include "BsGUIVector3Field.h"
  20. #include "BsGUIVector4Field.h"
  21. #include "BsGUIListBoxField.h"
  22. #include "BsGUISliderField.h"
  23. #include "BsGUIProgressBar.h"
  24. #include "BsGUISlider.h"
  25. #include "BsGUIDropDownContent.h"
  26. #include "BsGUIStatusBar.h"
  27. #include "BsGUIMenuBar.h"
  28. #include "BsGUIListBox.h"
  29. #include "BsFont.h"
  30. #include "BsFontImportOptions.h"
  31. #include "BsImporter.h"
  32. #include "BsGpuProgram.h"
  33. #include "BsShader.h"
  34. #include "BsShaderInclude.h"
  35. #include "BsTechnique.h"
  36. #include "BsPass.h"
  37. #include "BsMaterial.h"
  38. #include "BsBlendState.h"
  39. #include "BsDepthStencilState.h"
  40. #include "BsRasterizerState.h"
  41. #include "BsResources.h"
  42. #include "BsRTTIType.h"
  43. #include "BsFileSystem.h"
  44. #include "BsResourceManifest.h"
  45. #include "BsDataStream.h"
  46. namespace BansheeEngine
  47. {
  48. const String BuiltinEditorResources::ObjectFieldStyleName = "GUIObjectField";
  49. const String BuiltinEditorResources::ObjectFieldLabelStyleName = "EditorFieldLabel";
  50. const String BuiltinEditorResources::ObjectFieldDropBtnStyleName = "DropButton";
  51. const String BuiltinEditorResources::ObjectFieldClearBtnStyleName = "ObjectClearButton";
  52. const String BuiltinEditorResources::TextureFieldStyleName = "GUITextureField";
  53. const String BuiltinEditorResources::TextureFieldLabelStyleName = "TextureFieldLabel";
  54. const String BuiltinEditorResources::TextureFieldDropStyleName = "TextureDrop";
  55. const String BuiltinEditorResources::TextureFieldClearBtnStyleName = "TextureClearButton";
  56. const WString BuiltinEditorResources::DefaultFontFilename = L"arial.ttf";
  57. const UINT32 BuiltinEditorResources::DefaultFontSize = 11;
  58. const Color BuiltinEditorResources::TextNormalColor = Color(0.7f, 0.7f, 0.7f);
  59. const Color BuiltinEditorResources::TextActiveColor = Color(0.0f, 0.0f, 0.0f);
  60. const WString BuiltinEditorResources::GUISkinFile = L"GUISkin";
  61. const Path BuiltinEditorResources::ShaderFolder = L"Shaders\\";
  62. const Path BuiltinEditorResources::SkinFolder = L"Skin\\";
  63. const Path BuiltinEditorResources::IconFolder = L"Skin\\Icons";
  64. const Path BuiltinEditorResources::ShaderIncludeFolder = L"Includes\\";
  65. const Path BuiltinEditorResources::BuiltinRawDataFolder = RUNTIME_DATA_PATH + L"Raw\\Editor\\";
  66. const Path BuiltinEditorResources::EditorRawSkinFolder = BuiltinRawDataFolder + SkinFolder;
  67. const Path BuiltinEditorResources::EditorRawShaderFolder = BuiltinRawDataFolder + ShaderFolder;
  68. const Path BuiltinEditorResources::EditorRawShaderIncludeFolder = BuiltinRawDataFolder + ShaderIncludeFolder;
  69. const Path BuiltinEditorResources::BuiltinDataFolder = RUNTIME_DATA_PATH + L"Editor\\";
  70. const Path BuiltinEditorResources::EditorSkinFolder = BuiltinDataFolder + SkinFolder;
  71. const Path BuiltinEditorResources::EditorIconFolder = BuiltinDataFolder + IconFolder;
  72. const Path BuiltinEditorResources::EditorShaderFolder = BuiltinDataFolder + ShaderFolder;
  73. const Path BuiltinEditorResources::EditorShaderIncludeFolder = BuiltinDataFolder + ShaderIncludeFolder;
  74. const Path BuiltinEditorResources::ResourceManifestPath = BuiltinDataFolder + "ResourceManifest.asset";
  75. const Path BuiltinEditorResources::DefaultWidgetLayoutPath = BuiltinDataFolder + "Layout.asset";
  76. const WString BuiltinEditorResources::FolderIconTex = L"FolderIcon.psd";
  77. const WString BuiltinEditorResources::MeshIconTex = L"MeshIcon.psd";
  78. const WString BuiltinEditorResources::TextureIconTex = L"TextureIcon.psd";
  79. const WString BuiltinEditorResources::FontIconTex = L"FontIcon.psd";
  80. const WString BuiltinEditorResources::PlainTextIconTex = L"TextIcon.psd";
  81. const WString BuiltinEditorResources::ScriptCodeIconTex = L"CSharpIcon.psd";
  82. const WString BuiltinEditorResources::ShaderIconTex = L"ShaderIcon.psd";
  83. const WString BuiltinEditorResources::ShaderIncludeIconTex = L"ShaderIncludeIcon.psd";
  84. const WString BuiltinEditorResources::MaterialIconTex = L"MaterialIcon.psd";
  85. const WString BuiltinEditorResources::SpriteTextureIconTex = L"SpriteIcon.psd";
  86. const WString BuiltinEditorResources::PrefabIconTex = L"PrefabIcon.psd";
  87. const WString BuiltinEditorResources::LogInfoIconTex = L"IconInfo.psd";
  88. const WString BuiltinEditorResources::LogWarningIconTex = L"IconWarning.psd";
  89. const WString BuiltinEditorResources::LogErrorIconTex = L"IconError.psd";
  90. const WString BuiltinEditorResources::ButtonNormalTex = L"ButtonNormal.png";
  91. const WString BuiltinEditorResources::ButtonHoverTex = L"ButtonHover.png";
  92. const WString BuiltinEditorResources::ButtonActiveTex = L"ButtonActive.png";
  93. const WString BuiltinEditorResources::ButtonLeftNormalTex = L"ButtonLeftNormal.png";
  94. const WString BuiltinEditorResources::ButtonLeftHoverTex = L"ButtonLeftHover.png";
  95. const WString BuiltinEditorResources::ButtonLeftActiveTex = L"ButtonLeftActive.png";
  96. const WString BuiltinEditorResources::ButtonRightNormalTex = L"ButtonRightNormal.png";
  97. const WString BuiltinEditorResources::ButtonRightHoverTex = L"ButtonRightHover.png";
  98. const WString BuiltinEditorResources::ButtonRightActiveTex = L"ButtonRightActive.png";
  99. const WString BuiltinEditorResources::ToggleNormalTex = L"ToggleNormal.png";
  100. const WString BuiltinEditorResources::ToggleHoverTex = L"ToggleHover.png";
  101. const WString BuiltinEditorResources::ToggleNormalOnTex = L"ToggleNormalOn.png";
  102. const WString BuiltinEditorResources::ToggleHoverOnTex = L"ToggleHoverOn.png";
  103. const WString BuiltinEditorResources::InputBoxNormalTex = L"InputBoxNormal.png";
  104. const WString BuiltinEditorResources::InputBoxHoverTex = L"InputBoxHover.png";
  105. const WString BuiltinEditorResources::InputBoxFocusedTex = L"InputBoxActive.png";
  106. const WString BuiltinEditorResources::ObjectDropBtnNormalTex = L"ObjectDropNormal.png";
  107. const WString BuiltinEditorResources::ObjectDropBtnNormalOnTex = L"ObjectDropNormalOn.png";
  108. const WString BuiltinEditorResources::ObjectClearBtnNormalTex = L"ObjectDropClearNormal.png";
  109. const WString BuiltinEditorResources::ObjectClearBtnHoverTex = L"ObjectDropClearHover.png";
  110. const WString BuiltinEditorResources::ObjectClearBtnActiveTex = L"ObjectDropClearActive.png";
  111. const WString BuiltinEditorResources::DropDownBtnNormalTex = L"DropDownButtonNormal.png";
  112. const WString BuiltinEditorResources::DropDownBtnHoverTex = L"DropDownButtonHover.png";
  113. const WString BuiltinEditorResources::DropDownBtnActiveTex = L"DropDownButtonActive.png";
  114. const WString BuiltinEditorResources::SliderHBackgroundTex = L"SliderHBackground.png";
  115. const WString BuiltinEditorResources::SliderHFillTex = L"SliderHFill.png";
  116. const WString BuiltinEditorResources::SliderVBackgroundTex = L"SliderVBackground.png";
  117. const WString BuiltinEditorResources::SliderVFillTex = L"SliderVFill.png";
  118. const WString BuiltinEditorResources::SliderHandleNormalTex = L"SliderHandleNormal.png";
  119. const WString BuiltinEditorResources::SliderHandleHoverTex = L"SliderHandleHover.png";
  120. const WString BuiltinEditorResources::SliderHandleActiveTex = L"SliderHandleActive.png";
  121. const WString BuiltinEditorResources::FoldoutOpenNormalTex = L"FoldoutNormalOn.png";
  122. const WString BuiltinEditorResources::FoldoutOpenHoverTex = L"FoldoutHoverOn.png";
  123. const WString BuiltinEditorResources::FoldoutOpenActiveTex = L"FoldoutHoverOn.png";
  124. const WString BuiltinEditorResources::FoldoutClosedNormalTex = L"FoldoutNormalOff.png";
  125. const WString BuiltinEditorResources::FoldoutClosedHoverTex = L"FoldoutHoverOff.png";
  126. const WString BuiltinEditorResources::FoldoutClosedActiveTex = L"FoldoutHoverOff.png";
  127. const WString BuiltinEditorResources::WindowBackgroundTex = L"WindowBackground.png";
  128. const WString BuiltinEditorResources::WindowFrameNormal = L"WindowFrameNormal.png";
  129. const WString BuiltinEditorResources::WindowFrameFocused = L"WindowFrameFocused.png";
  130. const WString BuiltinEditorResources::CloseButtonNormalTex = L"CloseButtonNormal.png";
  131. const WString BuiltinEditorResources::CloseButtonHoverTex = L"CloseButtonHover.png";
  132. const WString BuiltinEditorResources::CloseButtonActiveTex = L"CloseButtonActive.png";
  133. const WString BuiltinEditorResources::MinButtonNormalTex = L"MinimizeButtonNormal.png";
  134. const WString BuiltinEditorResources::MinButtonHoverTex = L"MinimizeButtonHover.png";
  135. const WString BuiltinEditorResources::MinButtonActiveTex = L"MinimizeButtonActive.png";
  136. const WString BuiltinEditorResources::MaxButtonNormalTex = L"MaximizeButtonNormal.png";
  137. const WString BuiltinEditorResources::MaxButtonHoverTex = L"MaximizeButtonHover.png";
  138. const WString BuiltinEditorResources::MaxButtonActiveTex = L"MaximizeButtonActive.png";
  139. const WString BuiltinEditorResources::TabBarBackgroundTex = L"TabBarBackground.png";
  140. const WString BuiltinEditorResources::TitleBarBackgroundTex = L"TitleBarBackground.png";
  141. const WString BuiltinEditorResources::TabButtonNormalTex = L"TabButtonNormal.png";
  142. const WString BuiltinEditorResources::TabButtonFocusedTex = L"TabButtonFocused.png";
  143. const WString BuiltinEditorResources::ScrollBarUpNormalTex = L"ScrollArrowUpNormal.png";
  144. const WString BuiltinEditorResources::ScrollBarUpHoverTex = L"ScrollArrowUpHover.png";
  145. const WString BuiltinEditorResources::ScrollBarUpActiveTex = L"ScrollArrowUpActive.png";
  146. const WString BuiltinEditorResources::ScrollBarDownNormalTex = L"ScrollArrowDownNormal.png";
  147. const WString BuiltinEditorResources::ScrollBarDownHoverTex = L"ScrollArrowDownHover.png";
  148. const WString BuiltinEditorResources::ScrollBarDownActiveTex = L"ScrollArrowDownActive.png";
  149. const WString BuiltinEditorResources::ScrollBarLeftNormalTex = L"ScrollArrowLeftNormal.png";
  150. const WString BuiltinEditorResources::ScrollBarLeftHoverTex = L"ScrollArrowLeftHover.png";
  151. const WString BuiltinEditorResources::ScrollBarLeftActiveTex = L"ScrollArrowLeftActive.png";
  152. const WString BuiltinEditorResources::ScrollBarRightNormalTex = L"ScrollArrowRightNormal.png";
  153. const WString BuiltinEditorResources::ScrollBarRightHoverTex = L"ScrollArrowRightHover.png";
  154. const WString BuiltinEditorResources::ScrollBarRightActiveTex = L"ScrollArrowRightActive.png";
  155. const WString BuiltinEditorResources::ScrollBarHandleHorzNormalTex = L"ScrollBarHHandleNormal.png";
  156. const WString BuiltinEditorResources::ScrollBarHandleHorzHoverTex = L"ScrollBarHHandleHover.png";
  157. const WString BuiltinEditorResources::ScrollBarHandleHorzActiveTex = L"ScrollBarHHandleActive.png";
  158. const WString BuiltinEditorResources::ScrollBarHandleVertNormalTex = L"ScrollBarVHandleNormal.png";
  159. const WString BuiltinEditorResources::ScrollBarHandleVertHoverTex = L"ScrollBarVHandleHover.png";
  160. const WString BuiltinEditorResources::ScrollBarHandleVertActiveTex = L"ScrollBarVHandleActive.png";
  161. const WString BuiltinEditorResources::ScrollBarHBgTex = L"ScrollBarHBackground.png";
  162. const WString BuiltinEditorResources::ScrollBarVBgTex = L"ScrollBarVBackground.png";
  163. const WString BuiltinEditorResources::DropDownBoxBgTex = L"DropDownBoxBg.png";
  164. const WString BuiltinEditorResources::DropDownBoxSideBgTex = L"DropDownBoxSideBg.png";
  165. const WString BuiltinEditorResources::DropDownBoxHandleTex = L"DropDownBoxScrollHandle.png";
  166. const WString BuiltinEditorResources::DropDownBoxEntryNormalTex = L"DropDownBoxEntryNormal.png";
  167. const WString BuiltinEditorResources::DropDownBoxEntryHoverTex = L"DropDownBoxEntryHover.png";
  168. const WString BuiltinEditorResources::DropDownBoxEntryToggleNormalTex = L"DropDownBoxEntryToggleNormal.png";
  169. const WString BuiltinEditorResources::DropDownBoxEntryToggleHoverTex = L"DropDownBoxEntryToggleHover.png";
  170. const WString BuiltinEditorResources::DropDownBoxEntryToggleNormalOnTex = L"DropDownBoxEntryToggleNormalOn.png";
  171. const WString BuiltinEditorResources::DropDownBoxEntryToggleHoverOnTex = L"DropDownBoxEntryToggleHoverOn.png";
  172. const WString BuiltinEditorResources::DropDownBoxBtnUpNormalTex = L"DropDownBoxArrowUpNormal.png";
  173. const WString BuiltinEditorResources::DropDownBoxBtnUpHoverTex = L"DropDownBoxArrowUpHover.png";
  174. const WString BuiltinEditorResources::DropDownBoxBtnDownNormalTex = L"DropDownBoxArrowDownNormal.png";
  175. const WString BuiltinEditorResources::DropDownBoxBtnDownHoverTex = L"DropDownBoxArrowDownHover.png";
  176. const WString BuiltinEditorResources::DropDownBoxEntryExpNormalTex = L"DropDownBoxExpandBtnNormal.png";
  177. const WString BuiltinEditorResources::DropDownBoxEntryExpHoverTex = L"DropDownBoxExpandBtnHover.png";
  178. const WString BuiltinEditorResources::DropDownSeparatorTex = L"DropDownBoxSeparator.png";
  179. const WString BuiltinEditorResources::MenuBarBgTex = L"MenuBarBackground.png";
  180. const WString BuiltinEditorResources::MenuBarBansheeLogoTex = L"MenuBarLog.png";
  181. const WString BuiltinEditorResources::MenuBarBtnNormalTex = L"MenuBarButtonNormal.png";
  182. const WString BuiltinEditorResources::MenuBarBtnActiveTex = L"MenuBarButtonActive.png";
  183. const WString BuiltinEditorResources::MenuBarBtnHoverTex = L"MenuBarButtonHover.png";
  184. const WString BuiltinEditorResources::MenuBarLineNormalTex = L"MenuBarLineNormal.png";
  185. const WString BuiltinEditorResources::MenuBarLineActiveTex = L"MenuBarLineActive.png";
  186. const WString BuiltinEditorResources::ToolBarBtnNormalTex = L"ToolBarButtonNormal.png";
  187. const WString BuiltinEditorResources::ToolBarBtnHoverTex = L"ToolBarButtonNormal.png";
  188. const WString BuiltinEditorResources::ToolBarBtnActiveTex = L"ToolBarButtonNormal.png";
  189. const WString BuiltinEditorResources::ToolBarSeparatorTex = L"ToolBarSeparator.png";
  190. const WString BuiltinEditorResources::DockSliderNormalTex = L"DockSliderNormal.png";
  191. const WString BuiltinEditorResources::TreeViewExpandButtonOffNormal = L"ExpandArrowNormalOff.png";
  192. const WString BuiltinEditorResources::TreeViewExpandButtonOffHover = L"ExpandArrowHoverOff.png";
  193. const WString BuiltinEditorResources::TreeViewExpandButtonOnNormal = L"ExpandArrowNormalOn.png";
  194. const WString BuiltinEditorResources::TreeViewExpandButtonOnHover = L"ExpandArrowHoverOn.png";
  195. const WString BuiltinEditorResources::TreeViewHighlightBackground = L"TreeViewHighlightBackground.psd";
  196. const WString BuiltinEditorResources::TreeViewEditBox = L"TreeViewEditBox.psd";
  197. const WString BuiltinEditorResources::TreeViewElementHighlight = L"TreeViewElementHighlight.psd";
  198. const WString BuiltinEditorResources::TreeViewElementSepHighlight = L"TreeViewElementSepHighlight.psd";
  199. const WString BuiltinEditorResources::ColorPickerSliderHorzHandleTex = L"ColorPickerSliderHorzHandle.psd";
  200. const WString BuiltinEditorResources::ColorPickerSliderVertHandleTex = L"ColorPickerSliderVertHandle.psd";
  201. const WString BuiltinEditorResources::ColorPickerSlider2DHandleTex = L"ColorPicker2DHandle.psd";
  202. const WString BuiltinEditorResources::ProgressBarFillTex = L"ProgressBarFill.png";
  203. const WString BuiltinEditorResources::ProgressBarBgTex = L"ProgressBarBg.png";
  204. const WString BuiltinEditorResources::SelectionAreaTex = L"SelectionHighlight.png";
  205. const WString BuiltinEditorResources::SelectionBgTex = L"SelectionBg.psd";
  206. const WString BuiltinEditorResources::TextureDropTex = L"TextureDrop.png";
  207. const WString BuiltinEditorResources::TextureDropOnTex = L"TextureDropHover.png";
  208. const WString BuiltinEditorResources::XButtonNormalTex = L"XBtnNormal.png";
  209. const WString BuiltinEditorResources::XButtonHoverTex = L"XBtnHover.png";
  210. const WString BuiltinEditorResources::XButtonActiveTex = L"XBtnActive.png";
  211. const WString BuiltinEditorResources::StatusBarBgTex = L"StatusBarBackground.png";
  212. const WString BuiltinEditorResources::ScrollAreaBgTex = L"ScrollAreaBg.png";
  213. const WString BuiltinEditorResources::InspectorTitleBgTex = L"InspectorTitleBg.png";
  214. const WString BuiltinEditorResources::InspectorContentBgTex = L"InspectorContentBg.png";
  215. const WString BuiltinEditorResources::InspectorContentBgAlternateTex = L"InspectorContentBgAlternate.png";
  216. /************************************************************************/
  217. /* SHADERS */
  218. /************************************************************************/
  219. const WString BuiltinEditorResources::ShaderDockOverlayFile = L"DockDropOverlay.bsl";
  220. const WString BuiltinEditorResources::ShaderSceneGridFile = L"SceneGrid.bsl";
  221. const WString BuiltinEditorResources::ShaderPickingCullNoneFile = L"PickingCullNone.bsl";
  222. const WString BuiltinEditorResources::ShaderPickingCullCWFile = L"PickingCullCW.bsl";
  223. const WString BuiltinEditorResources::ShaderPickingCullCCWFile = L"PickingCullCCW.bsl";
  224. const WString BuiltinEditorResources::ShaderPickingAlphaCullNoneFile = L"PickingAlphaCullNone.bsl";
  225. const WString BuiltinEditorResources::ShaderPickingAlphaCullCWFile = L"PickingAlphaCullCW.bsl";
  226. const WString BuiltinEditorResources::ShaderPickingAlphaCullCCWFile = L"PickingAlphaCullCCW.bsl";
  227. const WString BuiltinEditorResources::ShaderWireGizmoFile = L"WireGizmo.bsl";
  228. const WString BuiltinEditorResources::ShaderSolidGizmoFile = L"SolidGizmo.bsl";
  229. const WString BuiltinEditorResources::ShaderWireHandleFile = L"WireHandle.bsl";
  230. const WString BuiltinEditorResources::ShaderSolidHandleFile = L"SolidHandle.bsl";
  231. const WString BuiltinEditorResources::ShaderIconGizmoFile = L"IconGizmo.bsl";
  232. const WString BuiltinEditorResources::ShaderGizmoPickingFile = L"GizmoPicking.bsl";
  233. const WString BuiltinEditorResources::ShaderGizmoPickingAlphaFile = L"GizmoPickingAlpha.bsl";
  234. const WString BuiltinEditorResources::ShaderSelectionFile = L"Selection.bsl";
  235. /************************************************************************/
  236. /* OTHER */
  237. /************************************************************************/
  238. const WString BuiltinEditorResources::EmptyShaderCodeFile = L"EmptyShaderText.txt";
  239. const WString BuiltinEditorResources::EmptyCSScriptCodeFile = L"EmptyCSScriptText.txt";
  240. BuiltinEditorResources::BuiltinEditorResources()
  241. {
  242. Path absoluteDataPath = FileSystem::getWorkingDirectoryPath();
  243. absoluteDataPath.append(BuiltinDataFolder);
  244. #if BS_DEBUG_MODE
  245. if (BuiltinResourcesHelper::checkForModifications(BuiltinRawDataFolder, BuiltinDataFolder + L"Timestamp.asset"))
  246. {
  247. mResourceManifest = ResourceManifest::create("BuiltinResources");
  248. gResources().registerResourceManifest(mResourceManifest);
  249. preprocess();
  250. BuiltinResourcesHelper::writeTimestamp(BuiltinDataFolder + L"Timestamp.asset");
  251. Path absoluteDataPath = FileSystem::getWorkingDirectoryPath();
  252. absoluteDataPath.append(BuiltinDataFolder);
  253. ResourceManifest::save(mResourceManifest, ResourceManifestPath, absoluteDataPath);
  254. }
  255. #endif
  256. if (mResourceManifest == nullptr)
  257. {
  258. if (FileSystem::exists(ResourceManifestPath))
  259. mResourceManifest = ResourceManifest::load(ResourceManifestPath, absoluteDataPath);
  260. if (mResourceManifest == nullptr)
  261. mResourceManifest = ResourceManifest::create("BuiltinResources");
  262. gResources().registerResourceManifest(mResourceManifest);
  263. }
  264. mShaderDockOverlay = getShader(ShaderDockOverlayFile);
  265. mShaderSceneGrid = getShader(ShaderSceneGridFile);
  266. mShaderPicking[(int)CULL_NONE] = getShader(ShaderPickingCullNoneFile);
  267. mShaderPicking[(int)CULL_CLOCKWISE] = getShader(ShaderPickingCullCWFile);
  268. mShaderPicking[(int)CULL_COUNTERCLOCKWISE] = getShader(ShaderPickingCullCCWFile);
  269. mShaderPickingAlpha[(int)CULL_NONE] = getShader(ShaderPickingAlphaCullNoneFile);
  270. mShaderPickingAlpha[(int)CULL_CLOCKWISE] = getShader(ShaderPickingAlphaCullCWFile);
  271. mShaderPickingAlpha[(int)CULL_COUNTERCLOCKWISE] = getShader(ShaderPickingAlphaCullCCWFile);
  272. mShaderGizmoSolid = getShader(ShaderSolidGizmoFile);
  273. mShaderGizmoWire = getShader(ShaderWireGizmoFile);
  274. mShaderGizmoIcon = getShader(ShaderIconGizmoFile);
  275. mShaderGizmoPicking = getShader(ShaderGizmoPickingFile);
  276. mShaderGizmoAlphaPicking = getShader(ShaderGizmoPickingAlphaFile);
  277. mShaderHandleSolid = getShader(ShaderSolidHandleFile);
  278. mShaderHandleWire = getShader(ShaderWireHandleFile);
  279. mShaderSelection = getShader(ShaderSelectionFile);
  280. mSkin = gResources().load<GUISkin>(BuiltinDataFolder + (GUISkinFile + L".asset"));
  281. }
  282. BuiltinEditorResources::~BuiltinEditorResources()
  283. { }
  284. void BuiltinEditorResources::preprocess()
  285. {
  286. FileSystem::remove(EditorShaderIncludeFolder);
  287. FileSystem::remove(EditorShaderFolder);
  288. FileSystem::remove(EditorSkinFolder);
  289. BuiltinResourcesHelper::importAssets(EditorRawShaderIncludeFolder, EditorShaderIncludeFolder, mResourceManifest); // Hidden dependency: Includes must be imported before shaders
  290. BuiltinResourcesHelper::importAssets(EditorRawShaderFolder, EditorShaderFolder, mResourceManifest);
  291. BuiltinResourcesHelper::importAssets(EditorRawSkinFolder, EditorSkinFolder, mResourceManifest);
  292. // Import font
  293. BuiltinResourcesHelper::importFont(BuiltinRawDataFolder + DefaultFontFilename, BuiltinDataFolder, DefaultFontSize, false, mResourceManifest);
  294. // Generate & save GUI sprite textures
  295. BuiltinResourcesHelper::generateSpriteTextures(EditorSkinFolder, mResourceManifest);
  296. // Generate & save GUI skin
  297. {
  298. HGUISkin skin = generateGUISkin();
  299. Path outputPath = FileSystem::getWorkingDirectoryPath() + BuiltinDataFolder + (GUISkinFile + L".asset");
  300. Resources::instance().save(skin, outputPath, true);
  301. mResourceManifest->registerResource(skin.getUUID(), outputPath);
  302. }
  303. Resources::instance().unloadAllUnused();
  304. }
  305. HGUISkin BuiltinEditorResources::generateGUISkin()
  306. {
  307. HGUISkin skin = GUISkin::create();
  308. Path fontPath = FileSystem::getWorkingDirectoryPath();
  309. fontPath.append(BuiltinDataFolder);
  310. fontPath.append(DefaultFontFilename + L".asset");
  311. HFont font = Resources::instance().load<Font>(fontPath);
  312. // Blank entry
  313. GUIElementStyle blankStyle;
  314. skin->setStyle("Blank", blankStyle);
  315. skin->setStyle(GUITexture::getGUITypeName(), blankStyle);
  316. // Label
  317. GUIElementStyle labelStyle;
  318. labelStyle.font = font;
  319. labelStyle.fontSize = DefaultFontSize;
  320. labelStyle.fixedWidth = false;
  321. labelStyle.fixedHeight = true;
  322. labelStyle.height = 14;
  323. labelStyle.minWidth = 10;
  324. labelStyle.normal.textColor = TextNormalColor;
  325. skin->setStyle(GUILabel::getGUITypeName(), labelStyle);
  326. // Window frame
  327. GUIElementStyle windowFrameStyle;
  328. windowFrameStyle.normal.texture = getGUITexture(WindowFrameNormal);
  329. windowFrameStyle.focused.texture = getGUITexture(WindowFrameFocused);
  330. windowFrameStyle.border.left = 1;
  331. windowFrameStyle.border.right = 1;
  332. windowFrameStyle.border.top = 1;
  333. windowFrameStyle.border.bottom = 1;
  334. skin->setStyle("WindowFrame", windowFrameStyle);
  335. // Button
  336. GUIElementStyle buttonStyle;
  337. buttonStyle.normal.texture = getGUITexture(ButtonNormalTex);
  338. buttonStyle.hover.texture = getGUITexture(ButtonHoverTex);
  339. buttonStyle.active.texture = getGUITexture(ButtonActiveTex);
  340. buttonStyle.normalOn.texture = getGUITexture(ButtonActiveTex);
  341. buttonStyle.hoverOn.texture = getGUITexture(ButtonActiveTex);
  342. buttonStyle.activeOn.texture = getGUITexture(ButtonActiveTex);
  343. buttonStyle.normal.textColor = TextNormalColor;
  344. buttonStyle.hover.textColor = TextNormalColor;
  345. buttonStyle.active.textColor = TextActiveColor;
  346. buttonStyle.normalOn.textColor = TextActiveColor;
  347. buttonStyle.hoverOn.textColor = TextActiveColor;
  348. buttonStyle.activeOn.textColor = TextActiveColor;
  349. buttonStyle.border.left = 2;
  350. buttonStyle.border.right = 2;
  351. buttonStyle.border.top = 2;
  352. buttonStyle.border.bottom = 4;
  353. buttonStyle.contentOffset.top = 2;
  354. buttonStyle.contentOffset.left = 3;
  355. buttonStyle.contentOffset.right = 3;
  356. buttonStyle.margins.bottom = 2;
  357. buttonStyle.fixedHeight = true;
  358. buttonStyle.height = 21;
  359. buttonStyle.minWidth = 20;
  360. buttonStyle.font = font;
  361. buttonStyle.fontSize = DefaultFontSize;
  362. buttonStyle.textHorzAlign = THA_Center;
  363. buttonStyle.textVertAlign = TVA_Center;
  364. skin->setStyle(GUIButton::getGUITypeName(), buttonStyle);
  365. // Left edge button
  366. GUIElementStyle leftButtonStyle;
  367. leftButtonStyle.normal.texture = getGUITexture(ButtonLeftNormalTex);
  368. leftButtonStyle.hover.texture = getGUITexture(ButtonLeftHoverTex);
  369. leftButtonStyle.active.texture = getGUITexture(ButtonLeftActiveTex);
  370. leftButtonStyle.normalOn.texture = getGUITexture(ButtonLeftActiveTex);
  371. leftButtonStyle.hoverOn.texture = getGUITexture(ButtonLeftActiveTex);
  372. leftButtonStyle.activeOn.texture = getGUITexture(ButtonLeftActiveTex);
  373. leftButtonStyle.normal.textColor = TextNormalColor;
  374. leftButtonStyle.hover.textColor = TextNormalColor;
  375. leftButtonStyle.active.textColor = TextActiveColor;
  376. leftButtonStyle.normalOn.textColor = TextActiveColor;
  377. leftButtonStyle.hoverOn.textColor = TextActiveColor;
  378. leftButtonStyle.activeOn.textColor = TextActiveColor;
  379. leftButtonStyle.border.left = 7;
  380. leftButtonStyle.border.right = 2;
  381. leftButtonStyle.border.top = 2;
  382. leftButtonStyle.border.bottom = 4;
  383. leftButtonStyle.contentOffset.top = 2;
  384. leftButtonStyle.contentOffset.left = 7;
  385. leftButtonStyle.contentOffset.right = 3;
  386. leftButtonStyle.margins.bottom = 2;
  387. leftButtonStyle.fixedHeight = true;
  388. leftButtonStyle.height = 21;
  389. leftButtonStyle.minWidth = 20;
  390. leftButtonStyle.font = font;
  391. leftButtonStyle.fontSize = DefaultFontSize;
  392. leftButtonStyle.textHorzAlign = THA_Center;
  393. leftButtonStyle.textVertAlign = TVA_Center;
  394. skin->setStyle("ButtonLeft", leftButtonStyle);
  395. // Right edge button
  396. GUIElementStyle rightButtonStyle;
  397. rightButtonStyle.normal.texture = getGUITexture(ButtonRightNormalTex);
  398. rightButtonStyle.hover.texture = getGUITexture(ButtonRightHoverTex);
  399. rightButtonStyle.active.texture = getGUITexture(ButtonRightActiveTex);
  400. rightButtonStyle.normalOn.texture = getGUITexture(ButtonRightActiveTex);
  401. rightButtonStyle.hoverOn.texture = getGUITexture(ButtonRightActiveTex);
  402. rightButtonStyle.activeOn.texture = getGUITexture(ButtonRightActiveTex);
  403. rightButtonStyle.normal.textColor = TextNormalColor;
  404. rightButtonStyle.hover.textColor = TextNormalColor;
  405. rightButtonStyle.active.textColor = TextActiveColor;
  406. rightButtonStyle.normalOn.textColor = TextActiveColor;
  407. rightButtonStyle.hoverOn.textColor = TextActiveColor;
  408. rightButtonStyle.activeOn.textColor = TextActiveColor;
  409. rightButtonStyle.border.left = 2;
  410. rightButtonStyle.border.right = 7;
  411. rightButtonStyle.border.top = 2;
  412. rightButtonStyle.border.bottom = 4;
  413. rightButtonStyle.contentOffset.top = 2;
  414. rightButtonStyle.contentOffset.left = 3;
  415. rightButtonStyle.contentOffset.right = 7;
  416. rightButtonStyle.margins.bottom = 2;
  417. rightButtonStyle.fixedHeight = true;
  418. rightButtonStyle.height = 21;
  419. rightButtonStyle.minWidth = 20;
  420. rightButtonStyle.font = font;
  421. rightButtonStyle.fontSize = DefaultFontSize;
  422. rightButtonStyle.textHorzAlign = THA_Center;
  423. rightButtonStyle.textVertAlign = TVA_Center;
  424. skin->setStyle("ButtonRight", rightButtonStyle);
  425. // Toggle
  426. GUIElementStyle toggleStyle;
  427. toggleStyle.normal.texture = getGUITexture(ToggleNormalTex);
  428. toggleStyle.hover.texture = getGUITexture(ToggleHoverTex);
  429. toggleStyle.active.texture = toggleStyle.hover.texture;
  430. toggleStyle.normalOn.texture = getGUITexture(ToggleNormalOnTex);
  431. toggleStyle.hoverOn.texture = getGUITexture(ToggleHoverOnTex);
  432. toggleStyle.activeOn.texture = toggleStyle.hoverOn.texture;
  433. toggleStyle.fixedHeight = true;
  434. toggleStyle.fixedWidth = true;
  435. toggleStyle.margins.bottom = 2;
  436. toggleStyle.height = 15;
  437. toggleStyle.width = 13;
  438. skin->setStyle(GUIToggle::getGUITypeName(), toggleStyle);
  439. // Color
  440. GUIElementStyle colorStyle;
  441. colorStyle.margins.left = 2;
  442. colorStyle.margins.right = 2;
  443. colorStyle.margins.top = 2;
  444. colorStyle.margins.bottom = 2;
  445. colorStyle.fixedHeight = true;
  446. colorStyle.height = 10;
  447. colorStyle.minWidth = 10;
  448. skin->setStyle(GUIColor::getGUITypeName(), colorStyle);
  449. // Window background texture
  450. GUIElementStyle windowBgStyle;
  451. windowBgStyle.normal.texture = getGUITexture(WindowBackgroundTex);
  452. skin->setStyle("WindowBackground", windowBgStyle);
  453. // Window tab bar background
  454. GUIElementStyle tabBarBgStyle;
  455. tabBarBgStyle.normal.texture = getGUITexture(TabBarBackgroundTex);
  456. tabBarBgStyle.fixedHeight = true;
  457. tabBarBgStyle.height = 16;
  458. skin->setStyle("TabBarBackground", tabBarBgStyle);
  459. // Tabbed title bar tab button
  460. GUIElementStyle tabbedBarButton;
  461. tabbedBarButton.normal.texture = getGUITexture(TabButtonNormalTex);
  462. tabbedBarButton.hover.texture = tabbedBarButton.normal.texture;
  463. tabbedBarButton.active.texture = getGUITexture(TabButtonFocusedTex);
  464. tabbedBarButton.normalOn.texture = tabbedBarButton.active.texture;
  465. tabbedBarButton.hoverOn.texture = tabbedBarButton.active.texture;
  466. tabbedBarButton.activeOn.texture = tabbedBarButton.active.texture;
  467. tabbedBarButton.normal.textColor = TextNormalColor;
  468. tabbedBarButton.hover.textColor = TextNormalColor;
  469. tabbedBarButton.active.textColor = TextActiveColor;
  470. tabbedBarButton.normalOn.textColor = TextActiveColor;
  471. tabbedBarButton.hoverOn.textColor = TextActiveColor;
  472. tabbedBarButton.activeOn.textColor = TextActiveColor;
  473. tabbedBarButton.border.left = 12;
  474. tabbedBarButton.border.right = 12;
  475. tabbedBarButton.margins.left = 5;
  476. tabbedBarButton.margins.right = 5;
  477. tabbedBarButton.contentOffset.top = 3;
  478. tabbedBarButton.contentOffset.left = 6;
  479. tabbedBarButton.contentOffset.right = 6;
  480. tabbedBarButton.fixedHeight = true;
  481. tabbedBarButton.height = 15;
  482. tabbedBarButton.minWidth = 24;
  483. tabbedBarButton.maxWidth = 110;
  484. tabbedBarButton.font = font;
  485. tabbedBarButton.fontSize = DefaultFontSize;
  486. tabbedBarButton.textHorzAlign = THA_Center;
  487. tabbedBarButton.textVertAlign = TVA_Center;
  488. skin->setStyle("TabbedBarBtn", tabbedBarButton);
  489. // Tabbed title bar drag/drop button
  490. GUIElementStyle tabbedBarDropButton;
  491. tabbedBarDropButton.fixedHeight = true;
  492. tabbedBarDropButton.fixedWidth = true;
  493. tabbedBarDropButton.height = 13;
  494. tabbedBarDropButton.width = 6;
  495. skin->setStyle("TabbedBarDropArea", tabbedBarDropButton);
  496. // Window title bar background
  497. GUIElementStyle titleBarBgStyle;
  498. titleBarBgStyle.normal.texture = getGUITexture(TitleBarBackgroundTex);
  499. titleBarBgStyle.fixedHeight = true;
  500. titleBarBgStyle.height = 17;
  501. skin->setStyle("TitleBarBackground", titleBarBgStyle);
  502. // Window minimize button
  503. GUIElementStyle winMinButtonStyle;
  504. winMinButtonStyle.normal.texture = getGUITexture(MinButtonNormalTex);
  505. winMinButtonStyle.hover.texture = getGUITexture(MinButtonHoverTex);
  506. winMinButtonStyle.active.texture = getGUITexture(MinButtonActiveTex);
  507. winMinButtonStyle.fixedHeight = true;
  508. winMinButtonStyle.fixedWidth = true;
  509. winMinButtonStyle.height = 14;
  510. winMinButtonStyle.width = 14;
  511. skin->setStyle("WinMinimizeBtn", winMinButtonStyle);
  512. // Window maximize button
  513. GUIElementStyle winMaxButtonStyle;
  514. winMaxButtonStyle.normal.texture = getGUITexture(MaxButtonNormalTex);
  515. winMaxButtonStyle.hover.texture = getGUITexture(MaxButtonHoverTex);
  516. winMaxButtonStyle.active.texture = getGUITexture(MaxButtonActiveTex);
  517. winMaxButtonStyle.fixedHeight = true;
  518. winMaxButtonStyle.fixedWidth = true;
  519. winMaxButtonStyle.height = 14;
  520. winMaxButtonStyle.width = 14;
  521. skin->setStyle("WinMaximizeBtn", winMaxButtonStyle);
  522. // Window close button
  523. GUIElementStyle winCloseButtonStyle;
  524. winCloseButtonStyle.normal.texture = getGUITexture(CloseButtonNormalTex);
  525. winCloseButtonStyle.hover.texture = getGUITexture(CloseButtonHoverTex);
  526. winCloseButtonStyle.active.texture = getGUITexture(CloseButtonActiveTex);
  527. winCloseButtonStyle.fixedHeight = true;
  528. winCloseButtonStyle.fixedWidth = true;
  529. winCloseButtonStyle.height = 14;
  530. winCloseButtonStyle.width = 14;
  531. skin->setStyle("WinCloseBtn", winCloseButtonStyle);
  532. // Input box
  533. GUIElementStyle inputBoxStyle;
  534. inputBoxStyle.normal.texture = getGUITexture(InputBoxNormalTex);
  535. inputBoxStyle.hover.texture = getGUITexture(InputBoxHoverTex);
  536. inputBoxStyle.focused.texture = getGUITexture(InputBoxFocusedTex);
  537. inputBoxStyle.active.texture = inputBoxStyle.normal.texture;
  538. inputBoxStyle.normal.textColor = TextNormalColor;
  539. inputBoxStyle.hover.textColor = TextNormalColor;
  540. inputBoxStyle.focused.textColor = TextNormalColor;
  541. inputBoxStyle.active.textColor = TextNormalColor;
  542. inputBoxStyle.border.left = 4;
  543. inputBoxStyle.border.right = 4;
  544. inputBoxStyle.border.top = 4;
  545. inputBoxStyle.border.bottom = 6;
  546. inputBoxStyle.contentOffset.left = 4;
  547. inputBoxStyle.contentOffset.right = 4;
  548. inputBoxStyle.contentOffset.top = 4;
  549. inputBoxStyle.contentOffset.bottom = 4;
  550. inputBoxStyle.margins.bottom = 2;
  551. inputBoxStyle.fixedHeight = true;
  552. inputBoxStyle.height = 21;
  553. inputBoxStyle.minWidth = 10;
  554. inputBoxStyle.font = font;
  555. inputBoxStyle.fontSize = DefaultFontSize;
  556. inputBoxStyle.textHorzAlign = THA_Left;
  557. inputBoxStyle.textVertAlign = TVA_Top;
  558. skin->setStyle(GUIInputBox::getGUITypeName(), inputBoxStyle);
  559. /************************************************************************/
  560. /* SCROLL BAR */
  561. /************************************************************************/
  562. // Up button
  563. GUIElementStyle scrollUpBtnStyle;
  564. scrollUpBtnStyle.normal.texture = getGUITexture(ScrollBarUpNormalTex);
  565. scrollUpBtnStyle.hover.texture = getGUITexture(ScrollBarUpHoverTex);
  566. scrollUpBtnStyle.active.texture = getGUITexture(ScrollBarUpActiveTex);
  567. scrollUpBtnStyle.fixedHeight = true;
  568. scrollUpBtnStyle.fixedWidth = true;
  569. scrollUpBtnStyle.height = 11;
  570. scrollUpBtnStyle.width = 13;
  571. skin->setStyle("ScrollUpBtn", scrollUpBtnStyle);
  572. // Down button
  573. GUIElementStyle scrollDownBtnStyle;
  574. scrollDownBtnStyle.normal.texture = getGUITexture(ScrollBarDownNormalTex);
  575. scrollDownBtnStyle.hover.texture = getGUITexture(ScrollBarDownHoverTex);
  576. scrollDownBtnStyle.active.texture = getGUITexture(ScrollBarDownActiveTex);
  577. scrollDownBtnStyle.fixedHeight = true;
  578. scrollDownBtnStyle.fixedWidth = true;
  579. scrollDownBtnStyle.height = 11;
  580. scrollDownBtnStyle.width = 13;
  581. skin->setStyle("ScrollDownBtn", scrollDownBtnStyle);
  582. // Left button
  583. GUIElementStyle scrollLeftBtnStyle;
  584. scrollLeftBtnStyle.normal.texture = getGUITexture(ScrollBarLeftNormalTex);
  585. scrollLeftBtnStyle.hover.texture = getGUITexture(ScrollBarLeftHoverTex);
  586. scrollLeftBtnStyle.active.texture = getGUITexture(ScrollBarLeftActiveTex);
  587. scrollLeftBtnStyle.fixedHeight = true;
  588. scrollLeftBtnStyle.fixedWidth = true;
  589. scrollLeftBtnStyle.height = 13;
  590. scrollLeftBtnStyle.width = 11;
  591. skin->setStyle("ScrollLeftBtn", scrollLeftBtnStyle);
  592. // Right button
  593. GUIElementStyle scrollRightBtnStyle;
  594. scrollRightBtnStyle.normal.texture = getGUITexture(ScrollBarRightNormalTex);
  595. scrollRightBtnStyle.hover.texture = getGUITexture(ScrollBarRightHoverTex);
  596. scrollRightBtnStyle.active.texture = getGUITexture(ScrollBarRightActiveTex);
  597. scrollRightBtnStyle.fixedHeight = true;
  598. scrollRightBtnStyle.fixedWidth = true;
  599. scrollRightBtnStyle.height = 13;
  600. scrollRightBtnStyle.width = 11;
  601. skin->setStyle("ScrollRightBtn", scrollRightBtnStyle);
  602. // Horizontal handle
  603. GUIElementStyle scrollBarHorzBtnStyle;
  604. scrollBarHorzBtnStyle.normal.texture = getGUITexture(ScrollBarHandleHorzNormalTex);
  605. scrollBarHorzBtnStyle.hover.texture = getGUITexture(ScrollBarHandleHorzHoverTex);
  606. scrollBarHorzBtnStyle.active.texture = getGUITexture(ScrollBarHandleHorzActiveTex);
  607. scrollBarHorzBtnStyle.fixedHeight = true;
  608. scrollBarHorzBtnStyle.fixedWidth = false;
  609. scrollBarHorzBtnStyle.width = 10;
  610. scrollBarHorzBtnStyle.height = 13;
  611. scrollBarHorzBtnStyle.border.left = 4;
  612. scrollBarHorzBtnStyle.border.right = 4;
  613. skin->setStyle("ScrollBarHorzBtn", scrollBarHorzBtnStyle);
  614. // Vertical handle
  615. GUIElementStyle scrollBarVertBtnStyle;
  616. scrollBarVertBtnStyle.normal.texture = getGUITexture(ScrollBarHandleVertNormalTex);
  617. scrollBarVertBtnStyle.hover.texture = getGUITexture(ScrollBarHandleVertHoverTex);
  618. scrollBarVertBtnStyle.active.texture = getGUITexture(ScrollBarHandleVertActiveTex);
  619. scrollBarVertBtnStyle.fixedHeight = false;
  620. scrollBarVertBtnStyle.fixedWidth = true;
  621. scrollBarVertBtnStyle.width = 13;
  622. scrollBarVertBtnStyle.height = 10;
  623. scrollBarVertBtnStyle.border.top = 4;
  624. scrollBarVertBtnStyle.border.bottom = 4;
  625. skin->setStyle("ScrollBarVertBtn", scrollBarVertBtnStyle);
  626. // Vertical scroll bar
  627. GUIElementStyle vertScrollBarStyle;
  628. vertScrollBarStyle.normal.texture = getGUITexture(ScrollBarVBgTex);
  629. vertScrollBarStyle.hover.texture = vertScrollBarStyle.normal.texture;
  630. vertScrollBarStyle.active.texture = vertScrollBarStyle.normal.texture;
  631. vertScrollBarStyle.fixedHeight = false;
  632. vertScrollBarStyle.fixedWidth = true;
  633. vertScrollBarStyle.minHeight = 8;
  634. vertScrollBarStyle.width = 16;
  635. skin->setStyle("ScrollBarVert", vertScrollBarStyle);
  636. // Horizontal scroll bar
  637. GUIElementStyle horzScrollBarStyle;
  638. horzScrollBarStyle.normal.texture = getGUITexture(ScrollBarHBgTex);
  639. horzScrollBarStyle.hover.texture = horzScrollBarStyle.normal.texture;
  640. horzScrollBarStyle.active.texture = horzScrollBarStyle.normal.texture;
  641. horzScrollBarStyle.fixedHeight = true;
  642. horzScrollBarStyle.fixedWidth = false;
  643. horzScrollBarStyle.minWidth = 8;
  644. horzScrollBarStyle.height = 16;
  645. skin->setStyle("ScrollBarHorz", horzScrollBarStyle);
  646. /************************************************************************/
  647. /* DROP DOWN BOX */
  648. /************************************************************************/
  649. // ListBox button
  650. GUIElementStyle dropDownListStyle;
  651. dropDownListStyle.normal.texture = getGUITexture(DropDownBtnNormalTex);
  652. dropDownListStyle.hover.texture = getGUITexture(DropDownBtnHoverTex);
  653. dropDownListStyle.active.texture = getGUITexture(DropDownBtnActiveTex);
  654. dropDownListStyle.normalOn.texture = dropDownListStyle.active.texture;
  655. dropDownListStyle.hoverOn.texture = dropDownListStyle.active.texture;
  656. dropDownListStyle.activeOn.texture = dropDownListStyle.active.texture;
  657. dropDownListStyle.normal.textColor = TextNormalColor;
  658. dropDownListStyle.hover.textColor = TextNormalColor;
  659. dropDownListStyle.active.textColor = TextNormalColor;
  660. dropDownListStyle.normalOn.textColor = TextNormalColor;
  661. dropDownListStyle.hoverOn.textColor = TextNormalColor;
  662. dropDownListStyle.activeOn.textColor = TextNormalColor;
  663. dropDownListStyle.fixedHeight = true;
  664. dropDownListStyle.fixedWidth = false;
  665. dropDownListStyle.height = 21;
  666. dropDownListStyle.minWidth = 20;
  667. dropDownListStyle.contentOffset.left = 3;
  668. dropDownListStyle.contentOffset.right = 18;
  669. dropDownListStyle.contentOffset.top = 2;
  670. dropDownListStyle.contentOffset.bottom = 2;
  671. dropDownListStyle.border.left = 2;
  672. dropDownListStyle.border.right = 16;
  673. dropDownListStyle.border.top = 2;
  674. dropDownListStyle.border.bottom = 4;
  675. dropDownListStyle.margins.bottom = 2;
  676. dropDownListStyle.font = font;
  677. dropDownListStyle.fontSize = DefaultFontSize;
  678. dropDownListStyle.textHorzAlign = THA_Left;
  679. dropDownListStyle.textVertAlign = TVA_Center;
  680. skin->setStyle(GUIListBox::getGUITypeName(), dropDownListStyle);
  681. // DropDown scroll up button
  682. GUIElementStyle dropDownScrollUpBtnStyle;
  683. dropDownScrollUpBtnStyle.normal.texture = getGUITexture(DropDownBoxBtnUpNormalTex);
  684. dropDownScrollUpBtnStyle.hover.texture = getGUITexture(DropDownBoxBtnUpHoverTex);
  685. dropDownScrollUpBtnStyle.active.texture = dropDownScrollUpBtnStyle.hover.texture;
  686. dropDownScrollUpBtnStyle.fixedHeight = true;
  687. dropDownScrollUpBtnStyle.fixedWidth = true;
  688. dropDownScrollUpBtnStyle.width = 8;
  689. dropDownScrollUpBtnStyle.height = 12;
  690. skin->setStyle("ListBoxScrollUpBtn", dropDownScrollUpBtnStyle);
  691. skin->setStyle("MenuBarScrollUpBtn", dropDownScrollUpBtnStyle);
  692. skin->setStyle("ContextMenuScrollUpBtn", dropDownScrollUpBtnStyle);
  693. // DropDown scroll down button
  694. GUIElementStyle dropDownScrollDownBtnStyle;
  695. dropDownScrollDownBtnStyle.normal.texture = getGUITexture(DropDownBoxBtnDownNormalTex);
  696. dropDownScrollDownBtnStyle.hover.texture = getGUITexture(DropDownBoxBtnDownHoverTex);
  697. dropDownScrollDownBtnStyle.active.texture = dropDownScrollDownBtnStyle.hover.texture;
  698. dropDownScrollDownBtnStyle.fixedHeight = true;
  699. dropDownScrollDownBtnStyle.fixedWidth = true;
  700. dropDownScrollDownBtnStyle.width = 8;
  701. dropDownScrollDownBtnStyle.height = 12;
  702. skin->setStyle("ListBoxScrollDownBtn", dropDownScrollDownBtnStyle);
  703. skin->setStyle("MenuBarScrollDownBtn", dropDownScrollDownBtnStyle);
  704. skin->setStyle("ContextMenuScrollDownBtn", dropDownScrollDownBtnStyle);
  705. // DropDown handle
  706. GUIElementStyle dropDownScrollHandleStyle;
  707. dropDownScrollHandleStyle.normal.texture = getGUITexture(DropDownBoxHandleTex);
  708. dropDownScrollHandleStyle.fixedHeight = false;
  709. dropDownScrollHandleStyle.fixedWidth = true;
  710. dropDownScrollHandleStyle.height = 8;
  711. dropDownScrollHandleStyle.width = 8;
  712. skin->setStyle("ListBoxHandle", dropDownScrollHandleStyle);
  713. skin->setStyle("MenuBarHandle", dropDownScrollHandleStyle);
  714. skin->setStyle("ContextMenuHandle", dropDownScrollHandleStyle);
  715. // DropDown sidebar background
  716. GUIElementStyle dropDownSidebarBg;
  717. dropDownSidebarBg.normal.texture = getGUITexture(DropDownBoxSideBgTex);
  718. dropDownSidebarBg.fixedHeight = false;
  719. dropDownSidebarBg.fixedWidth = true;
  720. dropDownSidebarBg.height = 8;
  721. dropDownSidebarBg.width = 9;
  722. dropDownSidebarBg.border.left = 1;
  723. dropDownSidebarBg.border.top = 1;
  724. dropDownSidebarBg.border.bottom = 1;
  725. skin->setStyle("ListBoxSidebarBg", dropDownSidebarBg);
  726. skin->setStyle("MenuBarSidebarBg", dropDownSidebarBg);
  727. skin->setStyle("ContextMenuSidebarBg", dropDownSidebarBg);
  728. // DropDown entry button
  729. GUIElementStyle dropDownEntryBtnStyle;
  730. dropDownEntryBtnStyle.normal.texture = getGUITexture(DropDownBoxEntryNormalTex);
  731. dropDownEntryBtnStyle.hover.texture = getGUITexture(DropDownBoxEntryHoverTex);
  732. dropDownEntryBtnStyle.active.texture = dropDownEntryBtnStyle.hover.texture;
  733. dropDownEntryBtnStyle.normalOn.texture = dropDownEntryBtnStyle.hover.texture;
  734. dropDownEntryBtnStyle.hoverOn.texture = dropDownEntryBtnStyle.hover.texture;
  735. dropDownEntryBtnStyle.activeOn.texture = dropDownEntryBtnStyle.hover.texture;
  736. dropDownEntryBtnStyle.normal.textColor = TextNormalColor;
  737. dropDownEntryBtnStyle.hover.textColor = TextNormalColor;
  738. dropDownEntryBtnStyle.active.textColor = TextNormalColor;
  739. dropDownEntryBtnStyle.normalOn.textColor = TextNormalColor;
  740. dropDownEntryBtnStyle.hoverOn.textColor = TextNormalColor;
  741. dropDownEntryBtnStyle.activeOn.textColor = TextNormalColor;
  742. dropDownEntryBtnStyle.fixedHeight = true;
  743. dropDownEntryBtnStyle.fixedWidth = false;
  744. dropDownEntryBtnStyle.height = 16;
  745. dropDownEntryBtnStyle.width = 30;
  746. dropDownEntryBtnStyle.font = font;
  747. dropDownEntryBtnStyle.fontSize = DefaultFontSize;
  748. dropDownEntryBtnStyle.textHorzAlign = THA_Left;
  749. dropDownEntryBtnStyle.textVertAlign = TVA_Center;
  750. skin->setStyle(GUIDropDownContent::ENTRY_STYLE_TYPE, dropDownEntryBtnStyle);
  751. // DropDown toggle entry button
  752. GUIElementStyle dropDownToggleEntryBtnStyle;
  753. dropDownToggleEntryBtnStyle.normal.texture = getGUITexture(DropDownBoxEntryToggleNormalTex);
  754. dropDownToggleEntryBtnStyle.hover.texture = getGUITexture(DropDownBoxEntryToggleHoverTex);
  755. dropDownToggleEntryBtnStyle.active.texture = dropDownToggleEntryBtnStyle.hover.texture;
  756. dropDownToggleEntryBtnStyle.normalOn.texture = getGUITexture(DropDownBoxEntryToggleNormalOnTex);
  757. dropDownToggleEntryBtnStyle.hoverOn.texture = getGUITexture(DropDownBoxEntryToggleHoverOnTex);
  758. dropDownToggleEntryBtnStyle.activeOn.texture = dropDownToggleEntryBtnStyle.hoverOn.texture;
  759. dropDownToggleEntryBtnStyle.normal.textColor = TextNormalColor;
  760. dropDownToggleEntryBtnStyle.hover.textColor = TextNormalColor;
  761. dropDownToggleEntryBtnStyle.active.textColor = TextNormalColor;
  762. dropDownToggleEntryBtnStyle.normalOn.textColor = TextNormalColor;
  763. dropDownToggleEntryBtnStyle.hoverOn.textColor = TextNormalColor;
  764. dropDownToggleEntryBtnStyle.activeOn.textColor = TextNormalColor;
  765. dropDownToggleEntryBtnStyle.fixedHeight = true;
  766. dropDownToggleEntryBtnStyle.fixedWidth = false;
  767. dropDownToggleEntryBtnStyle.height = 18;
  768. dropDownToggleEntryBtnStyle.width = 30;
  769. dropDownToggleEntryBtnStyle.border.left = 17;
  770. dropDownToggleEntryBtnStyle.contentOffset.left = 17;
  771. dropDownToggleEntryBtnStyle.font = font;
  772. dropDownToggleEntryBtnStyle.fontSize = DefaultFontSize;
  773. dropDownToggleEntryBtnStyle.textHorzAlign = THA_Left;
  774. dropDownToggleEntryBtnStyle.textVertAlign = TVA_Center;
  775. skin->setStyle(GUIDropDownContent::ENTRY_TOGGLE_STYLE_TYPE, dropDownToggleEntryBtnStyle);
  776. // DropDown entry button with expand
  777. GUIElementStyle dropDownEntryExpBtnStyle;
  778. dropDownEntryExpBtnStyle.normal.texture = getGUITexture(DropDownBoxEntryExpNormalTex);
  779. dropDownEntryExpBtnStyle.hover.texture = getGUITexture(DropDownBoxEntryExpHoverTex);
  780. dropDownEntryExpBtnStyle.active.texture = dropDownEntryExpBtnStyle.hover.texture;
  781. dropDownEntryExpBtnStyle.normalOn.texture = dropDownEntryExpBtnStyle.hover.texture;
  782. dropDownEntryExpBtnStyle.hoverOn.texture = dropDownEntryExpBtnStyle.hover.texture;
  783. dropDownEntryExpBtnStyle.activeOn.texture = dropDownEntryExpBtnStyle.hover.texture;
  784. dropDownEntryExpBtnStyle.normal.textColor = TextNormalColor;
  785. dropDownEntryExpBtnStyle.hover.textColor = TextNormalColor;
  786. dropDownEntryExpBtnStyle.active.textColor = TextNormalColor;
  787. dropDownEntryExpBtnStyle.normalOn.textColor = TextNormalColor;
  788. dropDownEntryExpBtnStyle.hoverOn.textColor = TextNormalColor;
  789. dropDownEntryExpBtnStyle.activeOn.textColor = TextNormalColor;
  790. dropDownEntryExpBtnStyle.fixedHeight = true;
  791. dropDownEntryExpBtnStyle.fixedWidth = false;
  792. dropDownEntryExpBtnStyle.height = 16;
  793. dropDownEntryExpBtnStyle.width = 30;
  794. dropDownEntryExpBtnStyle.border.right = 13;
  795. dropDownEntryExpBtnStyle.font = font;
  796. dropDownEntryExpBtnStyle.fontSize = DefaultFontSize;
  797. dropDownEntryExpBtnStyle.textHorzAlign = THA_Left;
  798. dropDownEntryExpBtnStyle.textVertAlign = TVA_Center;
  799. skin->setStyle(GUIDropDownContent::ENTRY_EXP_STYLE_TYPE, dropDownEntryExpBtnStyle);
  800. // Drop down separator
  801. GUIElementStyle dropDownSeparatorStyle;
  802. dropDownSeparatorStyle.normal.texture = getGUITexture(DropDownSeparatorTex);
  803. dropDownSeparatorStyle.fixedHeight = true;
  804. dropDownSeparatorStyle.fixedWidth = false;
  805. dropDownSeparatorStyle.height = 3;
  806. dropDownSeparatorStyle.width = 30;
  807. skin->setStyle(GUIDropDownContent::SEPARATOR_STYLE_TYPE, dropDownSeparatorStyle);
  808. // Drop down content
  809. GUIElementStyle dropDownContentStyle;
  810. dropDownContentStyle.minWidth = 50;
  811. dropDownContentStyle.minHeight = 20;
  812. dropDownContentStyle.subStyles[GUIDropDownContent::ENTRY_TOGGLE_STYLE_TYPE] = GUIDropDownContent::ENTRY_TOGGLE_STYLE_TYPE;
  813. dropDownContentStyle.subStyles[GUIDropDownContent::ENTRY_STYLE_TYPE] = GUIDropDownContent::ENTRY_STYLE_TYPE;
  814. dropDownContentStyle.subStyles[GUIDropDownContent::ENTRY_EXP_STYLE_TYPE] = GUIDropDownContent::ENTRY_EXP_STYLE_TYPE;
  815. dropDownContentStyle.subStyles[GUIDropDownContent::SEPARATOR_STYLE_TYPE] = GUIDropDownContent::SEPARATOR_STYLE_TYPE;
  816. skin->setStyle("ListBoxContent", dropDownContentStyle);
  817. skin->setStyle("MenuBarContent", dropDownContentStyle);
  818. skin->setStyle("ContextMenuContent", dropDownContentStyle);
  819. // DropDown box frame
  820. GUIElementStyle dropDownBoxStyle;
  821. dropDownBoxStyle.normal.texture = getGUITexture(DropDownBoxBgTex);
  822. dropDownBoxStyle.hover.texture = dropDownBoxStyle.normal.texture;
  823. dropDownBoxStyle.active.texture = dropDownBoxStyle.hover.texture;
  824. dropDownBoxStyle.fixedHeight = false;
  825. dropDownBoxStyle.fixedWidth = false;
  826. dropDownBoxStyle.border.left = 2;
  827. dropDownBoxStyle.border.right = 2;
  828. dropDownBoxStyle.border.top = 2;
  829. dropDownBoxStyle.border.bottom = 4;
  830. dropDownBoxStyle.margins.left = 6;
  831. dropDownBoxStyle.margins.right = 6;
  832. dropDownBoxStyle.margins.top = 4;
  833. dropDownBoxStyle.margins.bottom = 6;
  834. skin->setStyle("ListBoxFrame", dropDownBoxStyle);
  835. skin->setStyle("MenuBarFrame", dropDownBoxStyle);
  836. skin->setStyle("ContextMenuFrame", dropDownBoxStyle);
  837. /************************************************************************/
  838. /* MENU BAR */
  839. /************************************************************************/
  840. // MenuBar background
  841. GUIElementStyle menuBarBgStyle;
  842. menuBarBgStyle.normal.texture = getGUITexture(MenuBarBgTex);
  843. menuBarBgStyle.height = 14;
  844. menuBarBgStyle.width = 2;
  845. menuBarBgStyle.border.bottom = 2;
  846. skin->setStyle(GUIMenuBar::getBackgroundStyleType(), menuBarBgStyle);
  847. // MenuBar separator line
  848. GUIElementStyle menuBarLineStyle;
  849. menuBarLineStyle.normal.texture = getGUITexture(MenuBarLineNormalTex);
  850. menuBarLineStyle.normalOn.texture = getGUITexture(MenuBarLineActiveTex);
  851. menuBarLineStyle.fixedHeight = true;
  852. menuBarLineStyle.height = 1;
  853. skin->setStyle(GUIMenuBar::getLineStyleType(), menuBarLineStyle);
  854. // MenuBar Banshee logo
  855. GUIElementStyle menuBarBansheeLogoStyle;
  856. menuBarBansheeLogoStyle.normal.texture = getGUITexture(MenuBarBansheeLogoTex);
  857. menuBarBansheeLogoStyle.fixedHeight = true;
  858. menuBarBansheeLogoStyle.fixedWidth = true;
  859. menuBarBansheeLogoStyle.height = 46;
  860. menuBarBansheeLogoStyle.width = 46;
  861. skin->setStyle(GUIMenuBar::getLogoStyleType(), menuBarBansheeLogoStyle);
  862. // MenuBar button
  863. GUIElementStyle menuBarBtnStyle;
  864. menuBarBtnStyle.normal.texture = getGUITexture(MenuBarBtnNormalTex);
  865. menuBarBtnStyle.hover.texture = getGUITexture(MenuBarBtnHoverTex);
  866. menuBarBtnStyle.active.texture = getGUITexture(MenuBarBtnActiveTex);
  867. menuBarBtnStyle.normalOn.texture = menuBarBtnStyle.active.texture;
  868. menuBarBtnStyle.hoverOn.texture = menuBarBtnStyle.active.texture;
  869. menuBarBtnStyle.activeOn.texture = menuBarBtnStyle.active.texture;
  870. menuBarBtnStyle.normal.textColor = TextNormalColor;
  871. menuBarBtnStyle.hover.textColor = TextNormalColor;
  872. menuBarBtnStyle.active.textColor = TextActiveColor;
  873. menuBarBtnStyle.normalOn.textColor = TextActiveColor;
  874. menuBarBtnStyle.hoverOn.textColor = TextActiveColor;
  875. menuBarBtnStyle.activeOn.textColor = TextActiveColor;
  876. menuBarBtnStyle.fixedHeight = true;
  877. menuBarBtnStyle.fixedWidth = false;
  878. menuBarBtnStyle.height = 14;
  879. menuBarBtnStyle.width = 4;
  880. menuBarBtnStyle.margins.left = 2;
  881. menuBarBtnStyle.margins.right = 2;
  882. menuBarBtnStyle.margins.top = 2;
  883. menuBarBtnStyle.margins.bottom = 2;
  884. menuBarBtnStyle.font = font;
  885. menuBarBtnStyle.fontSize = DefaultFontSize;
  886. menuBarBtnStyle.textHorzAlign = THA_Left;
  887. menuBarBtnStyle.textVertAlign = TVA_Top;
  888. skin->setStyle(GUIMenuBar::getMenuItemButtonStyleType(), menuBarBtnStyle);
  889. // ToolBar separator
  890. GUIElementStyle toolBarSeparator;
  891. toolBarSeparator.normal.texture = getGUITexture(ToolBarSeparatorTex);
  892. toolBarSeparator.fixedWidth = true;
  893. toolBarSeparator.width = 3;
  894. toolBarSeparator.height = 30;
  895. skin->setStyle(GUIMenuBar::getToolBarSeparatorStyleType(), toolBarSeparator);
  896. // ToolBar button
  897. GUIElementStyle toolBarBtnStyle;
  898. toolBarBtnStyle.normal.texture = getGUITexture(ToolBarBtnNormalTex);
  899. toolBarBtnStyle.hover.texture = getGUITexture(ToolBarBtnHoverTex);
  900. toolBarBtnStyle.active.texture = getGUITexture(ToolBarBtnActiveTex);
  901. toolBarBtnStyle.normal.textColor = TextNormalColor;
  902. toolBarBtnStyle.hover.textColor = TextNormalColor;
  903. toolBarBtnStyle.active.textColor = TextActiveColor;
  904. toolBarBtnStyle.fixedHeight = true;
  905. toolBarBtnStyle.fixedWidth = true;
  906. toolBarBtnStyle.height = 30;
  907. toolBarBtnStyle.width = 30;
  908. skin->setStyle(GUIMenuBar::getToolBarButtonStyleType(), toolBarBtnStyle);
  909. /************************************************************************/
  910. /* DOCK SLIDER */
  911. /************************************************************************/
  912. GUIElementStyle dockSliderBtnStyle;
  913. dockSliderBtnStyle.normal.texture = getGUITexture(DockSliderNormalTex);
  914. dockSliderBtnStyle.hover.texture = dockSliderBtnStyle.normal.texture;
  915. dockSliderBtnStyle.active.texture = dockSliderBtnStyle.normal.texture;
  916. dockSliderBtnStyle.fixedHeight = false;
  917. dockSliderBtnStyle.fixedWidth = false;
  918. dockSliderBtnStyle.height = 2;
  919. dockSliderBtnStyle.width = 2;
  920. skin->setStyle("DockSliderBtn", dockSliderBtnStyle);
  921. /************************************************************************/
  922. /* TREE VIEW */
  923. /************************************************************************/
  924. // Expand button
  925. GUIElementStyle treeViewExpandButtonStyle;
  926. treeViewExpandButtonStyle.normal.texture = getGUITexture(TreeViewExpandButtonOffNormal);
  927. treeViewExpandButtonStyle.hover.texture = getGUITexture(TreeViewExpandButtonOffHover);
  928. treeViewExpandButtonStyle.active.texture = treeViewExpandButtonStyle.hover.texture;
  929. treeViewExpandButtonStyle.normalOn.texture = getGUITexture(TreeViewExpandButtonOnNormal);
  930. treeViewExpandButtonStyle.hoverOn.texture = getGUITexture(TreeViewExpandButtonOnHover);
  931. treeViewExpandButtonStyle.activeOn.texture = treeViewExpandButtonStyle.hoverOn.texture;
  932. treeViewExpandButtonStyle.fixedHeight = true;
  933. treeViewExpandButtonStyle.fixedWidth = true;
  934. treeViewExpandButtonStyle.height = 10;
  935. treeViewExpandButtonStyle.width = 10;
  936. skin->setStyle("TreeViewFoldoutBtn", treeViewExpandButtonStyle);
  937. // Entry
  938. GUIElementStyle treeViewEntryStyle;
  939. treeViewEntryStyle.font = font;
  940. treeViewEntryStyle.fontSize = DefaultFontSize;
  941. treeViewEntryStyle.fixedWidth = false;
  942. treeViewEntryStyle.fixedHeight = true;
  943. treeViewEntryStyle.height = 16;
  944. treeViewEntryStyle.minWidth = 10;
  945. treeViewEntryStyle.normal.textColor = TextNormalColor;
  946. skin->setStyle("TreeViewElementBtn", treeViewEntryStyle);
  947. // Selection background
  948. GUIElementStyle treeViewSelBackgroundStyle;
  949. treeViewSelBackgroundStyle.normal.texture = getGUITexture(SelectionBgTex);
  950. treeViewSelBackgroundStyle.fixedHeight = false;
  951. treeViewSelBackgroundStyle.fixedWidth = false;
  952. treeViewSelBackgroundStyle.height = 2;
  953. treeViewSelBackgroundStyle.width = 2;
  954. skin->setStyle("TreeViewSelectionBackground", treeViewSelBackgroundStyle);
  955. // Highlight background
  956. GUIElementStyle treeViewHLBackgroundStyle;
  957. treeViewHLBackgroundStyle.normal.texture = getGUITexture(TreeViewHighlightBackground);
  958. treeViewHLBackgroundStyle.fixedHeight = false;
  959. treeViewHLBackgroundStyle.fixedWidth = false;
  960. treeViewHLBackgroundStyle.height = 2;
  961. treeViewHLBackgroundStyle.width = 2;
  962. skin->setStyle("TreeViewHighlightBackground", treeViewHLBackgroundStyle);
  963. // Edit box
  964. GUIElementStyle treeViewEditBox;
  965. treeViewEditBox.normal.texture = getGUITexture(TreeViewEditBox);
  966. treeViewEditBox.hover.texture = treeViewEditBox.normal.texture;
  967. treeViewEditBox.focused.texture = treeViewEditBox.normal.texture;
  968. treeViewEditBox.active.texture = treeViewEditBox.normal.texture;
  969. treeViewEditBox.normal.textColor = TextNormalColor;
  970. treeViewEditBox.hover.textColor = TextNormalColor;
  971. treeViewEditBox.focused.textColor = TextNormalColor;
  972. treeViewEditBox.active.textColor = TextNormalColor;
  973. treeViewEditBox.border.left = 1;
  974. treeViewEditBox.border.right = 1;
  975. treeViewEditBox.border.top = 1;
  976. treeViewEditBox.border.bottom = 1;
  977. treeViewEditBox.margins.left = 1;
  978. treeViewEditBox.margins.right = 1;
  979. treeViewEditBox.margins.top = 1;
  980. treeViewEditBox.margins.bottom = 1;
  981. treeViewEditBox.fixedHeight = true;
  982. treeViewEditBox.height = 13;
  983. treeViewEditBox.minWidth = 10;
  984. treeViewEditBox.font = font;
  985. treeViewEditBox.fontSize = DefaultFontSize;
  986. treeViewEditBox.textHorzAlign = THA_Left;
  987. treeViewEditBox.textVertAlign = TVA_Top;
  988. skin->setStyle(GUITreeViewEditBox::getGUITypeName(), treeViewEditBox);
  989. // Element highlight
  990. GUIElementStyle treeViewElementHighlight;
  991. treeViewElementHighlight.normal.texture = getGUITexture(TreeViewElementHighlight);
  992. treeViewElementHighlight.border.left = 1;
  993. treeViewElementHighlight.border.right = 1;
  994. treeViewElementHighlight.border.top = 1;
  995. treeViewElementHighlight.border.bottom = 1;
  996. skin->setStyle("TreeViewElementHighlight", treeViewElementHighlight);
  997. // Element separator highlight
  998. GUIElementStyle treeViewElementSepHighlight;
  999. treeViewElementSepHighlight.normal.texture = getGUITexture(TreeViewElementSepHighlight);
  1000. treeViewElementSepHighlight.border.left = 1;
  1001. treeViewElementSepHighlight.border.right = 1;
  1002. treeViewElementSepHighlight.border.top = 1;
  1003. treeViewElementSepHighlight.border.bottom = 1;
  1004. skin->setStyle("TreeViewElementSepHighlight", treeViewElementSepHighlight);
  1005. /************************************************************************/
  1006. /* OBJECT DROP FIELD */
  1007. /************************************************************************/
  1008. GUIElementStyle objectDropStyle;
  1009. objectDropStyle.normal.texture = getGUITexture(ObjectDropBtnNormalTex);
  1010. objectDropStyle.normalOn.texture = getGUITexture(ObjectDropBtnNormalOnTex);
  1011. objectDropStyle.normal.textColor = TextNormalColor;
  1012. objectDropStyle.hover.textColor = TextNormalColor;
  1013. objectDropStyle.active.textColor = TextNormalColor;
  1014. objectDropStyle.normalOn.textColor = TextNormalColor;
  1015. objectDropStyle.hoverOn.textColor = TextNormalColor;
  1016. objectDropStyle.activeOn.textColor = TextNormalColor;
  1017. objectDropStyle.border.left = 2;
  1018. objectDropStyle.border.top = 2;
  1019. objectDropStyle.border.bottom = 4;
  1020. objectDropStyle.contentOffset.left = 3;
  1021. objectDropStyle.contentOffset.right = 1;
  1022. objectDropStyle.margins.bottom = 2;
  1023. objectDropStyle.fixedHeight = true;
  1024. objectDropStyle.height = 21;
  1025. objectDropStyle.minWidth = 20;
  1026. objectDropStyle.font = font;
  1027. objectDropStyle.fontSize = DefaultFontSize;
  1028. objectDropStyle.textHorzAlign = THA_Center;
  1029. objectDropStyle.textVertAlign = TVA_Center;
  1030. skin->setStyle(ObjectFieldDropBtnStyleName, objectDropStyle);
  1031. GUIElementStyle objectClearBtnStyle;
  1032. objectClearBtnStyle.normal.texture = getGUITexture(ObjectClearBtnNormalTex);
  1033. objectClearBtnStyle.hover.texture = getGUITexture(ObjectClearBtnHoverTex);
  1034. objectClearBtnStyle.active.texture = getGUITexture(ObjectClearBtnActiveTex);
  1035. objectClearBtnStyle.fixedHeight = true;
  1036. objectClearBtnStyle.fixedWidth = true;
  1037. objectClearBtnStyle.height = 21;
  1038. objectClearBtnStyle.width = 16;
  1039. objectClearBtnStyle.margins.bottom = 2;
  1040. skin->setStyle(ObjectFieldClearBtnStyleName, objectClearBtnStyle);
  1041. GUIElementStyle editorObjectFieldStyle;
  1042. editorObjectFieldStyle.fixedHeight = true;
  1043. editorObjectFieldStyle.height = 21;
  1044. editorObjectFieldStyle.minWidth = 30;
  1045. editorObjectFieldStyle.subStyles[ObjectFieldLabelStyleName] = GUITextField::getLabelStyleType();
  1046. editorObjectFieldStyle.subStyles[ObjectFieldDropBtnStyleName] = ObjectFieldDropBtnStyleName;
  1047. editorObjectFieldStyle.subStyles[ObjectFieldClearBtnStyleName] = ObjectFieldClearBtnStyleName;
  1048. skin->setStyle(ObjectFieldStyleName, editorObjectFieldStyle);
  1049. /************************************************************************/
  1050. /* TEXTURE DROP FIELD */
  1051. /************************************************************************/
  1052. GUIElementStyle textureFieldStyle;
  1053. textureFieldStyle.minHeight = 15;
  1054. textureFieldStyle.minWidth = 15;
  1055. textureFieldStyle.subStyles[TextureFieldDropStyleName] = TextureFieldDropStyleName;
  1056. textureFieldStyle.subStyles[TextureFieldClearBtnStyleName] = TextureFieldClearBtnStyleName;
  1057. textureFieldStyle.subStyles[TextureFieldLabelStyleName] = GUITextField::getLabelStyleType();
  1058. skin->setStyle(TextureFieldStyleName, textureFieldStyle);
  1059. GUIElementStyle textureDropStyle;
  1060. textureDropStyle.font = font;
  1061. textureDropStyle.fontSize = DefaultFontSize;
  1062. textureDropStyle.textHorzAlign = THA_Center;
  1063. textureDropStyle.textVertAlign = TVA_Center;
  1064. textureDropStyle.normal.textColor = Color(95 / 255.0f, 95 / 255.0f, 95 / 255.0f, 1.0f);
  1065. textureDropStyle.normal.texture = getGUITexture(TextureDropTex);
  1066. textureDropStyle.hover.textColor = textureDropStyle.normal.textColor;
  1067. textureDropStyle.hover.texture = textureDropStyle.normal.texture;
  1068. textureDropStyle.active.textColor = textureDropStyle.normal.textColor;
  1069. textureDropStyle.active.texture = textureDropStyle.normal.texture;
  1070. textureDropStyle.normalOn.textColor = Color(95 / 255.0f, 95 / 255.0f, 95 / 255.0f, 1.0f);
  1071. textureDropStyle.normalOn.texture = getGUITexture(TextureDropOnTex);
  1072. textureDropStyle.hoverOn.textColor = textureDropStyle.normalOn.textColor;
  1073. textureDropStyle.hoverOn.texture = textureDropStyle.normalOn.texture;
  1074. textureDropStyle.activeOn.textColor = textureDropStyle.normalOn.textColor;
  1075. textureDropStyle.activeOn.texture = textureDropStyle.normalOn.texture;
  1076. textureDropStyle.height = 84;
  1077. textureDropStyle.width = 82;
  1078. textureDropStyle.fixedHeight = true;
  1079. textureDropStyle.fixedWidth = true;
  1080. textureDropStyle.border.left = 2;
  1081. textureDropStyle.border.right = 2;
  1082. textureDropStyle.border.top = 2;
  1083. textureDropStyle.border.bottom = 4;
  1084. skin->setStyle(TextureFieldDropStyleName, textureDropStyle);
  1085. GUIElementStyle textureDropClearStyle;
  1086. textureDropClearStyle.normal.texture = getGUITexture(XButtonNormalTex);
  1087. textureDropClearStyle.hover.texture = getGUITexture(XButtonHoverTex);
  1088. textureDropClearStyle.active.texture = getGUITexture(XButtonActiveTex);
  1089. textureDropClearStyle.fixedWidth = true;
  1090. textureDropClearStyle.fixedHeight = true;
  1091. textureDropClearStyle.height = 10;
  1092. textureDropClearStyle.width = 10;
  1093. skin->setStyle(TextureFieldClearBtnStyleName, textureDropClearStyle);
  1094. /************************************************************************/
  1095. /* EDITOR FIELDS */
  1096. /************************************************************************/
  1097. GUIElementStyle editorFieldLabelStyle;
  1098. editorFieldLabelStyle.font = font;
  1099. editorFieldLabelStyle.fontSize = DefaultFontSize;
  1100. editorFieldLabelStyle.normal.textColor = TextNormalColor;
  1101. editorFieldLabelStyle.fixedWidth = false;
  1102. editorFieldLabelStyle.fixedHeight = true;
  1103. editorFieldLabelStyle.height = 14;
  1104. editorFieldLabelStyle.minWidth = 10;
  1105. editorFieldLabelStyle.textHorzAlign = THA_Left;
  1106. skin->setStyle(GUITextField::getLabelStyleType(), editorFieldLabelStyle);
  1107. GUIElementStyle editorIntFieldStyle;
  1108. editorIntFieldStyle.fixedHeight = true;
  1109. editorIntFieldStyle.height = 21;
  1110. editorIntFieldStyle.minWidth = 30;
  1111. editorIntFieldStyle.subStyles[GUIIntField::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1112. editorIntFieldStyle.subStyles[GUIIntField::getInputStyleType()] = GUIInputBox::getGUITypeName();
  1113. skin->setStyle(GUIIntField::getGUITypeName(), editorIntFieldStyle);
  1114. GUIElementStyle editorFloatFieldStyle;
  1115. editorFloatFieldStyle.fixedHeight = true;
  1116. editorFloatFieldStyle.height = 21;
  1117. editorFloatFieldStyle.minWidth = 30;
  1118. editorFloatFieldStyle.subStyles[GUIFloatField::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1119. editorFloatFieldStyle.subStyles[GUIFloatField::getInputStyleType()] = GUIInputBox::getGUITypeName();
  1120. skin->setStyle(GUIFloatField::getGUITypeName(), editorFloatFieldStyle);
  1121. GUIElementStyle editorTextFieldStyle;
  1122. editorTextFieldStyle.fixedHeight = true;
  1123. editorTextFieldStyle.height = 21;
  1124. editorTextFieldStyle.minWidth = 30;
  1125. editorTextFieldStyle.subStyles[GUITextField::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1126. editorTextFieldStyle.subStyles[GUITextField::getInputStyleType()] = GUIInputBox::getGUITypeName();
  1127. skin->setStyle(GUITextField::getGUITypeName(), editorTextFieldStyle);
  1128. GUIElementStyle editorColorFieldStyle;
  1129. editorColorFieldStyle.fixedHeight = true;
  1130. editorColorFieldStyle.height = 15;
  1131. editorColorFieldStyle.minWidth = 30;
  1132. editorColorFieldStyle.subStyles[GUIColorField::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1133. editorColorFieldStyle.subStyles[GUIColorField::getColorInputStyleType()] = GUIColor::getGUITypeName();
  1134. skin->setStyle(GUIColorField::getGUITypeName(), editorColorFieldStyle);
  1135. GUIElementStyle editorToggleFieldStyle;
  1136. editorToggleFieldStyle.fixedHeight = true;
  1137. editorToggleFieldStyle.height = 15;
  1138. editorToggleFieldStyle.minWidth = 30;
  1139. editorToggleFieldStyle.subStyles[GUIToggleField::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1140. editorToggleFieldStyle.subStyles[GUIToggleField::getToggleStyleType()] = GUIToggle::getGUITypeName();
  1141. skin->setStyle(GUIToggleField::getGUITypeName(), editorToggleFieldStyle);
  1142. GUIElementStyle editorVector2FieldStyle;
  1143. editorVector2FieldStyle.fixedHeight = true;
  1144. editorVector2FieldStyle.height = 21;
  1145. editorVector2FieldStyle.minWidth = 30;
  1146. editorVector2FieldStyle.subStyles[GUIVector2Field::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1147. editorVector2FieldStyle.subStyles[GUIVector2Field::getFloatFieldStyleType()] = GUIFloatField::getGUITypeName();
  1148. skin->setStyle(GUIVector2Field::getGUITypeName(), editorVector2FieldStyle);
  1149. GUIElementStyle editorVector3FieldStyle;
  1150. editorVector3FieldStyle.fixedHeight = true;
  1151. editorVector3FieldStyle.height = 21;
  1152. editorVector3FieldStyle.minWidth = 30;
  1153. editorVector3FieldStyle.subStyles[GUIVector3Field::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1154. editorVector3FieldStyle.subStyles[GUIVector3Field::getFloatFieldStyleType()] = GUIFloatField::getGUITypeName();
  1155. skin->setStyle(GUIVector3Field::getGUITypeName(), editorVector3FieldStyle);
  1156. GUIElementStyle editorVector4FieldStyle;
  1157. editorVector4FieldStyle.fixedHeight = true;
  1158. editorVector4FieldStyle.height = 21;
  1159. editorVector4FieldStyle.minWidth = 30;
  1160. editorVector4FieldStyle.subStyles[GUIVector4Field::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1161. editorVector4FieldStyle.subStyles[GUIVector4Field::getFloatFieldStyleType()] = GUIFloatField::getGUITypeName();
  1162. skin->setStyle(GUIVector4Field::getGUITypeName(), editorVector4FieldStyle);
  1163. GUIElementStyle editorListBoxFieldStyle;
  1164. editorListBoxFieldStyle.fixedHeight = true;
  1165. editorListBoxFieldStyle.height = 21;
  1166. editorListBoxFieldStyle.minWidth = 30;
  1167. editorListBoxFieldStyle.subStyles[GUIListBoxField::getLabelStyleType()] = GUIListBoxField::getLabelStyleType();
  1168. editorListBoxFieldStyle.subStyles[GUIListBoxField::getListBoxStyleType()] = GUIListBox::getGUITypeName();
  1169. skin->setStyle(GUIListBoxField::getGUITypeName(), editorListBoxFieldStyle);
  1170. GUIElementStyle editorSliderFieldStyle;
  1171. editorSliderFieldStyle.fixedHeight = true;
  1172. editorSliderFieldStyle.height = 21;
  1173. editorSliderFieldStyle.minWidth = 30;
  1174. editorSliderFieldStyle.subStyles[GUISliderField::getLabelStyleType()] = GUISliderField::getLabelStyleType();
  1175. editorSliderFieldStyle.subStyles[GUISliderField::getInputStyleType()] = GUIInputBox::getGUITypeName();
  1176. editorSliderFieldStyle.subStyles[GUISliderField::getSliderStyleType()] = GUISliderHorz::getGUITypeName();
  1177. skin->setStyle(GUISliderField::getGUITypeName(), editorSliderFieldStyle);
  1178. /************************************************************************/
  1179. /* FOLDOUT */
  1180. /************************************************************************/
  1181. GUIElementStyle foldoutStyle;
  1182. foldoutStyle.normal.texture = getGUITexture(FoldoutClosedNormalTex);
  1183. foldoutStyle.hover.texture = getGUITexture(FoldoutClosedHoverTex);
  1184. foldoutStyle.active.texture = getGUITexture(FoldoutOpenActiveTex);
  1185. foldoutStyle.normalOn.texture = getGUITexture(FoldoutOpenNormalTex);
  1186. foldoutStyle.hoverOn.texture = getGUITexture(FoldoutOpenHoverTex);
  1187. foldoutStyle.activeOn.texture = getGUITexture(FoldoutOpenActiveTex);
  1188. foldoutStyle.normal.textColor = TextNormalColor;
  1189. foldoutStyle.hover.textColor = TextNormalColor;
  1190. foldoutStyle.active.textColor = TextNormalColor;
  1191. foldoutStyle.normalOn.textColor = TextNormalColor;
  1192. foldoutStyle.hoverOn.textColor = TextNormalColor;
  1193. foldoutStyle.activeOn.textColor = TextNormalColor;
  1194. foldoutStyle.fixedHeight = true;
  1195. foldoutStyle.fixedWidth = false;
  1196. foldoutStyle.height = 21;
  1197. foldoutStyle.minWidth = 17;
  1198. foldoutStyle.font = font;
  1199. foldoutStyle.fontSize = DefaultFontSize;
  1200. foldoutStyle.textHorzAlign = THA_Left;
  1201. foldoutStyle.textVertAlign = TVA_Center;
  1202. foldoutStyle.contentOffset = RectOffset(16, 0, 0, 0);
  1203. foldoutStyle.border.left = 15;
  1204. foldoutStyle.border.right = 2;
  1205. foldoutStyle.border.top = 2;
  1206. foldoutStyle.border.bottom = 4;
  1207. skin->setStyle("Foldout", foldoutStyle);
  1208. /************************************************************************/
  1209. /* PROGRESS BAR */
  1210. /************************************************************************/
  1211. GUIElementStyle progressBarBgStyle;
  1212. progressBarBgStyle.fixedHeight = true;
  1213. progressBarBgStyle.height = 17;
  1214. progressBarBgStyle.normal.texture = getGUITexture(ProgressBarBgTex);
  1215. progressBarBgStyle.border.left = 8;
  1216. progressBarBgStyle.border.right = 8;
  1217. skin->setStyle(GUIProgressBar::getBackgroundStyleType(), progressBarBgStyle);
  1218. GUIElementStyle progressBarFillStyle;
  1219. progressBarFillStyle.fixedHeight = true;
  1220. progressBarFillStyle.height = 16;
  1221. progressBarFillStyle.normal.texture = getGUITexture(ProgressBarFillTex);
  1222. progressBarFillStyle.border.left = 9;
  1223. progressBarFillStyle.border.right = 10;
  1224. skin->setStyle(GUIProgressBar::getBarStyleType(), progressBarFillStyle);
  1225. GUIElementStyle progressBarStyle;
  1226. progressBarStyle.fixedHeight = true;
  1227. progressBarStyle.height = 17;
  1228. progressBarStyle.minWidth = 100;
  1229. progressBarStyle.subStyles[GUIProgressBar::getBarStyleType()] = GUIProgressBar::getBarStyleType();
  1230. progressBarStyle.subStyles[GUIProgressBar::getBackgroundStyleType()] = GUIProgressBar::getBackgroundStyleType();
  1231. skin->setStyle(GUIProgressBar::getGUITypeName(), progressBarStyle);
  1232. /************************************************************************/
  1233. /* SLIDER */
  1234. /************************************************************************/
  1235. GUIElementStyle sliderHandleStyle;
  1236. sliderHandleStyle.fixedHeight = true;
  1237. sliderHandleStyle.fixedWidth = true;
  1238. sliderHandleStyle.width = 12;
  1239. sliderHandleStyle.height = 13;
  1240. sliderHandleStyle.normal.texture = getGUITexture(SliderHandleNormalTex);
  1241. sliderHandleStyle.hover.texture = getGUITexture(SliderHandleHoverTex);
  1242. sliderHandleStyle.active.texture = getGUITexture(SliderHandleActiveTex);
  1243. skin->setStyle(GUISlider::getHandleStyleType(), sliderHandleStyle);
  1244. GUIElementStyle sliderHorizontalBgStyle;
  1245. sliderHorizontalBgStyle.fixedHeight = true;
  1246. sliderHorizontalBgStyle.height = 10;
  1247. sliderHorizontalBgStyle.normal.texture = getGUITexture(SliderHBackgroundTex);
  1248. sliderHorizontalBgStyle.border.left = 4;
  1249. sliderHorizontalBgStyle.border.right = 4;
  1250. skin->setStyle("SliderHorzBg", sliderHorizontalBgStyle);
  1251. GUIElementStyle sliderHorizontalFillStyle;
  1252. sliderHorizontalFillStyle.fixedHeight = true;
  1253. sliderHorizontalFillStyle.height = 10;
  1254. sliderHorizontalFillStyle.normal.texture = getGUITexture(SliderHFillTex);
  1255. sliderHorizontalFillStyle.border.left = 6;
  1256. sliderHorizontalFillStyle.border.right = 4;
  1257. skin->setStyle("SliderHorzFill", sliderHorizontalFillStyle);
  1258. GUIElementStyle sliderHorizontalStyle;
  1259. sliderHorizontalStyle.fixedHeight = true;
  1260. sliderHorizontalStyle.height = 13;
  1261. sliderHorizontalStyle.width = 150;
  1262. sliderHorizontalStyle.minWidth = 10;
  1263. sliderHorizontalStyle.subStyles[GUISlider::getHandleStyleType()] = GUISlider::getHandleStyleType();
  1264. sliderHorizontalStyle.subStyles[GUISlider::getBackgroundStyleType()] = "SliderHorzBg";
  1265. sliderHorizontalStyle.subStyles[GUISlider::getFillStyleType()] = "SliderHorzFill";
  1266. skin->setStyle(GUISliderHorz::getGUITypeName(), sliderHorizontalStyle);
  1267. GUIElementStyle sliderVerticalBgStyle;
  1268. sliderVerticalBgStyle.fixedWidth = true;
  1269. sliderVerticalBgStyle.width = 10;
  1270. sliderVerticalBgStyle.normal.texture = getGUITexture(SliderVBackgroundTex);
  1271. sliderVerticalBgStyle.border.top = 4;
  1272. sliderVerticalBgStyle.border.bottom = 4;
  1273. skin->setStyle("SliderVertBg", sliderVerticalBgStyle);
  1274. GUIElementStyle sliderVerticalFillStyle;
  1275. sliderVerticalFillStyle.fixedWidth = true;
  1276. sliderVerticalFillStyle.width = 10;
  1277. sliderVerticalFillStyle.normal.texture = getGUITexture(SliderVFillTex);
  1278. sliderVerticalFillStyle.border.top = 6;
  1279. sliderVerticalFillStyle.border.bottom = 4;
  1280. skin->setStyle("SliderVertFill", sliderVerticalFillStyle);
  1281. GUIElementStyle sliderVerticalStyle;
  1282. sliderVerticalStyle.fixedWidth = true;
  1283. sliderVerticalStyle.width = 13;
  1284. sliderVerticalStyle.height = 150;
  1285. sliderVerticalStyle.minHeight = 10;
  1286. sliderVerticalStyle.subStyles[GUISlider::getHandleStyleType()] = GUISlider::getHandleStyleType();
  1287. sliderVerticalStyle.subStyles[GUISlider::getBackgroundStyleType()] = "SliderVertBg";
  1288. sliderVerticalStyle.subStyles[GUISlider::getFillStyleType()] = "SliderVertFill";
  1289. skin->setStyle(GUISliderVert::getGUITypeName(), sliderVerticalStyle);
  1290. /************************************************************************/
  1291. /* COLOR PICKER SLIDER */
  1292. /************************************************************************/
  1293. GUIElementStyle colorPickerSliderHorzHandleStyle;
  1294. colorPickerSliderHorzHandleStyle.fixedHeight = true;
  1295. colorPickerSliderHorzHandleStyle.fixedWidth = true;
  1296. colorPickerSliderHorzHandleStyle.height = 20;
  1297. colorPickerSliderHorzHandleStyle.width = 7;
  1298. colorPickerSliderHorzHandleStyle.normal.texture = getGUITexture(ColorPickerSliderHorzHandleTex);
  1299. colorPickerSliderHorzHandleStyle.hover.texture = colorPickerSliderHorzHandleStyle.normal.texture;
  1300. colorPickerSliderHorzHandleStyle.active.texture = colorPickerSliderHorzHandleStyle.normal.texture;
  1301. skin->setStyle("ColorSliderHorzHandle", colorPickerSliderHorzHandleStyle);
  1302. GUIElementStyle colorPickerSliderHorzStyle;
  1303. colorPickerSliderHorzStyle.fixedHeight = true;
  1304. colorPickerSliderHorzStyle.height = 32;
  1305. colorPickerSliderHorzStyle.minWidth = 20;
  1306. colorPickerSliderHorzStyle.subStyles[GUISlider::getHandleStyleType()] = "ColorSliderHorzHandle";
  1307. skin->setStyle("ColorSliderHorz", colorPickerSliderHorzStyle);
  1308. GUIElementStyle colorPickerSliderVertHandleStyle;
  1309. colorPickerSliderVertHandleStyle.fixedHeight = true;
  1310. colorPickerSliderVertHandleStyle.fixedWidth = true;
  1311. colorPickerSliderVertHandleStyle.height = 7;
  1312. colorPickerSliderVertHandleStyle.width = 45;
  1313. colorPickerSliderVertHandleStyle.normal.texture = getGUITexture(ColorPickerSliderVertHandleTex);
  1314. colorPickerSliderVertHandleStyle.hover.texture = colorPickerSliderVertHandleStyle.normal.texture;
  1315. colorPickerSliderVertHandleStyle.active.texture = colorPickerSliderVertHandleStyle.normal.texture;
  1316. skin->setStyle("ColorSliderVertHandle", colorPickerSliderVertHandleStyle);
  1317. GUIElementStyle colorPickerSliderVertStyle;
  1318. colorPickerSliderVertStyle.fixedWidth = true;
  1319. colorPickerSliderVertStyle.width = 30;
  1320. colorPickerSliderVertStyle.minHeight = 20;
  1321. colorPickerSliderVertStyle.subStyles[GUISlider::getHandleStyleType()] = "ColorSliderVertHandle";
  1322. skin->setStyle("ColorSliderVert", colorPickerSliderVertStyle);
  1323. GUIElementStyle colorPickerSlider2DHandleStyle;
  1324. colorPickerSlider2DHandleStyle.fixedHeight = true;
  1325. colorPickerSlider2DHandleStyle.fixedWidth = true;
  1326. colorPickerSlider2DHandleStyle.height = 8;
  1327. colorPickerSlider2DHandleStyle.width = 8;
  1328. colorPickerSlider2DHandleStyle.normal.texture = getGUITexture(ColorPickerSlider2DHandleTex);
  1329. colorPickerSlider2DHandleStyle.hover.texture = colorPickerSlider2DHandleStyle.normal.texture;
  1330. colorPickerSlider2DHandleStyle.active.texture = colorPickerSlider2DHandleStyle.normal.texture;
  1331. skin->setStyle("ColorSlider2DHandle", colorPickerSlider2DHandleStyle);
  1332. /************************************************************************/
  1333. /* STATUS BAR */
  1334. /************************************************************************/
  1335. GUIElementStyle statusBarBgStyle;
  1336. statusBarBgStyle.height = 16;
  1337. statusBarBgStyle.border.top = 2;
  1338. statusBarBgStyle.normal.texture = getGUITexture(StatusBarBgTex);
  1339. skin->setStyle(GUIStatusBar::getGUIBackgroundTypeName(), statusBarBgStyle);
  1340. GUIElementStyle statusBarMessageBtnStyle;
  1341. statusBarMessageBtnStyle.font = font;
  1342. statusBarMessageBtnStyle.fontSize = DefaultFontSize;
  1343. statusBarMessageBtnStyle.fixedHeight = true;
  1344. statusBarMessageBtnStyle.height = 16;
  1345. statusBarMessageBtnStyle.minWidth = 10;
  1346. statusBarMessageBtnStyle.textHorzAlign = THA_Left;
  1347. statusBarMessageBtnStyle.textVertAlign = TVA_Center;
  1348. statusBarMessageBtnStyle.imagePosition = GUIImagePosition::Left;
  1349. skin->setStyle(GUIStatusBar::getGUIMessageTypeName(), statusBarMessageBtnStyle);
  1350. GUIElementStyle statusBarStyle;
  1351. statusBarStyle.height = 16;
  1352. statusBarStyle.subStyles[GUIStatusBar::getGUIBackgroundTypeName()] = GUIStatusBar::getGUIBackgroundTypeName();
  1353. statusBarStyle.subStyles[GUIStatusBar::getGUIMessageTypeName()] = GUIStatusBar::getGUIMessageTypeName();
  1354. skin->setStyle(GUIStatusBar::getGUITypeName(), statusBarStyle);
  1355. /************************************************************************/
  1356. /* OTHER */
  1357. /************************************************************************/
  1358. // Right-aligned label
  1359. GUIElementStyle rightAlignedLabelStyle;
  1360. rightAlignedLabelStyle.font = font;
  1361. rightAlignedLabelStyle.fontSize = DefaultFontSize;
  1362. rightAlignedLabelStyle.fixedWidth = false;
  1363. rightAlignedLabelStyle.fixedHeight = true;
  1364. rightAlignedLabelStyle.height = 11;
  1365. rightAlignedLabelStyle.minWidth = 10;
  1366. rightAlignedLabelStyle.textHorzAlign = THA_Right;
  1367. rightAlignedLabelStyle.normal.textColor = TextNormalColor;
  1368. skin->setStyle("RightAlignedLabel", rightAlignedLabelStyle);
  1369. // Multi-line label
  1370. GUIElementStyle multiLinelabelStyle;
  1371. multiLinelabelStyle.font = font;
  1372. multiLinelabelStyle.fontSize = DefaultFontSize;
  1373. multiLinelabelStyle.fixedWidth = false;
  1374. multiLinelabelStyle.fixedHeight = true;
  1375. multiLinelabelStyle.height = 11;
  1376. multiLinelabelStyle.minWidth = 10;
  1377. multiLinelabelStyle.wordWrap = true;
  1378. multiLinelabelStyle.normal.textColor = TextNormalColor;
  1379. skin->setStyle("MultiLineLabel", multiLinelabelStyle);
  1380. // Multi-line centered label
  1381. GUIElementStyle multiLineCenteredLabelStyle;
  1382. multiLineCenteredLabelStyle.font = font;
  1383. multiLineCenteredLabelStyle.fontSize = DefaultFontSize;
  1384. multiLineCenteredLabelStyle.fixedWidth = false;
  1385. multiLineCenteredLabelStyle.fixedHeight = true;
  1386. multiLineCenteredLabelStyle.height = 11;
  1387. multiLineCenteredLabelStyle.minWidth = 10;
  1388. multiLineCenteredLabelStyle.wordWrap = true;
  1389. multiLineCenteredLabelStyle.textHorzAlign = THA_Center;
  1390. multiLineCenteredLabelStyle.normal.textColor = TextNormalColor;
  1391. skin->setStyle("MultiLineLabelCentered", multiLineCenteredLabelStyle);
  1392. // Selection area
  1393. GUIElementStyle selectionAreaStyle;
  1394. selectionAreaStyle.normal.texture = getGUITexture(SelectionAreaTex);
  1395. selectionAreaStyle.border.left = 1;
  1396. selectionAreaStyle.border.right = 1;
  1397. selectionAreaStyle.border.top = 1;
  1398. selectionAreaStyle.border.bottom = 1;
  1399. skin->setStyle("SelectionArea", selectionAreaStyle);
  1400. // Selectable label
  1401. GUIElementStyle selectableLabelStyle;
  1402. selectableLabelStyle.normalOn.texture = getGUITexture(SelectionBgTex);
  1403. selectableLabelStyle.hoverOn.texture = selectableLabelStyle.normalOn.texture;
  1404. selectableLabelStyle.activeOn.texture = selectableLabelStyle.normalOn.texture;
  1405. selectableLabelStyle.fixedHeight = true;
  1406. selectableLabelStyle.height = 11;
  1407. selectableLabelStyle.minWidth = 10;
  1408. selectableLabelStyle.font = font;
  1409. selectableLabelStyle.fontSize = DefaultFontSize;
  1410. selectableLabelStyle.textHorzAlign = THA_Left;
  1411. selectableLabelStyle.normal.textColor = TextNormalColor;
  1412. skin->setStyle("SelectableLabel", selectableLabelStyle);
  1413. // Scroll area background
  1414. GUIElementStyle scrollAreaBg;
  1415. scrollAreaBg.normal.texture = getGUITexture(ScrollAreaBgTex);
  1416. scrollAreaBg.minHeight = 6;
  1417. scrollAreaBg.minWidth = 4;
  1418. scrollAreaBg.border.left = 2;
  1419. scrollAreaBg.border.right = 2;
  1420. scrollAreaBg.border.top = 2;
  1421. scrollAreaBg.border.bottom = 4;
  1422. skin->setStyle("ScrollAreaBg", scrollAreaBg);
  1423. // Inspector title area background
  1424. GUIElementStyle inspectorTitleBg;
  1425. inspectorTitleBg.normal.texture = getGUITexture(InspectorTitleBgTex);
  1426. inspectorTitleBg.minHeight = 4;
  1427. inspectorTitleBg.border.bottom = 2;
  1428. skin->setStyle("InspectorTitleBg", inspectorTitleBg);
  1429. // Inspector content background
  1430. GUIElementStyle inspectorContentBg;
  1431. inspectorContentBg.normal.texture = getGUITexture(InspectorContentBgTex);
  1432. inspectorContentBg.minWidth = 4;
  1433. inspectorContentBg.minHeight = 6;
  1434. inspectorContentBg.border.left = 2;
  1435. inspectorContentBg.border.right = 2;
  1436. inspectorContentBg.border.top = 2;
  1437. inspectorContentBg.border.bottom = 4;
  1438. skin->setStyle("InspectorContentBg", inspectorContentBg);
  1439. // Inspector content alternate background
  1440. GUIElementStyle inspectorContentBgAlternate;
  1441. inspectorContentBgAlternate.normal.texture = getGUITexture(InspectorContentBgAlternateTex);
  1442. inspectorContentBgAlternate.minWidth = 4;
  1443. inspectorContentBgAlternate.minHeight = 6;
  1444. inspectorContentBgAlternate.border.left = 2;
  1445. inspectorContentBgAlternate.border.right = 2;
  1446. inspectorContentBgAlternate.border.top = 2;
  1447. inspectorContentBgAlternate.border.bottom = 4;
  1448. skin->setStyle("InspectorContentBgAlternate", inspectorContentBgAlternate);
  1449. return skin;
  1450. }
  1451. HSpriteTexture BuiltinEditorResources::getGUITexture(const WString& name)
  1452. {
  1453. Path texturePath = FileSystem::getWorkingDirectoryPath();
  1454. texturePath.append(EditorSkinFolder);
  1455. texturePath.append(L"sprite_" + name + L".asset");
  1456. return Resources::instance().load<SpriteTexture>(texturePath);
  1457. }
  1458. HSpriteTexture BuiltinEditorResources::getGUIIcon(const WString& name)
  1459. {
  1460. Path texturePath = FileSystem::getWorkingDirectoryPath();
  1461. texturePath.append(EditorIconFolder);
  1462. texturePath.append(L"sprite_" + name + L".asset");
  1463. return Resources::instance().load<SpriteTexture>(texturePath);
  1464. }
  1465. HShader BuiltinEditorResources::getShader(const WString& name)
  1466. {
  1467. Path programPath = EditorShaderFolder;
  1468. programPath.append(name + L".asset");
  1469. return gResources().load<Shader>(programPath);
  1470. }
  1471. HMaterial BuiltinEditorResources::createDockDropOverlayMaterial() const
  1472. {
  1473. return Material::create(mShaderDockOverlay);
  1474. }
  1475. HMaterial BuiltinEditorResources::createSceneGridMaterial() const
  1476. {
  1477. return Material::create(mShaderSceneGrid);
  1478. }
  1479. HMaterial BuiltinEditorResources::createPicking(CullingMode cullMode) const
  1480. {
  1481. UINT32 modeIdx = (UINT32)cullMode;
  1482. return Material::create(mShaderPicking[modeIdx]);
  1483. }
  1484. HMaterial BuiltinEditorResources::createPickingAlpha(CullingMode cullMode) const
  1485. {
  1486. UINT32 modeIdx = (UINT32)cullMode;
  1487. return Material::create(mShaderPickingAlpha[modeIdx]);
  1488. }
  1489. HMaterial BuiltinEditorResources::createWireGizmoMat() const
  1490. {
  1491. return Material::create(mShaderGizmoWire);
  1492. }
  1493. HMaterial BuiltinEditorResources::createSolidGizmoMat() const
  1494. {
  1495. return Material::create(mShaderGizmoSolid);
  1496. }
  1497. HMaterial BuiltinEditorResources::createIconGizmoMat() const
  1498. {
  1499. return Material::create(mShaderGizmoIcon);
  1500. }
  1501. HMaterial BuiltinEditorResources::createGizmoPickingMat() const
  1502. {
  1503. return Material::create(mShaderGizmoPicking);
  1504. }
  1505. HMaterial BuiltinEditorResources::createAlphaGizmoPickingMat() const
  1506. {
  1507. return Material::create(mShaderGizmoAlphaPicking);
  1508. }
  1509. HMaterial BuiltinEditorResources::createWireHandleMat() const
  1510. {
  1511. return Material::create(mShaderHandleWire);
  1512. }
  1513. HMaterial BuiltinEditorResources::createSolidHandleMat() const
  1514. {
  1515. return Material::create(mShaderHandleSolid);
  1516. }
  1517. HMaterial BuiltinEditorResources::createSelectionMat() const
  1518. {
  1519. return Material::create(mShaderSelection);
  1520. }
  1521. HSpriteTexture BuiltinEditorResources::getLibraryIcon(ProjectIcon icon) const
  1522. {
  1523. switch (icon)
  1524. {
  1525. case ProjectIcon::Folder:
  1526. return getGUIIcon(FolderIconTex);
  1527. case ProjectIcon::Font:
  1528. return getGUIIcon(FontIconTex);
  1529. case ProjectIcon::Mesh:
  1530. return getGUIIcon(MeshIconTex);
  1531. case ProjectIcon::Texture:
  1532. return getGUIIcon(TextureIconTex);
  1533. case ProjectIcon::PlainText:
  1534. return getGUIIcon(PlainTextIconTex);
  1535. case ProjectIcon::ScriptCode:
  1536. return getGUIIcon(ScriptCodeIconTex);
  1537. case ProjectIcon::Shader:
  1538. return getGUIIcon(ShaderIconTex);
  1539. case ProjectIcon::ShaderInclude:
  1540. return getGUIIcon(ShaderIncludeIconTex);
  1541. case ProjectIcon::Material:
  1542. return getGUIIcon(MaterialIconTex);
  1543. case ProjectIcon::SpriteTexture:
  1544. return getGUIIcon(SpriteTextureIconTex);
  1545. case ProjectIcon::Prefab:
  1546. return getGUIIcon(PrefabIconTex);
  1547. }
  1548. return HSpriteTexture();
  1549. }
  1550. HSpriteTexture BuiltinEditorResources::getToolbarIcon(ToolbarIcon icon) const
  1551. {
  1552. switch (icon)
  1553. {
  1554. case ToolbarIcon::NewCamera:
  1555. return getGUIIcon(L"ToolbarNewCameraIcon.png");
  1556. case ToolbarIcon::NewRenderable:
  1557. return getGUIIcon(L"ToolbarNewRenderableIcon.png");
  1558. case ToolbarIcon::NewPointLight:
  1559. return getGUIIcon(L"ToolbarNewPointLightIcon.png");
  1560. case ToolbarIcon::NewDirLight:
  1561. return getGUIIcon(L"ToolbarNewDirectionalLightIcon.png");
  1562. case ToolbarIcon::NewSpotLight:
  1563. return getGUIIcon(L"ToolbarNewSpotLightIcon.png");
  1564. case ToolbarIcon::NewCube:
  1565. return getGUIIcon(L"ToolbarNewCubeIcon.png");
  1566. case ToolbarIcon::NewSphere:
  1567. return getGUIIcon(L"ToolbarNewSphereIcon.png");
  1568. case ToolbarIcon::NewCone:
  1569. return getGUIIcon(L"ToolbarNewConeIcon.png");
  1570. case ToolbarIcon::NewQuad:
  1571. return getGUIIcon(L"ToolbarNewQuadIcon.png");
  1572. case ToolbarIcon::NewMat:
  1573. return getGUIIcon(L"ToolbarNewMaterialIcon.png");
  1574. case ToolbarIcon::NewCSScript:
  1575. return getGUIIcon(L"ToolbarNewCSScriptIcon.png");
  1576. case ToolbarIcon::NewShader:
  1577. return getGUIIcon(L"ToolbarNewShaderIcon.png");
  1578. case ToolbarIcon::NewSpriteTex:
  1579. return getGUIIcon(L"ToolbarNewSpriteTextureIcon.png");
  1580. case ToolbarIcon::Pause:
  1581. return getGUIIcon(L"ToolbarPauseIcon.png");
  1582. case ToolbarIcon::Play:
  1583. return getGUIIcon(L"ToolbarPlayIcon.png");
  1584. case ToolbarIcon::Step:
  1585. return getGUIIcon(L"ToolbarStepIcon.png");
  1586. case ToolbarIcon::Undo:
  1587. return getGUIIcon(L"ToolbarUndoIcon.png");
  1588. case ToolbarIcon::Redo:
  1589. return getGUIIcon(L"ToolbarRedoIcon.png");
  1590. case ToolbarIcon::OpenProject:
  1591. return getGUIIcon(L"ToolbarOpenProjectIcon.png");
  1592. case ToolbarIcon::SaveProject:
  1593. return getGUIIcon(L"ToolbarSaveProjectIcon.png");
  1594. case ToolbarIcon::SaveScene:
  1595. return getGUIIcon(L"ToolbarSaveSceneIcon.png");
  1596. }
  1597. return HSpriteTexture();
  1598. }
  1599. HSpriteTexture BuiltinEditorResources::getSceneWindowIcon(SceneWindowIcon icon) const
  1600. {
  1601. switch (icon)
  1602. {
  1603. case SceneWindowIcon::View:
  1604. return getGUIIcon(L"SceneViewIcon.png");
  1605. case SceneWindowIcon::Move:
  1606. return getGUIIcon(L"SceneMoveIcon.png");
  1607. case SceneWindowIcon::Rotate:
  1608. return getGUIIcon(L"SceneRotateIcon.png");
  1609. case SceneWindowIcon::Scale:
  1610. return getGUIIcon(L"SceneScaleIcon.png");
  1611. case SceneWindowIcon::Pivot:
  1612. return getGUIIcon(L"ScenePivotIcon.png");
  1613. case SceneWindowIcon::Center:
  1614. return getGUIIcon(L"SceneCenterIcon.png");
  1615. case SceneWindowIcon::Local:
  1616. return getGUIIcon(L"SceneLocalIcon.png");
  1617. case SceneWindowIcon::World:
  1618. return getGUIIcon(L"SceneWorldIcon.png");
  1619. case SceneWindowIcon::MoveSnap:
  1620. return getGUIIcon(L"SceneMoveSnapIcon.png");
  1621. case SceneWindowIcon::RotateSnap:
  1622. return getGUIIcon(L"SceneRotateSnapIcon.png");
  1623. }
  1624. return HSpriteTexture();
  1625. }
  1626. HSpriteTexture BuiltinEditorResources::getLibraryWindowIcon(LibraryWindowIcon icon) const
  1627. {
  1628. switch (icon)
  1629. {
  1630. case LibraryWindowIcon::Home:
  1631. return getGUIIcon(L"LibraryHomeIcon.png");
  1632. case LibraryWindowIcon::Up:
  1633. return getGUIIcon(L"LibraryUpIcon.png");
  1634. case LibraryWindowIcon::Clear:
  1635. return getGUIIcon(L"LibraryClearSearchIcon.png");
  1636. case LibraryWindowIcon::Options:
  1637. return getGUIIcon(L"LibraryOptionsIcon.png");
  1638. }
  1639. return HSpriteTexture();
  1640. }
  1641. HSpriteTexture BuiltinEditorResources::getIcon(EditorIcon icon) const
  1642. {
  1643. switch (icon)
  1644. {
  1645. case EditorIcon::XBtn:
  1646. return getGUIIcon(XButtonNormalTex);
  1647. }
  1648. return HSpriteTexture();
  1649. }
  1650. HSpriteTexture BuiltinEditorResources::getLogMessageIcon(LogMessageIcon icon) const
  1651. {
  1652. switch (icon)
  1653. {
  1654. case LogMessageIcon::Info:
  1655. return getGUIIcon(LogInfoIconTex);
  1656. case LogMessageIcon::Warning:
  1657. return getGUIIcon(LogWarningIconTex);
  1658. case LogMessageIcon::Error:
  1659. return getGUIIcon(LogErrorIconTex);
  1660. }
  1661. return HSpriteTexture();
  1662. }
  1663. WString BuiltinEditorResources::getEmptyShaderCode() const
  1664. {
  1665. Path filePath = FileSystem::getWorkingDirectoryPath();
  1666. filePath.append(BuiltinDataFolder);
  1667. filePath.append(EmptyShaderCodeFile);
  1668. DataStreamPtr fileStream = FileSystem::openFile(filePath);
  1669. if (fileStream != nullptr)
  1670. return fileStream->getAsWString();
  1671. return StringUtil::WBLANK;
  1672. }
  1673. WString BuiltinEditorResources::getEmptyCSScriptCode() const
  1674. {
  1675. Path filePath = FileSystem::getWorkingDirectoryPath();
  1676. filePath.append(BuiltinDataFolder);
  1677. filePath.append(EmptyCSScriptCodeFile);
  1678. DataStreamPtr fileStream = FileSystem::openFile(filePath);
  1679. if (fileStream != nullptr)
  1680. return fileStream->getAsWString();
  1681. return StringUtil::WBLANK;
  1682. }
  1683. }