BsBuiltinEditorResources.cpp 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005
  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.font = font;
  771. dropDownToggleEntryBtnStyle.fontSize = DefaultFontSize;
  772. dropDownToggleEntryBtnStyle.textHorzAlign = THA_Left;
  773. dropDownToggleEntryBtnStyle.textVertAlign = TVA_Center;
  774. skin->setStyle(GUIDropDownContent::ENTRY_TOGGLE_STYLE_TYPE, dropDownToggleEntryBtnStyle);
  775. // DropDown entry button with expand
  776. GUIElementStyle dropDownEntryExpBtnStyle;
  777. dropDownEntryExpBtnStyle.normal.texture = getGUITexture(DropDownBoxEntryExpNormalTex);
  778. dropDownEntryExpBtnStyle.hover.texture = getGUITexture(DropDownBoxEntryExpHoverTex);
  779. dropDownEntryExpBtnStyle.active.texture = dropDownEntryExpBtnStyle.hover.texture;
  780. dropDownEntryExpBtnStyle.normalOn.texture = dropDownEntryExpBtnStyle.hover.texture;
  781. dropDownEntryExpBtnStyle.hoverOn.texture = dropDownEntryExpBtnStyle.hover.texture;
  782. dropDownEntryExpBtnStyle.activeOn.texture = dropDownEntryExpBtnStyle.hover.texture;
  783. dropDownEntryExpBtnStyle.normal.textColor = TextNormalColor;
  784. dropDownEntryExpBtnStyle.hover.textColor = TextNormalColor;
  785. dropDownEntryExpBtnStyle.active.textColor = TextNormalColor;
  786. dropDownEntryExpBtnStyle.normalOn.textColor = TextNormalColor;
  787. dropDownEntryExpBtnStyle.hoverOn.textColor = TextNormalColor;
  788. dropDownEntryExpBtnStyle.activeOn.textColor = TextNormalColor;
  789. dropDownEntryExpBtnStyle.fixedHeight = true;
  790. dropDownEntryExpBtnStyle.fixedWidth = false;
  791. dropDownEntryExpBtnStyle.height = 16;
  792. dropDownEntryExpBtnStyle.width = 30;
  793. dropDownEntryExpBtnStyle.border.right = 13;
  794. dropDownEntryExpBtnStyle.font = font;
  795. dropDownEntryExpBtnStyle.fontSize = DefaultFontSize;
  796. dropDownEntryExpBtnStyle.textHorzAlign = THA_Left;
  797. dropDownEntryExpBtnStyle.textVertAlign = TVA_Center;
  798. skin->setStyle(GUIDropDownContent::ENTRY_EXP_STYLE_TYPE, dropDownEntryExpBtnStyle);
  799. // Drop down separator
  800. GUIElementStyle dropDownSeparatorStyle;
  801. dropDownSeparatorStyle.normal.texture = getGUITexture(DropDownSeparatorTex);
  802. dropDownSeparatorStyle.fixedHeight = true;
  803. dropDownSeparatorStyle.fixedWidth = false;
  804. dropDownSeparatorStyle.height = 3;
  805. dropDownSeparatorStyle.width = 30;
  806. skin->setStyle(GUIDropDownContent::SEPARATOR_STYLE_TYPE, dropDownSeparatorStyle);
  807. // Drop down content
  808. GUIElementStyle dropDownContentStyle;
  809. dropDownContentStyle.minWidth = 50;
  810. dropDownContentStyle.minHeight = 20;
  811. dropDownContentStyle.subStyles[GUIDropDownContent::ENTRY_TOGGLE_STYLE_TYPE] = GUIDropDownContent::ENTRY_TOGGLE_STYLE_TYPE;
  812. dropDownContentStyle.subStyles[GUIDropDownContent::ENTRY_STYLE_TYPE] = GUIDropDownContent::ENTRY_STYLE_TYPE;
  813. dropDownContentStyle.subStyles[GUIDropDownContent::ENTRY_EXP_STYLE_TYPE] = GUIDropDownContent::ENTRY_EXP_STYLE_TYPE;
  814. dropDownContentStyle.subStyles[GUIDropDownContent::SEPARATOR_STYLE_TYPE] = GUIDropDownContent::SEPARATOR_STYLE_TYPE;
  815. skin->setStyle("ListBoxContent", dropDownContentStyle);
  816. skin->setStyle("MenuBarContent", dropDownContentStyle);
  817. skin->setStyle("ContextMenuContent", dropDownContentStyle);
  818. // DropDown box frame
  819. GUIElementStyle dropDownBoxStyle;
  820. dropDownBoxStyle.normal.texture = getGUITexture(DropDownBoxBgTex);
  821. dropDownBoxStyle.hover.texture = dropDownBoxStyle.normal.texture;
  822. dropDownBoxStyle.active.texture = dropDownBoxStyle.hover.texture;
  823. dropDownBoxStyle.fixedHeight = false;
  824. dropDownBoxStyle.fixedWidth = false;
  825. dropDownBoxStyle.border.left = 2;
  826. dropDownBoxStyle.border.right = 2;
  827. dropDownBoxStyle.border.top = 2;
  828. dropDownBoxStyle.border.bottom = 4;
  829. dropDownBoxStyle.margins.left = 6;
  830. dropDownBoxStyle.margins.right = 6;
  831. dropDownBoxStyle.margins.top = 4;
  832. dropDownBoxStyle.margins.bottom = 6;
  833. skin->setStyle("ListBoxFrame", dropDownBoxStyle);
  834. skin->setStyle("MenuBarFrame", dropDownBoxStyle);
  835. skin->setStyle("ContextMenuFrame", dropDownBoxStyle);
  836. /************************************************************************/
  837. /* MENU BAR */
  838. /************************************************************************/
  839. // MenuBar background
  840. GUIElementStyle menuBarBgStyle;
  841. menuBarBgStyle.normal.texture = getGUITexture(MenuBarBgTex);
  842. menuBarBgStyle.height = 14;
  843. menuBarBgStyle.width = 2;
  844. menuBarBgStyle.border.bottom = 2;
  845. skin->setStyle(GUIMenuBar::getBackgroundStyleType(), menuBarBgStyle);
  846. // MenuBar separator line
  847. GUIElementStyle menuBarLineStyle;
  848. menuBarLineStyle.normal.texture = getGUITexture(MenuBarLineNormalTex);
  849. menuBarLineStyle.normalOn.texture = getGUITexture(MenuBarLineActiveTex);
  850. menuBarLineStyle.fixedHeight = true;
  851. menuBarLineStyle.height = 1;
  852. skin->setStyle(GUIMenuBar::getLineStyleType(), menuBarLineStyle);
  853. // MenuBar Banshee logo
  854. GUIElementStyle menuBarBansheeLogoStyle;
  855. menuBarBansheeLogoStyle.normal.texture = getGUITexture(MenuBarBansheeLogoTex);
  856. menuBarBansheeLogoStyle.fixedHeight = true;
  857. menuBarBansheeLogoStyle.fixedWidth = true;
  858. menuBarBansheeLogoStyle.height = 46;
  859. menuBarBansheeLogoStyle.width = 46;
  860. skin->setStyle(GUIMenuBar::getLogoStyleType(), menuBarBansheeLogoStyle);
  861. // MenuBar button
  862. GUIElementStyle menuBarBtnStyle;
  863. menuBarBtnStyle.normal.texture = getGUITexture(MenuBarBtnNormalTex);
  864. menuBarBtnStyle.hover.texture = getGUITexture(MenuBarBtnHoverTex);
  865. menuBarBtnStyle.active.texture = getGUITexture(MenuBarBtnActiveTex);
  866. menuBarBtnStyle.normalOn.texture = menuBarBtnStyle.active.texture;
  867. menuBarBtnStyle.hoverOn.texture = menuBarBtnStyle.active.texture;
  868. menuBarBtnStyle.activeOn.texture = menuBarBtnStyle.active.texture;
  869. menuBarBtnStyle.normal.textColor = TextNormalColor;
  870. menuBarBtnStyle.hover.textColor = TextNormalColor;
  871. menuBarBtnStyle.active.textColor = TextActiveColor;
  872. menuBarBtnStyle.normalOn.textColor = TextActiveColor;
  873. menuBarBtnStyle.hoverOn.textColor = TextActiveColor;
  874. menuBarBtnStyle.activeOn.textColor = TextActiveColor;
  875. menuBarBtnStyle.fixedHeight = true;
  876. menuBarBtnStyle.fixedWidth = false;
  877. menuBarBtnStyle.height = 14;
  878. menuBarBtnStyle.width = 4;
  879. menuBarBtnStyle.margins.left = 2;
  880. menuBarBtnStyle.margins.right = 2;
  881. menuBarBtnStyle.margins.top = 2;
  882. menuBarBtnStyle.margins.bottom = 2;
  883. menuBarBtnStyle.font = font;
  884. menuBarBtnStyle.fontSize = DefaultFontSize;
  885. menuBarBtnStyle.textHorzAlign = THA_Left;
  886. menuBarBtnStyle.textVertAlign = TVA_Top;
  887. skin->setStyle(GUIMenuBar::getMenuItemButtonStyleType(), menuBarBtnStyle);
  888. // ToolBar separator
  889. GUIElementStyle toolBarSeparator;
  890. toolBarSeparator.normal.texture = getGUITexture(ToolBarSeparatorTex);
  891. toolBarSeparator.fixedWidth = true;
  892. toolBarSeparator.width = 3;
  893. toolBarSeparator.height = 30;
  894. skin->setStyle(GUIMenuBar::getToolBarSeparatorStyleType(), toolBarSeparator);
  895. // ToolBar button
  896. GUIElementStyle toolBarBtnStyle;
  897. toolBarBtnStyle.normal.texture = getGUITexture(ToolBarBtnNormalTex);
  898. toolBarBtnStyle.hover.texture = getGUITexture(ToolBarBtnHoverTex);
  899. toolBarBtnStyle.active.texture = getGUITexture(ToolBarBtnActiveTex);
  900. toolBarBtnStyle.normal.textColor = TextNormalColor;
  901. toolBarBtnStyle.hover.textColor = TextNormalColor;
  902. toolBarBtnStyle.active.textColor = TextActiveColor;
  903. toolBarBtnStyle.fixedHeight = true;
  904. toolBarBtnStyle.fixedWidth = true;
  905. toolBarBtnStyle.height = 30;
  906. toolBarBtnStyle.width = 30;
  907. skin->setStyle(GUIMenuBar::getToolBarButtonStyleType(), toolBarBtnStyle);
  908. /************************************************************************/
  909. /* DOCK SLIDER */
  910. /************************************************************************/
  911. GUIElementStyle dockSliderBtnStyle;
  912. dockSliderBtnStyle.normal.texture = getGUITexture(DockSliderNormalTex);
  913. dockSliderBtnStyle.hover.texture = dockSliderBtnStyle.normal.texture;
  914. dockSliderBtnStyle.active.texture = dockSliderBtnStyle.normal.texture;
  915. dockSliderBtnStyle.fixedHeight = false;
  916. dockSliderBtnStyle.fixedWidth = false;
  917. dockSliderBtnStyle.height = 2;
  918. dockSliderBtnStyle.width = 2;
  919. skin->setStyle("DockSliderBtn", dockSliderBtnStyle);
  920. /************************************************************************/
  921. /* TREE VIEW */
  922. /************************************************************************/
  923. // Expand button
  924. GUIElementStyle treeViewExpandButtonStyle;
  925. treeViewExpandButtonStyle.normal.texture = getGUITexture(TreeViewExpandButtonOffNormal);
  926. treeViewExpandButtonStyle.hover.texture = getGUITexture(TreeViewExpandButtonOffHover);
  927. treeViewExpandButtonStyle.active.texture = treeViewExpandButtonStyle.hover.texture;
  928. treeViewExpandButtonStyle.normalOn.texture = getGUITexture(TreeViewExpandButtonOnNormal);
  929. treeViewExpandButtonStyle.hoverOn.texture = getGUITexture(TreeViewExpandButtonOnHover);
  930. treeViewExpandButtonStyle.activeOn.texture = treeViewExpandButtonStyle.hoverOn.texture;
  931. treeViewExpandButtonStyle.fixedHeight = true;
  932. treeViewExpandButtonStyle.fixedWidth = true;
  933. treeViewExpandButtonStyle.height = 10;
  934. treeViewExpandButtonStyle.width = 10;
  935. skin->setStyle("TreeViewFoldoutBtn", treeViewExpandButtonStyle);
  936. // Entry
  937. GUIElementStyle treeViewEntryStyle;
  938. treeViewEntryStyle.font = font;
  939. treeViewEntryStyle.fontSize = DefaultFontSize;
  940. treeViewEntryStyle.fixedWidth = false;
  941. treeViewEntryStyle.fixedHeight = true;
  942. treeViewEntryStyle.height = 16;
  943. treeViewEntryStyle.minWidth = 10;
  944. treeViewEntryStyle.normal.textColor = TextNormalColor;
  945. skin->setStyle("TreeViewElementBtn", treeViewEntryStyle);
  946. // Selection background
  947. GUIElementStyle treeViewSelBackgroundStyle;
  948. treeViewSelBackgroundStyle.normal.texture = getGUITexture(SelectionBgTex);
  949. treeViewSelBackgroundStyle.fixedHeight = false;
  950. treeViewSelBackgroundStyle.fixedWidth = false;
  951. treeViewSelBackgroundStyle.height = 2;
  952. treeViewSelBackgroundStyle.width = 2;
  953. skin->setStyle("TreeViewSelectionBackground", treeViewSelBackgroundStyle);
  954. // Highlight background
  955. GUIElementStyle treeViewHLBackgroundStyle;
  956. treeViewHLBackgroundStyle.normal.texture = getGUITexture(TreeViewHighlightBackground);
  957. treeViewHLBackgroundStyle.fixedHeight = false;
  958. treeViewHLBackgroundStyle.fixedWidth = false;
  959. treeViewHLBackgroundStyle.height = 2;
  960. treeViewHLBackgroundStyle.width = 2;
  961. skin->setStyle("TreeViewHighlightBackground", treeViewHLBackgroundStyle);
  962. // Edit box
  963. GUIElementStyle treeViewEditBox;
  964. treeViewEditBox.normal.texture = getGUITexture(TreeViewEditBox);
  965. treeViewEditBox.hover.texture = treeViewEditBox.normal.texture;
  966. treeViewEditBox.focused.texture = treeViewEditBox.normal.texture;
  967. treeViewEditBox.active.texture = treeViewEditBox.normal.texture;
  968. treeViewEditBox.normal.textColor = TextNormalColor;
  969. treeViewEditBox.hover.textColor = TextNormalColor;
  970. treeViewEditBox.focused.textColor = TextNormalColor;
  971. treeViewEditBox.active.textColor = TextNormalColor;
  972. treeViewEditBox.border.left = 1;
  973. treeViewEditBox.border.right = 1;
  974. treeViewEditBox.border.top = 1;
  975. treeViewEditBox.border.bottom = 1;
  976. treeViewEditBox.margins.left = 1;
  977. treeViewEditBox.margins.right = 1;
  978. treeViewEditBox.margins.top = 1;
  979. treeViewEditBox.margins.bottom = 1;
  980. treeViewEditBox.fixedHeight = true;
  981. treeViewEditBox.height = 13;
  982. treeViewEditBox.minWidth = 10;
  983. treeViewEditBox.font = font;
  984. treeViewEditBox.fontSize = DefaultFontSize;
  985. treeViewEditBox.textHorzAlign = THA_Left;
  986. treeViewEditBox.textVertAlign = TVA_Top;
  987. skin->setStyle(GUITreeViewEditBox::getGUITypeName(), treeViewEditBox);
  988. // Element highlight
  989. GUIElementStyle treeViewElementHighlight;
  990. treeViewElementHighlight.normal.texture = getGUITexture(TreeViewElementHighlight);
  991. treeViewElementHighlight.border.left = 1;
  992. treeViewElementHighlight.border.right = 1;
  993. treeViewElementHighlight.border.top = 1;
  994. treeViewElementHighlight.border.bottom = 1;
  995. skin->setStyle("TreeViewElementHighlight", treeViewElementHighlight);
  996. // Element separator highlight
  997. GUIElementStyle treeViewElementSepHighlight;
  998. treeViewElementSepHighlight.normal.texture = getGUITexture(TreeViewElementSepHighlight);
  999. treeViewElementSepHighlight.border.left = 1;
  1000. treeViewElementSepHighlight.border.right = 1;
  1001. treeViewElementSepHighlight.border.top = 1;
  1002. treeViewElementSepHighlight.border.bottom = 1;
  1003. skin->setStyle("TreeViewElementSepHighlight", treeViewElementSepHighlight);
  1004. /************************************************************************/
  1005. /* OBJECT DROP FIELD */
  1006. /************************************************************************/
  1007. GUIElementStyle objectDropStyle;
  1008. objectDropStyle.normal.texture = getGUITexture(ObjectDropBtnNormalTex);
  1009. objectDropStyle.normalOn.texture = getGUITexture(ObjectDropBtnNormalOnTex);
  1010. objectDropStyle.normal.textColor = TextNormalColor;
  1011. objectDropStyle.hover.textColor = TextNormalColor;
  1012. objectDropStyle.active.textColor = TextNormalColor;
  1013. objectDropStyle.normalOn.textColor = TextNormalColor;
  1014. objectDropStyle.hoverOn.textColor = TextNormalColor;
  1015. objectDropStyle.activeOn.textColor = TextNormalColor;
  1016. objectDropStyle.border.left = 2;
  1017. objectDropStyle.border.top = 2;
  1018. objectDropStyle.border.bottom = 4;
  1019. objectDropStyle.contentOffset.left = 3;
  1020. objectDropStyle.contentOffset.right = 1;
  1021. objectDropStyle.margins.bottom = 2;
  1022. objectDropStyle.fixedHeight = true;
  1023. objectDropStyle.height = 21;
  1024. objectDropStyle.minWidth = 20;
  1025. objectDropStyle.font = font;
  1026. objectDropStyle.fontSize = DefaultFontSize;
  1027. objectDropStyle.textHorzAlign = THA_Center;
  1028. objectDropStyle.textVertAlign = TVA_Center;
  1029. skin->setStyle(ObjectFieldDropBtnStyleName, objectDropStyle);
  1030. GUIElementStyle objectClearBtnStyle;
  1031. objectClearBtnStyle.normal.texture = getGUITexture(ObjectClearBtnNormalTex);
  1032. objectClearBtnStyle.hover.texture = getGUITexture(ObjectClearBtnHoverTex);
  1033. objectClearBtnStyle.active.texture = getGUITexture(ObjectClearBtnActiveTex);
  1034. objectClearBtnStyle.fixedHeight = true;
  1035. objectClearBtnStyle.fixedWidth = true;
  1036. objectClearBtnStyle.height = 21;
  1037. objectClearBtnStyle.width = 16;
  1038. objectClearBtnStyle.margins.bottom = 2;
  1039. skin->setStyle(ObjectFieldClearBtnStyleName, objectClearBtnStyle);
  1040. GUIElementStyle editorObjectFieldStyle;
  1041. editorObjectFieldStyle.fixedHeight = true;
  1042. editorObjectFieldStyle.height = 21;
  1043. editorObjectFieldStyle.minWidth = 30;
  1044. editorObjectFieldStyle.subStyles[ObjectFieldLabelStyleName] = GUITextField::getLabelStyleType();
  1045. editorObjectFieldStyle.subStyles[ObjectFieldDropBtnStyleName] = ObjectFieldDropBtnStyleName;
  1046. editorObjectFieldStyle.subStyles[ObjectFieldClearBtnStyleName] = ObjectFieldClearBtnStyleName;
  1047. skin->setStyle(ObjectFieldStyleName, editorObjectFieldStyle);
  1048. /************************************************************************/
  1049. /* TEXTURE DROP FIELD */
  1050. /************************************************************************/
  1051. GUIElementStyle textureFieldStyle;
  1052. textureFieldStyle.minHeight = 15;
  1053. textureFieldStyle.minWidth = 15;
  1054. textureFieldStyle.subStyles[TextureFieldDropStyleName] = TextureFieldDropStyleName;
  1055. textureFieldStyle.subStyles[TextureFieldClearBtnStyleName] = TextureFieldClearBtnStyleName;
  1056. textureFieldStyle.subStyles[TextureFieldLabelStyleName] = GUITextField::getLabelStyleType();
  1057. skin->setStyle(TextureFieldStyleName, textureFieldStyle);
  1058. GUIElementStyle textureDropStyle;
  1059. textureDropStyle.font = font;
  1060. textureDropStyle.fontSize = DefaultFontSize;
  1061. textureDropStyle.textHorzAlign = THA_Center;
  1062. textureDropStyle.textVertAlign = TVA_Center;
  1063. textureDropStyle.normal.textColor = Color(95 / 255.0f, 95 / 255.0f, 95 / 255.0f, 1.0f);
  1064. textureDropStyle.normal.texture = getGUITexture(TextureDropTex);
  1065. textureDropStyle.hover.textColor = textureDropStyle.normal.textColor;
  1066. textureDropStyle.hover.texture = textureDropStyle.normal.texture;
  1067. textureDropStyle.active.textColor = textureDropStyle.normal.textColor;
  1068. textureDropStyle.active.texture = textureDropStyle.normal.texture;
  1069. textureDropStyle.normalOn.textColor = Color(95 / 255.0f, 95 / 255.0f, 95 / 255.0f, 1.0f);
  1070. textureDropStyle.normalOn.texture = getGUITexture(TextureDropOnTex);
  1071. textureDropStyle.hoverOn.textColor = textureDropStyle.normalOn.textColor;
  1072. textureDropStyle.hoverOn.texture = textureDropStyle.normalOn.texture;
  1073. textureDropStyle.activeOn.textColor = textureDropStyle.normalOn.textColor;
  1074. textureDropStyle.activeOn.texture = textureDropStyle.normalOn.texture;
  1075. textureDropStyle.height = 84;
  1076. textureDropStyle.width = 82;
  1077. textureDropStyle.fixedHeight = true;
  1078. textureDropStyle.fixedWidth = true;
  1079. textureDropStyle.border.left = 2;
  1080. textureDropStyle.border.right = 2;
  1081. textureDropStyle.border.top = 2;
  1082. textureDropStyle.border.bottom = 4;
  1083. skin->setStyle(TextureFieldDropStyleName, textureDropStyle);
  1084. GUIElementStyle textureDropClearStyle;
  1085. textureDropClearStyle.normal.texture = getGUITexture(XButtonNormalTex);
  1086. textureDropClearStyle.hover.texture = getGUITexture(XButtonHoverTex);
  1087. textureDropClearStyle.active.texture = getGUITexture(XButtonActiveTex);
  1088. textureDropClearStyle.fixedWidth = true;
  1089. textureDropClearStyle.fixedHeight = true;
  1090. textureDropClearStyle.height = 10;
  1091. textureDropClearStyle.width = 10;
  1092. skin->setStyle(TextureFieldClearBtnStyleName, textureDropClearStyle);
  1093. /************************************************************************/
  1094. /* EDITOR FIELDS */
  1095. /************************************************************************/
  1096. GUIElementStyle editorFieldLabelStyle;
  1097. editorFieldLabelStyle.font = font;
  1098. editorFieldLabelStyle.fontSize = DefaultFontSize;
  1099. editorFieldLabelStyle.normal.textColor = TextNormalColor;
  1100. editorFieldLabelStyle.fixedWidth = false;
  1101. editorFieldLabelStyle.fixedHeight = true;
  1102. editorFieldLabelStyle.height = 14;
  1103. editorFieldLabelStyle.minWidth = 10;
  1104. editorFieldLabelStyle.textHorzAlign = THA_Left;
  1105. skin->setStyle(GUITextField::getLabelStyleType(), editorFieldLabelStyle);
  1106. GUIElementStyle editorIntFieldStyle;
  1107. editorIntFieldStyle.fixedHeight = true;
  1108. editorIntFieldStyle.height = 21;
  1109. editorIntFieldStyle.minWidth = 30;
  1110. editorIntFieldStyle.subStyles[GUIIntField::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1111. editorIntFieldStyle.subStyles[GUIIntField::getInputStyleType()] = GUIInputBox::getGUITypeName();
  1112. skin->setStyle(GUIIntField::getGUITypeName(), editorIntFieldStyle);
  1113. GUIElementStyle editorFloatFieldStyle;
  1114. editorFloatFieldStyle.fixedHeight = true;
  1115. editorFloatFieldStyle.height = 21;
  1116. editorFloatFieldStyle.minWidth = 30;
  1117. editorFloatFieldStyle.subStyles[GUIFloatField::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1118. editorFloatFieldStyle.subStyles[GUIFloatField::getInputStyleType()] = GUIInputBox::getGUITypeName();
  1119. skin->setStyle(GUIFloatField::getGUITypeName(), editorFloatFieldStyle);
  1120. GUIElementStyle editorTextFieldStyle;
  1121. editorTextFieldStyle.fixedHeight = true;
  1122. editorTextFieldStyle.height = 21;
  1123. editorTextFieldStyle.minWidth = 30;
  1124. editorTextFieldStyle.subStyles[GUITextField::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1125. editorTextFieldStyle.subStyles[GUITextField::getInputStyleType()] = GUIInputBox::getGUITypeName();
  1126. skin->setStyle(GUITextField::getGUITypeName(), editorTextFieldStyle);
  1127. GUIElementStyle editorColorFieldStyle;
  1128. editorColorFieldStyle.fixedHeight = true;
  1129. editorColorFieldStyle.height = 15;
  1130. editorColorFieldStyle.minWidth = 30;
  1131. editorColorFieldStyle.subStyles[GUIColorField::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1132. editorColorFieldStyle.subStyles[GUIColorField::getColorInputStyleType()] = GUIColor::getGUITypeName();
  1133. skin->setStyle(GUIColorField::getGUITypeName(), editorColorFieldStyle);
  1134. GUIElementStyle editorToggleFieldStyle;
  1135. editorToggleFieldStyle.fixedHeight = true;
  1136. editorToggleFieldStyle.height = 15;
  1137. editorToggleFieldStyle.minWidth = 30;
  1138. editorToggleFieldStyle.subStyles[GUIToggleField::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1139. editorToggleFieldStyle.subStyles[GUIToggleField::getToggleStyleType()] = GUIToggle::getGUITypeName();
  1140. skin->setStyle(GUIToggleField::getGUITypeName(), editorToggleFieldStyle);
  1141. GUIElementStyle editorVector2FieldStyle;
  1142. editorVector2FieldStyle.fixedHeight = true;
  1143. editorVector2FieldStyle.height = 21;
  1144. editorVector2FieldStyle.minWidth = 30;
  1145. editorVector2FieldStyle.subStyles[GUIVector2Field::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1146. editorVector2FieldStyle.subStyles[GUIVector2Field::getFloatFieldStyleType()] = GUIFloatField::getGUITypeName();
  1147. skin->setStyle(GUIVector2Field::getGUITypeName(), editorVector2FieldStyle);
  1148. GUIElementStyle editorVector3FieldStyle;
  1149. editorVector3FieldStyle.fixedHeight = true;
  1150. editorVector3FieldStyle.height = 21;
  1151. editorVector3FieldStyle.minWidth = 30;
  1152. editorVector3FieldStyle.subStyles[GUIVector3Field::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1153. editorVector3FieldStyle.subStyles[GUIVector3Field::getFloatFieldStyleType()] = GUIFloatField::getGUITypeName();
  1154. skin->setStyle(GUIVector3Field::getGUITypeName(), editorVector3FieldStyle);
  1155. GUIElementStyle editorVector4FieldStyle;
  1156. editorVector4FieldStyle.fixedHeight = true;
  1157. editorVector4FieldStyle.height = 21;
  1158. editorVector4FieldStyle.minWidth = 30;
  1159. editorVector4FieldStyle.subStyles[GUIVector4Field::getLabelStyleType()] = GUITextField::getLabelStyleType();
  1160. editorVector4FieldStyle.subStyles[GUIVector4Field::getFloatFieldStyleType()] = GUIFloatField::getGUITypeName();
  1161. skin->setStyle(GUIVector4Field::getGUITypeName(), editorVector4FieldStyle);
  1162. GUIElementStyle editorListBoxFieldStyle;
  1163. editorListBoxFieldStyle.fixedHeight = true;
  1164. editorListBoxFieldStyle.height = 21;
  1165. editorListBoxFieldStyle.minWidth = 30;
  1166. editorListBoxFieldStyle.subStyles[GUIListBoxField::getLabelStyleType()] = GUIListBoxField::getLabelStyleType();
  1167. editorListBoxFieldStyle.subStyles[GUIListBoxField::getListBoxStyleType()] = GUIListBox::getGUITypeName();
  1168. skin->setStyle(GUIListBoxField::getGUITypeName(), editorListBoxFieldStyle);
  1169. GUIElementStyle editorSliderFieldStyle;
  1170. editorSliderFieldStyle.fixedHeight = true;
  1171. editorSliderFieldStyle.height = 21;
  1172. editorSliderFieldStyle.minWidth = 30;
  1173. editorSliderFieldStyle.subStyles[GUISliderField::getLabelStyleType()] = GUISliderField::getLabelStyleType();
  1174. editorSliderFieldStyle.subStyles[GUISliderField::getInputStyleType()] = GUIInputBox::getGUITypeName();
  1175. editorSliderFieldStyle.subStyles[GUISliderField::getSliderStyleType()] = GUISliderHorz::getGUITypeName();
  1176. skin->setStyle(GUISliderField::getGUITypeName(), editorSliderFieldStyle);
  1177. /************************************************************************/
  1178. /* FOLDOUT */
  1179. /************************************************************************/
  1180. GUIElementStyle foldoutStyle;
  1181. foldoutStyle.normal.texture = getGUITexture(FoldoutClosedNormalTex);
  1182. foldoutStyle.hover.texture = getGUITexture(FoldoutClosedHoverTex);
  1183. foldoutStyle.active.texture = getGUITexture(FoldoutOpenActiveTex);
  1184. foldoutStyle.normalOn.texture = getGUITexture(FoldoutOpenNormalTex);
  1185. foldoutStyle.hoverOn.texture = getGUITexture(FoldoutOpenHoverTex);
  1186. foldoutStyle.activeOn.texture = getGUITexture(FoldoutOpenActiveTex);
  1187. foldoutStyle.normal.textColor = TextNormalColor;
  1188. foldoutStyle.hover.textColor = TextNormalColor;
  1189. foldoutStyle.active.textColor = TextNormalColor;
  1190. foldoutStyle.normalOn.textColor = TextNormalColor;
  1191. foldoutStyle.hoverOn.textColor = TextNormalColor;
  1192. foldoutStyle.activeOn.textColor = TextNormalColor;
  1193. foldoutStyle.fixedHeight = true;
  1194. foldoutStyle.fixedWidth = false;
  1195. foldoutStyle.height = 21;
  1196. foldoutStyle.minWidth = 17;
  1197. foldoutStyle.font = font;
  1198. foldoutStyle.fontSize = DefaultFontSize;
  1199. foldoutStyle.textHorzAlign = THA_Left;
  1200. foldoutStyle.textVertAlign = TVA_Center;
  1201. foldoutStyle.contentOffset = RectOffset(16, 0, 0, 0);
  1202. foldoutStyle.border.left = 15;
  1203. foldoutStyle.border.right = 2;
  1204. foldoutStyle.border.top = 2;
  1205. foldoutStyle.border.bottom = 4;
  1206. skin->setStyle("Foldout", foldoutStyle);
  1207. /************************************************************************/
  1208. /* PROGRESS BAR */
  1209. /************************************************************************/
  1210. GUIElementStyle progressBarBgStyle;
  1211. progressBarBgStyle.fixedHeight = true;
  1212. progressBarBgStyle.height = 17;
  1213. progressBarBgStyle.normal.texture = getGUITexture(ProgressBarBgTex);
  1214. progressBarBgStyle.border.left = 8;
  1215. progressBarBgStyle.border.right = 8;
  1216. skin->setStyle(GUIProgressBar::getBackgroundStyleType(), progressBarBgStyle);
  1217. GUIElementStyle progressBarFillStyle;
  1218. progressBarFillStyle.fixedHeight = true;
  1219. progressBarFillStyle.height = 16;
  1220. progressBarFillStyle.normal.texture = getGUITexture(ProgressBarFillTex);
  1221. progressBarFillStyle.border.left = 9;
  1222. progressBarFillStyle.border.right = 10;
  1223. skin->setStyle(GUIProgressBar::getBarStyleType(), progressBarFillStyle);
  1224. GUIElementStyle progressBarStyle;
  1225. progressBarStyle.fixedHeight = true;
  1226. progressBarStyle.height = 17;
  1227. progressBarStyle.minWidth = 100;
  1228. progressBarStyle.subStyles[GUIProgressBar::getBarStyleType()] = GUIProgressBar::getBarStyleType();
  1229. progressBarStyle.subStyles[GUIProgressBar::getBackgroundStyleType()] = GUIProgressBar::getBackgroundStyleType();
  1230. skin->setStyle(GUIProgressBar::getGUITypeName(), progressBarStyle);
  1231. /************************************************************************/
  1232. /* SLIDER */
  1233. /************************************************************************/
  1234. GUIElementStyle sliderHandleStyle;
  1235. sliderHandleStyle.fixedHeight = true;
  1236. sliderHandleStyle.fixedWidth = true;
  1237. sliderHandleStyle.width = 12;
  1238. sliderHandleStyle.height = 13;
  1239. sliderHandleStyle.normal.texture = getGUITexture(SliderHandleNormalTex);
  1240. sliderHandleStyle.hover.texture = getGUITexture(SliderHandleHoverTex);
  1241. sliderHandleStyle.active.texture = getGUITexture(SliderHandleActiveTex);
  1242. skin->setStyle(GUISlider::getHandleStyleType(), sliderHandleStyle);
  1243. GUIElementStyle sliderHorizontalBgStyle;
  1244. sliderHorizontalBgStyle.fixedHeight = true;
  1245. sliderHorizontalBgStyle.height = 10;
  1246. sliderHorizontalBgStyle.normal.texture = getGUITexture(SliderHBackgroundTex);
  1247. sliderHorizontalBgStyle.border.left = 4;
  1248. sliderHorizontalBgStyle.border.right = 4;
  1249. skin->setStyle("SliderHorzBg", sliderHorizontalBgStyle);
  1250. GUIElementStyle sliderHorizontalFillStyle;
  1251. sliderHorizontalFillStyle.fixedHeight = true;
  1252. sliderHorizontalFillStyle.height = 10;
  1253. sliderHorizontalFillStyle.normal.texture = getGUITexture(SliderHFillTex);
  1254. sliderHorizontalFillStyle.border.left = 6;
  1255. sliderHorizontalFillStyle.border.right = 4;
  1256. skin->setStyle("SliderHorzFill", sliderHorizontalFillStyle);
  1257. GUIElementStyle sliderHorizontalStyle;
  1258. sliderHorizontalStyle.fixedHeight = true;
  1259. sliderHorizontalStyle.height = 13;
  1260. sliderHorizontalStyle.width = 150;
  1261. sliderHorizontalStyle.minWidth = 10;
  1262. sliderHorizontalStyle.subStyles[GUISlider::getHandleStyleType()] = GUISlider::getHandleStyleType();
  1263. sliderHorizontalStyle.subStyles[GUISlider::getBackgroundStyleType()] = "SliderHorzBg";
  1264. sliderHorizontalStyle.subStyles[GUISlider::getFillStyleType()] = "SliderHorzFill";
  1265. skin->setStyle(GUISliderHorz::getGUITypeName(), sliderHorizontalStyle);
  1266. GUIElementStyle sliderVerticalBgStyle;
  1267. sliderVerticalBgStyle.fixedWidth = true;
  1268. sliderVerticalBgStyle.width = 10;
  1269. sliderVerticalBgStyle.normal.texture = getGUITexture(SliderVBackgroundTex);
  1270. sliderVerticalBgStyle.border.top = 4;
  1271. sliderVerticalBgStyle.border.bottom = 4;
  1272. skin->setStyle("SliderVertBg", sliderVerticalBgStyle);
  1273. GUIElementStyle sliderVerticalFillStyle;
  1274. sliderVerticalFillStyle.fixedWidth = true;
  1275. sliderVerticalFillStyle.width = 10;
  1276. sliderVerticalFillStyle.normal.texture = getGUITexture(SliderVFillTex);
  1277. sliderVerticalFillStyle.border.top = 6;
  1278. sliderVerticalFillStyle.border.bottom = 4;
  1279. skin->setStyle("SliderVertFill", sliderVerticalFillStyle);
  1280. GUIElementStyle sliderVerticalStyle;
  1281. sliderVerticalStyle.fixedWidth = true;
  1282. sliderVerticalStyle.width = 13;
  1283. sliderVerticalStyle.height = 150;
  1284. sliderVerticalStyle.minHeight = 10;
  1285. sliderVerticalStyle.subStyles[GUISlider::getHandleStyleType()] = GUISlider::getHandleStyleType();
  1286. sliderVerticalStyle.subStyles[GUISlider::getBackgroundStyleType()] = "SliderVertBg";
  1287. sliderVerticalStyle.subStyles[GUISlider::getFillStyleType()] = "SliderVertFill";
  1288. skin->setStyle(GUISliderVert::getGUITypeName(), sliderVerticalStyle);
  1289. /************************************************************************/
  1290. /* COLOR PICKER SLIDER */
  1291. /************************************************************************/
  1292. GUIElementStyle colorPickerSliderHorzHandleStyle;
  1293. colorPickerSliderHorzHandleStyle.fixedHeight = true;
  1294. colorPickerSliderHorzHandleStyle.fixedWidth = true;
  1295. colorPickerSliderHorzHandleStyle.height = 20;
  1296. colorPickerSliderHorzHandleStyle.width = 7;
  1297. colorPickerSliderHorzHandleStyle.normal.texture = getGUITexture(ColorPickerSliderHorzHandleTex);
  1298. colorPickerSliderHorzHandleStyle.hover.texture = colorPickerSliderHorzHandleStyle.normal.texture;
  1299. colorPickerSliderHorzHandleStyle.active.texture = colorPickerSliderHorzHandleStyle.normal.texture;
  1300. skin->setStyle("ColorSliderHorzHandle", colorPickerSliderHorzHandleStyle);
  1301. GUIElementStyle colorPickerSliderHorzStyle;
  1302. colorPickerSliderHorzStyle.fixedHeight = true;
  1303. colorPickerSliderHorzStyle.height = 32;
  1304. colorPickerSliderHorzStyle.minWidth = 20;
  1305. colorPickerSliderHorzStyle.subStyles[GUISlider::getHandleStyleType()] = "ColorSliderHorzHandle";
  1306. skin->setStyle("ColorSliderHorz", colorPickerSliderHorzStyle);
  1307. GUIElementStyle colorPickerSliderVertHandleStyle;
  1308. colorPickerSliderVertHandleStyle.fixedHeight = true;
  1309. colorPickerSliderVertHandleStyle.fixedWidth = true;
  1310. colorPickerSliderVertHandleStyle.height = 7;
  1311. colorPickerSliderVertHandleStyle.width = 45;
  1312. colorPickerSliderVertHandleStyle.normal.texture = getGUITexture(ColorPickerSliderVertHandleTex);
  1313. colorPickerSliderVertHandleStyle.hover.texture = colorPickerSliderVertHandleStyle.normal.texture;
  1314. colorPickerSliderVertHandleStyle.active.texture = colorPickerSliderVertHandleStyle.normal.texture;
  1315. skin->setStyle("ColorSliderVertHandle", colorPickerSliderVertHandleStyle);
  1316. GUIElementStyle colorPickerSliderVertStyle;
  1317. colorPickerSliderVertStyle.fixedWidth = true;
  1318. colorPickerSliderVertStyle.width = 30;
  1319. colorPickerSliderVertStyle.minHeight = 20;
  1320. colorPickerSliderVertStyle.subStyles[GUISlider::getHandleStyleType()] = "ColorSliderVertHandle";
  1321. skin->setStyle("ColorSliderVert", colorPickerSliderVertStyle);
  1322. GUIElementStyle colorPickerSlider2DHandleStyle;
  1323. colorPickerSlider2DHandleStyle.fixedHeight = true;
  1324. colorPickerSlider2DHandleStyle.fixedWidth = true;
  1325. colorPickerSlider2DHandleStyle.height = 8;
  1326. colorPickerSlider2DHandleStyle.width = 8;
  1327. colorPickerSlider2DHandleStyle.normal.texture = getGUITexture(ColorPickerSlider2DHandleTex);
  1328. colorPickerSlider2DHandleStyle.hover.texture = colorPickerSlider2DHandleStyle.normal.texture;
  1329. colorPickerSlider2DHandleStyle.active.texture = colorPickerSlider2DHandleStyle.normal.texture;
  1330. skin->setStyle("ColorSlider2DHandle", colorPickerSlider2DHandleStyle);
  1331. /************************************************************************/
  1332. /* STATUS BAR */
  1333. /************************************************************************/
  1334. GUIElementStyle statusBarBgStyle;
  1335. statusBarBgStyle.height = 16;
  1336. statusBarBgStyle.border.top = 2;
  1337. statusBarBgStyle.normal.texture = getGUITexture(StatusBarBgTex);
  1338. skin->setStyle(GUIStatusBar::getGUIBackgroundTypeName(), statusBarBgStyle);
  1339. GUIElementStyle statusBarMessageBtnStyle;
  1340. statusBarMessageBtnStyle.font = font;
  1341. statusBarMessageBtnStyle.fontSize = DefaultFontSize;
  1342. statusBarMessageBtnStyle.fixedHeight = true;
  1343. statusBarMessageBtnStyle.height = 16;
  1344. statusBarMessageBtnStyle.minWidth = 10;
  1345. statusBarMessageBtnStyle.textHorzAlign = THA_Left;
  1346. statusBarMessageBtnStyle.textVertAlign = TVA_Center;
  1347. statusBarMessageBtnStyle.imagePosition = GUIImagePosition::Left;
  1348. skin->setStyle(GUIStatusBar::getGUIMessageTypeName(), statusBarMessageBtnStyle);
  1349. GUIElementStyle statusBarStyle;
  1350. statusBarStyle.height = 16;
  1351. statusBarStyle.subStyles[GUIStatusBar::getGUIBackgroundTypeName()] = GUIStatusBar::getGUIBackgroundTypeName();
  1352. statusBarStyle.subStyles[GUIStatusBar::getGUIMessageTypeName()] = GUIStatusBar::getGUIMessageTypeName();
  1353. skin->setStyle(GUIStatusBar::getGUITypeName(), statusBarStyle);
  1354. /************************************************************************/
  1355. /* OTHER */
  1356. /************************************************************************/
  1357. // Right-aligned label
  1358. GUIElementStyle rightAlignedLabelStyle;
  1359. rightAlignedLabelStyle.font = font;
  1360. rightAlignedLabelStyle.fontSize = DefaultFontSize;
  1361. rightAlignedLabelStyle.fixedWidth = false;
  1362. rightAlignedLabelStyle.fixedHeight = true;
  1363. rightAlignedLabelStyle.height = 11;
  1364. rightAlignedLabelStyle.minWidth = 10;
  1365. rightAlignedLabelStyle.textHorzAlign = THA_Right;
  1366. rightAlignedLabelStyle.normal.textColor = TextNormalColor;
  1367. skin->setStyle("RightAlignedLabel", rightAlignedLabelStyle);
  1368. // Multi-line label
  1369. GUIElementStyle multiLinelabelStyle;
  1370. multiLinelabelStyle.font = font;
  1371. multiLinelabelStyle.fontSize = DefaultFontSize;
  1372. multiLinelabelStyle.fixedWidth = false;
  1373. multiLinelabelStyle.fixedHeight = true;
  1374. multiLinelabelStyle.height = 11;
  1375. multiLinelabelStyle.minWidth = 10;
  1376. multiLinelabelStyle.wordWrap = true;
  1377. multiLinelabelStyle.normal.textColor = TextNormalColor;
  1378. skin->setStyle("MultiLineLabel", multiLinelabelStyle);
  1379. // Multi-line centered label
  1380. GUIElementStyle multiLineCenteredLabelStyle;
  1381. multiLineCenteredLabelStyle.font = font;
  1382. multiLineCenteredLabelStyle.fontSize = DefaultFontSize;
  1383. multiLineCenteredLabelStyle.fixedWidth = false;
  1384. multiLineCenteredLabelStyle.fixedHeight = true;
  1385. multiLineCenteredLabelStyle.height = 11;
  1386. multiLineCenteredLabelStyle.minWidth = 10;
  1387. multiLineCenteredLabelStyle.wordWrap = true;
  1388. multiLineCenteredLabelStyle.textHorzAlign = THA_Center;
  1389. multiLineCenteredLabelStyle.normal.textColor = TextNormalColor;
  1390. skin->setStyle("MultiLineLabelCentered", multiLineCenteredLabelStyle);
  1391. // Selection area
  1392. GUIElementStyle selectionAreaStyle;
  1393. selectionAreaStyle.normal.texture = getGUITexture(SelectionAreaTex);
  1394. selectionAreaStyle.border.left = 1;
  1395. selectionAreaStyle.border.right = 1;
  1396. selectionAreaStyle.border.top = 1;
  1397. selectionAreaStyle.border.bottom = 1;
  1398. skin->setStyle("SelectionArea", selectionAreaStyle);
  1399. // Selectable label
  1400. GUIElementStyle selectableLabelStyle;
  1401. selectableLabelStyle.normalOn.texture = getGUITexture(SelectionBgTex);
  1402. selectableLabelStyle.hoverOn.texture = selectableLabelStyle.normalOn.texture;
  1403. selectableLabelStyle.activeOn.texture = selectableLabelStyle.normalOn.texture;
  1404. selectableLabelStyle.fixedHeight = true;
  1405. selectableLabelStyle.height = 11;
  1406. selectableLabelStyle.minWidth = 10;
  1407. selectableLabelStyle.font = font;
  1408. selectableLabelStyle.fontSize = DefaultFontSize;
  1409. selectableLabelStyle.textHorzAlign = THA_Left;
  1410. selectableLabelStyle.normal.textColor = TextNormalColor;
  1411. skin->setStyle("SelectableLabel", selectableLabelStyle);
  1412. // Scroll area background
  1413. GUIElementStyle scrollAreaBg;
  1414. scrollAreaBg.normal.texture = getGUITexture(ScrollAreaBgTex);
  1415. scrollAreaBg.minHeight = 6;
  1416. scrollAreaBg.minWidth = 4;
  1417. scrollAreaBg.border.left = 2;
  1418. scrollAreaBg.border.right = 2;
  1419. scrollAreaBg.border.top = 2;
  1420. scrollAreaBg.border.bottom = 4;
  1421. skin->setStyle("ScrollAreaBg", scrollAreaBg);
  1422. // Inspector title area background
  1423. GUIElementStyle inspectorTitleBg;
  1424. inspectorTitleBg.normal.texture = getGUITexture(InspectorTitleBgTex);
  1425. inspectorTitleBg.minHeight = 4;
  1426. inspectorTitleBg.border.bottom = 2;
  1427. skin->setStyle("InspectorTitleBg", inspectorTitleBg);
  1428. // Inspector content background
  1429. GUIElementStyle inspectorContentBg;
  1430. inspectorContentBg.normal.texture = getGUITexture(InspectorContentBgTex);
  1431. inspectorContentBg.minWidth = 4;
  1432. inspectorContentBg.minHeight = 6;
  1433. inspectorContentBg.border.left = 2;
  1434. inspectorContentBg.border.right = 2;
  1435. inspectorContentBg.border.top = 2;
  1436. inspectorContentBg.border.bottom = 4;
  1437. skin->setStyle("InspectorContentBg", inspectorContentBg);
  1438. // Inspector content alternate background
  1439. GUIElementStyle inspectorContentBgAlternate;
  1440. inspectorContentBgAlternate.normal.texture = getGUITexture(InspectorContentBgAlternateTex);
  1441. inspectorContentBgAlternate.minWidth = 4;
  1442. inspectorContentBgAlternate.minHeight = 6;
  1443. inspectorContentBgAlternate.border.left = 2;
  1444. inspectorContentBgAlternate.border.right = 2;
  1445. inspectorContentBgAlternate.border.top = 2;
  1446. inspectorContentBgAlternate.border.bottom = 4;
  1447. skin->setStyle("InspectorContentBgAlternate", inspectorContentBgAlternate);
  1448. return skin;
  1449. }
  1450. HSpriteTexture BuiltinEditorResources::getGUITexture(const WString& name)
  1451. {
  1452. Path texturePath = FileSystem::getWorkingDirectoryPath();
  1453. texturePath.append(EditorSkinFolder);
  1454. texturePath.append(L"sprite_" + name + L".asset");
  1455. return Resources::instance().load<SpriteTexture>(texturePath);
  1456. }
  1457. HSpriteTexture BuiltinEditorResources::getGUIIcon(const WString& name)
  1458. {
  1459. Path texturePath = FileSystem::getWorkingDirectoryPath();
  1460. texturePath.append(EditorIconFolder);
  1461. texturePath.append(L"sprite_" + name + L".asset");
  1462. return Resources::instance().load<SpriteTexture>(texturePath);
  1463. }
  1464. HShader BuiltinEditorResources::getShader(const WString& name)
  1465. {
  1466. Path programPath = EditorShaderFolder;
  1467. programPath.append(name + L".asset");
  1468. return gResources().load<Shader>(programPath);
  1469. }
  1470. HMaterial BuiltinEditorResources::createDockDropOverlayMaterial() const
  1471. {
  1472. return Material::create(mShaderDockOverlay);
  1473. }
  1474. HMaterial BuiltinEditorResources::createSceneGridMaterial() const
  1475. {
  1476. return Material::create(mShaderSceneGrid);
  1477. }
  1478. HMaterial BuiltinEditorResources::createPicking(CullingMode cullMode) const
  1479. {
  1480. UINT32 modeIdx = (UINT32)cullMode;
  1481. return Material::create(mShaderPicking[modeIdx]);
  1482. }
  1483. HMaterial BuiltinEditorResources::createPickingAlpha(CullingMode cullMode) const
  1484. {
  1485. UINT32 modeIdx = (UINT32)cullMode;
  1486. return Material::create(mShaderPickingAlpha[modeIdx]);
  1487. }
  1488. HMaterial BuiltinEditorResources::createWireGizmoMat() const
  1489. {
  1490. return Material::create(mShaderGizmoWire);
  1491. }
  1492. HMaterial BuiltinEditorResources::createSolidGizmoMat() const
  1493. {
  1494. return Material::create(mShaderGizmoSolid);
  1495. }
  1496. HMaterial BuiltinEditorResources::createIconGizmoMat() const
  1497. {
  1498. return Material::create(mShaderGizmoIcon);
  1499. }
  1500. HMaterial BuiltinEditorResources::createGizmoPickingMat() const
  1501. {
  1502. return Material::create(mShaderGizmoPicking);
  1503. }
  1504. HMaterial BuiltinEditorResources::createAlphaGizmoPickingMat() const
  1505. {
  1506. return Material::create(mShaderGizmoAlphaPicking);
  1507. }
  1508. HMaterial BuiltinEditorResources::createWireHandleMat() const
  1509. {
  1510. return Material::create(mShaderHandleWire);
  1511. }
  1512. HMaterial BuiltinEditorResources::createSolidHandleMat() const
  1513. {
  1514. return Material::create(mShaderHandleSolid);
  1515. }
  1516. HMaterial BuiltinEditorResources::createSelectionMat() const
  1517. {
  1518. return Material::create(mShaderSelection);
  1519. }
  1520. HSpriteTexture BuiltinEditorResources::getLibraryIcon(ProjectIcon icon) const
  1521. {
  1522. switch (icon)
  1523. {
  1524. case ProjectIcon::Folder:
  1525. return getGUIIcon(FolderIconTex);
  1526. case ProjectIcon::Font:
  1527. return getGUIIcon(FontIconTex);
  1528. case ProjectIcon::Mesh:
  1529. return getGUIIcon(MeshIconTex);
  1530. case ProjectIcon::Texture:
  1531. return getGUIIcon(TextureIconTex);
  1532. case ProjectIcon::PlainText:
  1533. return getGUIIcon(PlainTextIconTex);
  1534. case ProjectIcon::ScriptCode:
  1535. return getGUIIcon(ScriptCodeIconTex);
  1536. case ProjectIcon::Shader:
  1537. return getGUIIcon(ShaderIconTex);
  1538. case ProjectIcon::ShaderInclude:
  1539. return getGUIIcon(ShaderIncludeIconTex);
  1540. case ProjectIcon::Material:
  1541. return getGUIIcon(MaterialIconTex);
  1542. case ProjectIcon::SpriteTexture:
  1543. return getGUIIcon(SpriteTextureIconTex);
  1544. case ProjectIcon::Prefab:
  1545. return getGUIIcon(PrefabIconTex);
  1546. }
  1547. return HSpriteTexture();
  1548. }
  1549. HSpriteTexture BuiltinEditorResources::getToolbarIcon(ToolbarIcon icon) const
  1550. {
  1551. switch (icon)
  1552. {
  1553. case ToolbarIcon::NewCamera:
  1554. return getGUIIcon(L"ToolbarNewCameraIcon.png");
  1555. case ToolbarIcon::NewRenderable:
  1556. return getGUIIcon(L"ToolbarNewRenderableIcon.png");
  1557. case ToolbarIcon::NewPointLight:
  1558. return getGUIIcon(L"ToolbarNewPointLightIcon.png");
  1559. case ToolbarIcon::NewDirLight:
  1560. return getGUIIcon(L"ToolbarNewDirectionalLightIcon.png");
  1561. case ToolbarIcon::NewSpotLight:
  1562. return getGUIIcon(L"ToolbarNewSpotLightIcon.png");
  1563. case ToolbarIcon::NewCube:
  1564. return getGUIIcon(L"ToolbarNewCubeIcon.png");
  1565. case ToolbarIcon::NewSphere:
  1566. return getGUIIcon(L"ToolbarNewSphereIcon.png");
  1567. case ToolbarIcon::NewCone:
  1568. return getGUIIcon(L"ToolbarNewConeIcon.png");
  1569. case ToolbarIcon::NewQuad:
  1570. return getGUIIcon(L"ToolbarNewQuadIcon.png");
  1571. case ToolbarIcon::NewMat:
  1572. return getGUIIcon(L"ToolbarNewMaterialIcon.png");
  1573. case ToolbarIcon::NewCSScript:
  1574. return getGUIIcon(L"ToolbarNewCSScriptIcon.png");
  1575. case ToolbarIcon::NewShader:
  1576. return getGUIIcon(L"ToolbarNewShaderIcon.png");
  1577. case ToolbarIcon::NewSpriteTex:
  1578. return getGUIIcon(L"ToolbarNewSpriteTextureIcon.png");
  1579. case ToolbarIcon::Pause:
  1580. return getGUIIcon(L"ToolbarPauseIcon.png");
  1581. case ToolbarIcon::Play:
  1582. return getGUIIcon(L"ToolbarPlayIcon.png");
  1583. case ToolbarIcon::Step:
  1584. return getGUIIcon(L"ToolbarStepIcon.png");
  1585. case ToolbarIcon::Undo:
  1586. return getGUIIcon(L"ToolbarUndoIcon.png");
  1587. case ToolbarIcon::Redo:
  1588. return getGUIIcon(L"ToolbarRedoIcon.png");
  1589. case ToolbarIcon::OpenProject:
  1590. return getGUIIcon(L"ToolbarOpenProjectIcon.png");
  1591. case ToolbarIcon::SaveProject:
  1592. return getGUIIcon(L"ToolbarSaveProjectIcon.png");
  1593. case ToolbarIcon::SaveScene:
  1594. return getGUIIcon(L"ToolbarSaveSceneIcon.png");
  1595. }
  1596. return HSpriteTexture();
  1597. }
  1598. HSpriteTexture BuiltinEditorResources::getSceneWindowIcon(SceneWindowIcon icon) const
  1599. {
  1600. switch (icon)
  1601. {
  1602. case SceneWindowIcon::View:
  1603. return getGUIIcon(L"SceneViewIcon.png");
  1604. case SceneWindowIcon::Move:
  1605. return getGUIIcon(L"SceneMoveIcon.png");
  1606. case SceneWindowIcon::Rotate:
  1607. return getGUIIcon(L"SceneRotateIcon.png");
  1608. case SceneWindowIcon::Scale:
  1609. return getGUIIcon(L"SceneScaleIcon.png");
  1610. case SceneWindowIcon::Pivot:
  1611. return getGUIIcon(L"ScenePivotIcon.png");
  1612. case SceneWindowIcon::Center:
  1613. return getGUIIcon(L"SceneCenterIcon.png");
  1614. case SceneWindowIcon::Local:
  1615. return getGUIIcon(L"SceneLocalIcon.png");
  1616. case SceneWindowIcon::World:
  1617. return getGUIIcon(L"SceneWorldIcon.png");
  1618. case SceneWindowIcon::MoveSnap:
  1619. return getGUIIcon(L"SceneMoveSnapIcon.png");
  1620. case SceneWindowIcon::RotateSnap:
  1621. return getGUIIcon(L"SceneRotateSnapIcon.png");
  1622. }
  1623. return HSpriteTexture();
  1624. }
  1625. HSpriteTexture BuiltinEditorResources::getLibraryWindowIcon(LibraryWindowIcon icon) const
  1626. {
  1627. switch (icon)
  1628. {
  1629. case LibraryWindowIcon::Home:
  1630. return getGUIIcon(L"LibraryHomeIcon.png");
  1631. case LibraryWindowIcon::Up:
  1632. return getGUIIcon(L"LibraryUpIcon.png");
  1633. case LibraryWindowIcon::Clear:
  1634. return getGUIIcon(L"LibraryClearSearchIcon.png");
  1635. case LibraryWindowIcon::Options:
  1636. return getGUIIcon(L"LibraryOptionsIcon.png");
  1637. }
  1638. return HSpriteTexture();
  1639. }
  1640. HSpriteTexture BuiltinEditorResources::getIcon(EditorIcon icon) const
  1641. {
  1642. switch (icon)
  1643. {
  1644. case EditorIcon::XBtn:
  1645. return getGUIIcon(XButtonNormalTex);
  1646. }
  1647. return HSpriteTexture();
  1648. }
  1649. HSpriteTexture BuiltinEditorResources::getLogMessageIcon(LogMessageIcon icon) const
  1650. {
  1651. switch (icon)
  1652. {
  1653. case LogMessageIcon::Info:
  1654. return getGUIIcon(LogInfoIconTex);
  1655. case LogMessageIcon::Warning:
  1656. return getGUIIcon(LogWarningIconTex);
  1657. case LogMessageIcon::Error:
  1658. return getGUIIcon(LogErrorIconTex);
  1659. }
  1660. return HSpriteTexture();
  1661. }
  1662. WString BuiltinEditorResources::getEmptyShaderCode() const
  1663. {
  1664. Path filePath = FileSystem::getWorkingDirectoryPath();
  1665. filePath.append(BuiltinDataFolder);
  1666. filePath.append(EmptyShaderCodeFile);
  1667. DataStreamPtr fileStream = FileSystem::openFile(filePath);
  1668. if (fileStream != nullptr)
  1669. return fileStream->getAsWString();
  1670. return StringUtil::WBLANK;
  1671. }
  1672. WString BuiltinEditorResources::getEmptyCSScriptCode() const
  1673. {
  1674. Path filePath = FileSystem::getWorkingDirectoryPath();
  1675. filePath.append(BuiltinDataFolder);
  1676. filePath.append(EmptyCSScriptCodeFile);
  1677. DataStreamPtr fileStream = FileSystem::openFile(filePath);
  1678. if (fileStream != nullptr)
  1679. return fileStream->getAsWString();
  1680. return StringUtil::WBLANK;
  1681. }
  1682. }