2
0
BearishSun 10 жил өмнө
parent
commit
56f5d5db86

+ 1 - 1
BansheeCore/Include/BsFontImportOptions.h

@@ -66,7 +66,7 @@ namespace BansheeEngine
 	public:
 	public:
 		friend class FontImportOptionsRTTI;
 		friend class FontImportOptionsRTTI;
 		static RTTITypeBase* getRTTIStatic();
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
 
 
 	private:
 	private:
 		Vector<UINT32> mFontSizes;
 		Vector<UINT32> mFontSizes;

+ 2 - 0
BansheeEditor/Include/BsBuiltinEditorResources.h

@@ -261,7 +261,9 @@ namespace BansheeEngine
 		static const Path ResourceManifestPath;
 		static const Path ResourceManifestPath;
 
 
 		static const WString DefaultFontFilename;
 		static const WString DefaultFontFilename;
+		static const WString DefaultAAFontFilename;
 		static const UINT32 DefaultFontSize;
 		static const UINT32 DefaultFontSize;
+		static const UINT32 TitleFontSize;
 
 
 		static const Color TextNormalColor;
 		static const Color TextNormalColor;
 		static const Color TextActiveColor;
 		static const Color TextActiveColor;

+ 67 - 28
BansheeEditor/Source/BsBuiltinEditorResources.cpp

@@ -60,7 +60,9 @@ namespace BansheeEngine
 	const String BuiltinEditorResources::TextureFieldClearBtnStyleName = "TextureClearButton";
 	const String BuiltinEditorResources::TextureFieldClearBtnStyleName = "TextureClearButton";
 
 
 	const WString BuiltinEditorResources::DefaultFontFilename = L"arial.ttf";
 	const WString BuiltinEditorResources::DefaultFontFilename = L"arial.ttf";
+	const WString BuiltinEditorResources::DefaultAAFontFilename = L"arialAA.ttf";
 	const UINT32 BuiltinEditorResources::DefaultFontSize = 11;
 	const UINT32 BuiltinEditorResources::DefaultFontSize = 11;
+	const UINT32 BuiltinEditorResources::TitleFontSize = 20;
 
 
 	const Color BuiltinEditorResources::TextNormalColor = Color(0.7f, 0.7f, 0.7f);
 	const Color BuiltinEditorResources::TextNormalColor = Color(0.7f, 0.7f, 0.7f);
 	const Color BuiltinEditorResources::TextActiveColor = Color(0.0f, 0.0f, 0.0f);
 	const Color BuiltinEditorResources::TextActiveColor = Color(0.0f, 0.0f, 0.0f);
@@ -361,8 +363,12 @@ namespace BansheeEngine
 		BuiltinResourcesHelper::importAssets(EditorRawShaderFolder, EditorShaderFolder, mResourceManifest);
 		BuiltinResourcesHelper::importAssets(EditorRawShaderFolder, EditorShaderFolder, mResourceManifest);
 		BuiltinResourcesHelper::importAssets(EditorRawSkinFolder, EditorSkinFolder, mResourceManifest);
 		BuiltinResourcesHelper::importAssets(EditorRawSkinFolder, EditorSkinFolder, mResourceManifest);
 
 
-		// Import font
-		BuiltinResourcesHelper::importFont(BuiltinRawDataFolder + DefaultFontFilename, BuiltinDataFolder, DefaultFontSize, false, mResourceManifest);
+		// Import fonts
+		BuiltinResourcesHelper::importFont(BuiltinRawDataFolder + DefaultFontFilename, DefaultFontFilename, 
+			BuiltinDataFolder, { DefaultFontSize }, false, mResourceManifest);
+
+		BuiltinResourcesHelper::importFont(BuiltinRawDataFolder + DefaultFontFilename, DefaultAAFontFilename, 
+			BuiltinDataFolder, { TitleFontSize }, true, mResourceManifest);
 
 
 		// Generate & save GUI sprite textures
 		// Generate & save GUI sprite textures
 		BuiltinResourcesHelper::generateSpriteTextures(EditorSkinFolder, mResourceManifest);
 		BuiltinResourcesHelper::generateSpriteTextures(EditorSkinFolder, mResourceManifest);
@@ -382,11 +388,17 @@ namespace BansheeEngine
 	{
 	{
 		HGUISkin skin = GUISkin::create();
 		HGUISkin skin = GUISkin::create();
 
 
-		Path fontPath = FileSystem::getWorkingDirectoryPath();
-		fontPath.append(BuiltinDataFolder);
-		fontPath.append(DefaultFontFilename + L".asset");
+		Path defaultFontPath = FileSystem::getWorkingDirectoryPath();
+		defaultFontPath.append(BuiltinDataFolder);
+		defaultFontPath.append(DefaultFontFilename + L".asset");
+
+		HFont defaultFont = gResources().load<Font>(defaultFontPath);
 
 
-		HFont font = gResources().load<Font>(fontPath);
+		Path defaultAAFontPath = FileSystem::getWorkingDirectoryPath();
+		defaultAAFontPath.append(BuiltinDataFolder);
+		defaultAAFontPath.append(DefaultAAFontFilename + L".asset");
+
+		HFont defaultAAFont = gResources().load<Font>(defaultAAFontPath);
 
 
 		// Blank entry
 		// Blank entry
 		GUIElementStyle blankStyle;
 		GUIElementStyle blankStyle;
@@ -396,7 +408,7 @@ namespace BansheeEngine
 
 
 		// Label
 		// Label
 		GUIElementStyle labelStyle;
 		GUIElementStyle labelStyle;
-		labelStyle.font = font;
+		labelStyle.font = defaultFont;
 		labelStyle.fontSize = DefaultFontSize;
 		labelStyle.fontSize = DefaultFontSize;
 		labelStyle.fixedWidth = false;
 		labelStyle.fixedWidth = false;
 		labelStyle.fixedHeight = true;
 		labelStyle.fixedHeight = true;
@@ -442,7 +454,7 @@ namespace BansheeEngine
 		buttonStyle.fixedHeight = true;
 		buttonStyle.fixedHeight = true;
 		buttonStyle.height = 21;
 		buttonStyle.height = 21;
 		buttonStyle.minWidth = 20;
 		buttonStyle.minWidth = 20;
-		buttonStyle.font = font;
+		buttonStyle.font = defaultFont;
 		buttonStyle.fontSize = DefaultFontSize;
 		buttonStyle.fontSize = DefaultFontSize;
 		buttonStyle.textHorzAlign = THA_Center;
 		buttonStyle.textHorzAlign = THA_Center;
 		buttonStyle.textVertAlign = TVA_Center;
 		buttonStyle.textVertAlign = TVA_Center;
@@ -474,7 +486,7 @@ namespace BansheeEngine
 		leftButtonStyle.fixedHeight = true;
 		leftButtonStyle.fixedHeight = true;
 		leftButtonStyle.height = 21;
 		leftButtonStyle.height = 21;
 		leftButtonStyle.minWidth = 20;
 		leftButtonStyle.minWidth = 20;
-		leftButtonStyle.font = font;
+		leftButtonStyle.font = defaultFont;
 		leftButtonStyle.fontSize = DefaultFontSize;
 		leftButtonStyle.fontSize = DefaultFontSize;
 		leftButtonStyle.textHorzAlign = THA_Center;
 		leftButtonStyle.textHorzAlign = THA_Center;
 		leftButtonStyle.textVertAlign = TVA_Center;
 		leftButtonStyle.textVertAlign = TVA_Center;
@@ -506,7 +518,7 @@ namespace BansheeEngine
 		rightButtonStyle.fixedHeight = true;
 		rightButtonStyle.fixedHeight = true;
 		rightButtonStyle.height = 21;
 		rightButtonStyle.height = 21;
 		rightButtonStyle.minWidth = 20;
 		rightButtonStyle.minWidth = 20;
-		rightButtonStyle.font = font;
+		rightButtonStyle.font = defaultFont;
 		rightButtonStyle.fontSize = DefaultFontSize;
 		rightButtonStyle.fontSize = DefaultFontSize;
 		rightButtonStyle.textHorzAlign = THA_Center;
 		rightButtonStyle.textHorzAlign = THA_Center;
 		rightButtonStyle.textVertAlign = TVA_Center;
 		rightButtonStyle.textVertAlign = TVA_Center;
@@ -580,7 +592,7 @@ namespace BansheeEngine
 		tabbedBarButton.height = 15;
 		tabbedBarButton.height = 15;
 		tabbedBarButton.minWidth = 24;
 		tabbedBarButton.minWidth = 24;
 		tabbedBarButton.maxWidth = 110;
 		tabbedBarButton.maxWidth = 110;
-		tabbedBarButton.font = font;
+		tabbedBarButton.font = defaultFont;
 		tabbedBarButton.fontSize = DefaultFontSize;
 		tabbedBarButton.fontSize = DefaultFontSize;
 		tabbedBarButton.textHorzAlign = THA_Center;
 		tabbedBarButton.textHorzAlign = THA_Center;
 		tabbedBarButton.textVertAlign = TVA_Center;
 		tabbedBarButton.textVertAlign = TVA_Center;
@@ -662,7 +674,7 @@ namespace BansheeEngine
 		inputBoxStyle.fixedHeight = true;
 		inputBoxStyle.fixedHeight = true;
 		inputBoxStyle.height = 21;
 		inputBoxStyle.height = 21;
 		inputBoxStyle.minWidth = 10;
 		inputBoxStyle.minWidth = 10;
-		inputBoxStyle.font = font;
+		inputBoxStyle.font = defaultFont;
 		inputBoxStyle.fontSize = DefaultFontSize;
 		inputBoxStyle.fontSize = DefaultFontSize;
 		inputBoxStyle.textHorzAlign = THA_Left;
 		inputBoxStyle.textHorzAlign = THA_Left;
 		inputBoxStyle.textVertAlign = TVA_Top;
 		inputBoxStyle.textVertAlign = TVA_Top;
@@ -804,7 +816,7 @@ namespace BansheeEngine
 		dropDownListStyle.border.top = 2;
 		dropDownListStyle.border.top = 2;
 		dropDownListStyle.border.bottom = 4;
 		dropDownListStyle.border.bottom = 4;
 		dropDownListStyle.margins.bottom = 2;
 		dropDownListStyle.margins.bottom = 2;
-		dropDownListStyle.font = font;
+		dropDownListStyle.font = defaultFont;
 		dropDownListStyle.fontSize = DefaultFontSize;
 		dropDownListStyle.fontSize = DefaultFontSize;
 		dropDownListStyle.textHorzAlign = THA_Left;
 		dropDownListStyle.textHorzAlign = THA_Left;
 		dropDownListStyle.textVertAlign = TVA_Center;
 		dropDownListStyle.textVertAlign = TVA_Center;
@@ -884,7 +896,7 @@ namespace BansheeEngine
 		dropDownEntryBtnStyle.fixedWidth = false;
 		dropDownEntryBtnStyle.fixedWidth = false;
 		dropDownEntryBtnStyle.height = 16;
 		dropDownEntryBtnStyle.height = 16;
 		dropDownEntryBtnStyle.width = 30;
 		dropDownEntryBtnStyle.width = 30;
-		dropDownEntryBtnStyle.font = font;
+		dropDownEntryBtnStyle.font = defaultFont;
 		dropDownEntryBtnStyle.fontSize = DefaultFontSize;
 		dropDownEntryBtnStyle.fontSize = DefaultFontSize;
 		dropDownEntryBtnStyle.textHorzAlign = THA_Left;
 		dropDownEntryBtnStyle.textHorzAlign = THA_Left;
 		dropDownEntryBtnStyle.textVertAlign = TVA_Center;
 		dropDownEntryBtnStyle.textVertAlign = TVA_Center;
@@ -911,7 +923,7 @@ namespace BansheeEngine
 		dropDownToggleEntryBtnStyle.width = 30;
 		dropDownToggleEntryBtnStyle.width = 30;
 		dropDownToggleEntryBtnStyle.border.left = 17;
 		dropDownToggleEntryBtnStyle.border.left = 17;
 		dropDownToggleEntryBtnStyle.contentOffset.left = 17;
 		dropDownToggleEntryBtnStyle.contentOffset.left = 17;
-		dropDownToggleEntryBtnStyle.font = font;
+		dropDownToggleEntryBtnStyle.font = defaultFont;
 		dropDownToggleEntryBtnStyle.fontSize = DefaultFontSize;
 		dropDownToggleEntryBtnStyle.fontSize = DefaultFontSize;
 		dropDownToggleEntryBtnStyle.textHorzAlign = THA_Left;
 		dropDownToggleEntryBtnStyle.textHorzAlign = THA_Left;
 		dropDownToggleEntryBtnStyle.textVertAlign = TVA_Center;
 		dropDownToggleEntryBtnStyle.textVertAlign = TVA_Center;
@@ -937,7 +949,7 @@ namespace BansheeEngine
 		dropDownEntryExpBtnStyle.height = 16;
 		dropDownEntryExpBtnStyle.height = 16;
 		dropDownEntryExpBtnStyle.width = 30;
 		dropDownEntryExpBtnStyle.width = 30;
 		dropDownEntryExpBtnStyle.border.right = 13;
 		dropDownEntryExpBtnStyle.border.right = 13;
-		dropDownEntryExpBtnStyle.font = font;
+		dropDownEntryExpBtnStyle.font = defaultFont;
 		dropDownEntryExpBtnStyle.fontSize = DefaultFontSize;
 		dropDownEntryExpBtnStyle.fontSize = DefaultFontSize;
 		dropDownEntryExpBtnStyle.textHorzAlign = THA_Left;
 		dropDownEntryExpBtnStyle.textHorzAlign = THA_Left;
 		dropDownEntryExpBtnStyle.textVertAlign = TVA_Center;
 		dropDownEntryExpBtnStyle.textVertAlign = TVA_Center;
@@ -1041,7 +1053,7 @@ namespace BansheeEngine
 		menuBarBtnStyle.margins.right = 2;
 		menuBarBtnStyle.margins.right = 2;
 		menuBarBtnStyle.margins.top = 2;
 		menuBarBtnStyle.margins.top = 2;
 		menuBarBtnStyle.margins.bottom = 2;
 		menuBarBtnStyle.margins.bottom = 2;
-		menuBarBtnStyle.font = font;
+		menuBarBtnStyle.font = defaultFont;
 		menuBarBtnStyle.fontSize = DefaultFontSize;
 		menuBarBtnStyle.fontSize = DefaultFontSize;
 		menuBarBtnStyle.textHorzAlign = THA_Left;
 		menuBarBtnStyle.textHorzAlign = THA_Left;
 		menuBarBtnStyle.textVertAlign = TVA_Top;
 		menuBarBtnStyle.textVertAlign = TVA_Top;
@@ -1108,7 +1120,7 @@ namespace BansheeEngine
 
 
 		// Entry
 		// Entry
 		GUIElementStyle treeViewEntryStyle;
 		GUIElementStyle treeViewEntryStyle;
-		treeViewEntryStyle.font = font;
+		treeViewEntryStyle.font = defaultFont;
 		treeViewEntryStyle.fontSize = DefaultFontSize;
 		treeViewEntryStyle.fontSize = DefaultFontSize;
 		treeViewEntryStyle.fixedWidth = false;
 		treeViewEntryStyle.fixedWidth = false;
 		treeViewEntryStyle.fixedHeight = true;
 		treeViewEntryStyle.fixedHeight = true;
@@ -1159,7 +1171,7 @@ namespace BansheeEngine
 		treeViewEditBox.fixedHeight = true;
 		treeViewEditBox.fixedHeight = true;
 		treeViewEditBox.height = 13;
 		treeViewEditBox.height = 13;
 		treeViewEditBox.minWidth = 10;
 		treeViewEditBox.minWidth = 10;
-		treeViewEditBox.font = font;
+		treeViewEditBox.font = defaultFont;
 		treeViewEditBox.fontSize = DefaultFontSize;
 		treeViewEditBox.fontSize = DefaultFontSize;
 		treeViewEditBox.textHorzAlign = THA_Left;
 		treeViewEditBox.textHorzAlign = THA_Left;
 		treeViewEditBox.textVertAlign = TVA_Top;
 		treeViewEditBox.textVertAlign = TVA_Top;
@@ -1211,7 +1223,7 @@ namespace BansheeEngine
 		objectDropStyle.fixedHeight = true;
 		objectDropStyle.fixedHeight = true;
 		objectDropStyle.height = 21;
 		objectDropStyle.height = 21;
 		objectDropStyle.minWidth = 20;
 		objectDropStyle.minWidth = 20;
-		objectDropStyle.font = font;
+		objectDropStyle.font = defaultFont;
 		objectDropStyle.fontSize = DefaultFontSize;
 		objectDropStyle.fontSize = DefaultFontSize;
 		objectDropStyle.textHorzAlign = THA_Center;
 		objectDropStyle.textHorzAlign = THA_Center;
 		objectDropStyle.textVertAlign = TVA_Center;
 		objectDropStyle.textVertAlign = TVA_Center;
@@ -1253,7 +1265,7 @@ namespace BansheeEngine
 		skin->setStyle(TextureFieldStyleName, textureFieldStyle);
 		skin->setStyle(TextureFieldStyleName, textureFieldStyle);
 
 
 		GUIElementStyle textureDropStyle;
 		GUIElementStyle textureDropStyle;
-		textureDropStyle.font = font;
+		textureDropStyle.font = defaultFont;
 		textureDropStyle.fontSize = DefaultFontSize;
 		textureDropStyle.fontSize = DefaultFontSize;
 		textureDropStyle.textHorzAlign = THA_Center;
 		textureDropStyle.textHorzAlign = THA_Center;
 		textureDropStyle.textVertAlign = TVA_Center;
 		textureDropStyle.textVertAlign = TVA_Center;
@@ -1300,7 +1312,7 @@ namespace BansheeEngine
 		/************************************************************************/
 		/************************************************************************/
 
 
 		GUIElementStyle editorFieldLabelStyle;
 		GUIElementStyle editorFieldLabelStyle;
-		editorFieldLabelStyle.font = font;
+		editorFieldLabelStyle.font = defaultFont;
 		editorFieldLabelStyle.fontSize = DefaultFontSize;
 		editorFieldLabelStyle.fontSize = DefaultFontSize;
 		editorFieldLabelStyle.normal.textColor = TextNormalColor;
 		editorFieldLabelStyle.normal.textColor = TextNormalColor;
 		editorFieldLabelStyle.fixedWidth = false;
 		editorFieldLabelStyle.fixedWidth = false;
@@ -1423,7 +1435,7 @@ namespace BansheeEngine
 		foldoutStyle.fixedWidth = false;
 		foldoutStyle.fixedWidth = false;
 		foldoutStyle.height = 21;
 		foldoutStyle.height = 21;
 		foldoutStyle.minWidth = 17;
 		foldoutStyle.minWidth = 17;
-		foldoutStyle.font = font;
+		foldoutStyle.font = defaultFont;
 		foldoutStyle.fontSize = DefaultFontSize;
 		foldoutStyle.fontSize = DefaultFontSize;
 		foldoutStyle.textHorzAlign = THA_Left;
 		foldoutStyle.textHorzAlign = THA_Left;
 		foldoutStyle.textVertAlign = TVA_Center;
 		foldoutStyle.textVertAlign = TVA_Center;
@@ -1603,7 +1615,7 @@ namespace BansheeEngine
 		skin->setStyle(GUIStatusBar::getGUIBackgroundTypeName(), statusBarBgStyle);
 		skin->setStyle(GUIStatusBar::getGUIBackgroundTypeName(), statusBarBgStyle);
 
 
 		GUIElementStyle statusBarMessageBtnStyle;
 		GUIElementStyle statusBarMessageBtnStyle;
-		statusBarMessageBtnStyle.font = font;
+		statusBarMessageBtnStyle.font = defaultFont;
 		statusBarMessageBtnStyle.fontSize = DefaultFontSize;
 		statusBarMessageBtnStyle.fontSize = DefaultFontSize;
 		statusBarMessageBtnStyle.fixedHeight = true;
 		statusBarMessageBtnStyle.fixedHeight = true;
 		statusBarMessageBtnStyle.height = 16;
 		statusBarMessageBtnStyle.height = 16;
@@ -1626,9 +1638,22 @@ namespace BansheeEngine
 		/* 									OTHER                      			*/
 		/* 									OTHER                      			*/
 		/************************************************************************/
 		/************************************************************************/
 
 
+		// Centered label
+		GUIElementStyle centeredLabelStyle;
+		centeredLabelStyle.font = defaultFont;
+		centeredLabelStyle.fontSize = DefaultFontSize;
+		centeredLabelStyle.fixedWidth = false;
+		centeredLabelStyle.fixedHeight = true;
+		centeredLabelStyle.height = 11;
+		centeredLabelStyle.minWidth = 10;
+		centeredLabelStyle.textHorzAlign = THA_Center;
+		centeredLabelStyle.normal.textColor = TextNormalColor;
+
+		skin->setStyle("LabelCentered", centeredLabelStyle);
+
 		// Right-aligned label
 		// Right-aligned label
 		GUIElementStyle rightAlignedLabelStyle;
 		GUIElementStyle rightAlignedLabelStyle;
-		rightAlignedLabelStyle.font = font;
+		rightAlignedLabelStyle.font = defaultFont;
 		rightAlignedLabelStyle.fontSize = DefaultFontSize;
 		rightAlignedLabelStyle.fontSize = DefaultFontSize;
 		rightAlignedLabelStyle.fixedWidth = false;
 		rightAlignedLabelStyle.fixedWidth = false;
 		rightAlignedLabelStyle.fixedHeight = true;
 		rightAlignedLabelStyle.fixedHeight = true;
@@ -1641,7 +1666,7 @@ namespace BansheeEngine
 
 
 		// Multi-line label
 		// Multi-line label
 		GUIElementStyle multiLinelabelStyle;
 		GUIElementStyle multiLinelabelStyle;
-		multiLinelabelStyle.font = font;
+		multiLinelabelStyle.font = defaultFont;
 		multiLinelabelStyle.fontSize = DefaultFontSize;
 		multiLinelabelStyle.fontSize = DefaultFontSize;
 		multiLinelabelStyle.fixedWidth = false;
 		multiLinelabelStyle.fixedWidth = false;
 		multiLinelabelStyle.fixedHeight = true;
 		multiLinelabelStyle.fixedHeight = true;
@@ -1654,7 +1679,7 @@ namespace BansheeEngine
 
 
 		// Multi-line centered label
 		// Multi-line centered label
 		GUIElementStyle multiLineCenteredLabelStyle;
 		GUIElementStyle multiLineCenteredLabelStyle;
-		multiLineCenteredLabelStyle.font = font;
+		multiLineCenteredLabelStyle.font = defaultFont;
 		multiLineCenteredLabelStyle.fontSize = DefaultFontSize;
 		multiLineCenteredLabelStyle.fontSize = DefaultFontSize;
 		multiLineCenteredLabelStyle.fixedWidth = false;
 		multiLineCenteredLabelStyle.fixedWidth = false;
 		multiLineCenteredLabelStyle.fixedHeight = true;
 		multiLineCenteredLabelStyle.fixedHeight = true;
@@ -1666,6 +1691,20 @@ namespace BansheeEngine
 
 
 		skin->setStyle("MultiLineLabelCentered", multiLineCenteredLabelStyle);
 		skin->setStyle("MultiLineLabelCentered", multiLineCenteredLabelStyle);
 
 
+		// Title label
+		GUIElementStyle titleLabel;
+		titleLabel.font = defaultAAFont;
+		titleLabel.fontSize = TitleFontSize;
+		titleLabel.fixedWidth = false;
+		titleLabel.fixedHeight = true;
+		titleLabel.height = 20;
+		titleLabel.minWidth = 10;
+		titleLabel.wordWrap = true;
+		titleLabel.textHorzAlign = THA_Center;
+		titleLabel.normal.textColor = TextNormalColor;
+
+		skin->setStyle("TitleLabel", titleLabel);
+
 		// Selection area
 		// Selection area
 		GUIElementStyle selectionAreaStyle;
 		GUIElementStyle selectionAreaStyle;
 		selectionAreaStyle.normal.texture = getGUITexture(SelectionAreaTex);
 		selectionAreaStyle.normal.texture = getGUITexture(SelectionAreaTex);
@@ -1684,7 +1723,7 @@ namespace BansheeEngine
 		selectableLabelStyle.fixedHeight = true;
 		selectableLabelStyle.fixedHeight = true;
 		selectableLabelStyle.height = 11;
 		selectableLabelStyle.height = 11;
 		selectableLabelStyle.minWidth = 10;
 		selectableLabelStyle.minWidth = 10;
-		selectableLabelStyle.font = font;
+		selectableLabelStyle.font = defaultFont;
 		selectableLabelStyle.fontSize = DefaultFontSize;
 		selectableLabelStyle.fontSize = DefaultFontSize;
 		selectableLabelStyle.textHorzAlign = THA_Left;
 		selectableLabelStyle.textHorzAlign = THA_Left;
 		selectableLabelStyle.normal.textColor = TextNormalColor;
 		selectableLabelStyle.normal.textColor = TextNormalColor;

+ 2 - 2
BansheeEngine/Include/BsBuiltinResources.h

@@ -325,8 +325,8 @@ namespace BansheeEngine
 		 *			are saved in the output folder. All saved resources are registered in the
 		 *			are saved in the output folder. All saved resources are registered in the
 		 *			provided resource manifest.
 		 *			provided resource manifest.
 		 */
 		 */
-		static void importFont(const Path& inputFile, const Path& outputFolder, UINT32 size, 
-			bool antialiasing, const ResourceManifestPtr& manifest);
+		static void importFont(const Path& inputFile, const WString& outputName, const Path& outputFolder, 
+			const Vector<UINT32>& fontSizes, bool antialiasing, const ResourceManifestPtr& manifest);
 
 
 		/**
 		/**
 		 * @brief	Generates sprite textures for all texture assets in the specified folder.
 		 * @brief	Generates sprite textures for all texture assets in the specified folder.

+ 18 - 14
BansheeEngine/Source/BsBuiltinResources.cpp

@@ -284,7 +284,8 @@ namespace BansheeEngine
 		BuiltinResourcesHelper::importAssets(EngineRawSkinFolder, EngineSkinFolder, mResourceManifest);
 		BuiltinResourcesHelper::importAssets(EngineRawSkinFolder, EngineSkinFolder, mResourceManifest);
 
 
 		// Import font
 		// Import font
-		BuiltinResourcesHelper::importFont(BuiltinRawDataFolder + DefaultFontFilename, BuiltinDataFolder, DefaultFontSize, false, mResourceManifest);
+		BuiltinResourcesHelper::importFont(BuiltinRawDataFolder + DefaultFontFilename, DefaultFontFilename, BuiltinDataFolder,
+			{ DefaultFontSize }, false, mResourceManifest);
 
 
 		// Generate & save GUI sprite textures
 		// Generate & save GUI sprite textures
 		BuiltinResourcesHelper::generateSpriteTextures(EngineSkinFolder, mResourceManifest);
 		BuiltinResourcesHelper::generateSpriteTextures(EngineSkinFolder, mResourceManifest);
@@ -990,16 +991,14 @@ namespace BansheeEngine
 			FileSystem::remove(obsoleteAssetPath);
 			FileSystem::remove(obsoleteAssetPath);
 	}
 	}
 
 
-	void BuiltinResourcesHelper::importFont(const Path& inputFile, const Path& outputFolder, 
-		UINT32 size, bool antialiasing, const ResourceManifestPtr& manifest)
+	void BuiltinResourcesHelper::importFont(const Path& inputFile, const WString& outputName, const Path& outputFolder,
+		const Vector<UINT32>& fontSizes, bool antialiasing, const ResourceManifestPtr& manifest)
 	{
 	{
 		ImportOptionsPtr fontImportOptions = Importer::instance().createImportOptions(inputFile);
 		ImportOptionsPtr fontImportOptions = Importer::instance().createImportOptions(inputFile);
 		if (rtti_is_of_type<FontImportOptions>(fontImportOptions))
 		if (rtti_is_of_type<FontImportOptions>(fontImportOptions))
 		{
 		{
 			FontImportOptions* importOptions = static_cast<FontImportOptions*>(fontImportOptions.get());
 			FontImportOptions* importOptions = static_cast<FontImportOptions*>(fontImportOptions.get());
 
 
-			Vector<UINT32> fontSizes;
-			fontSizes.push_back(size);
 			importOptions->setFontSizes(fontSizes);
 			importOptions->setFontSizes(fontSizes);
 			importOptions->setAntialiasing(antialiasing);
 			importOptions->setAntialiasing(antialiasing);
 		}
 		}
@@ -1008,7 +1007,7 @@ namespace BansheeEngine
 
 
 		HFont font = Importer::instance().import<Font>(inputFile, fontImportOptions);
 		HFont font = Importer::instance().import<Font>(inputFile, fontImportOptions);
 
 
-		WString fontName = inputFile.getWFilename();
+		WString fontName = outputName;
 		Path outputPath = FileSystem::getWorkingDirectoryPath() + outputFolder + fontName;
 		Path outputPath = FileSystem::getWorkingDirectoryPath() + outputFolder + fontName;
 		outputPath.setFilename(outputPath.getWFilename() + L".asset");
 		outputPath.setFilename(outputPath.getWFilename() + L".asset");
 
 
@@ -1016,16 +1015,21 @@ namespace BansheeEngine
 		manifest->registerResource(font.getUUID(), outputPath);
 		manifest->registerResource(font.getUUID(), outputPath);
 
 
 		// Save font texture pages as well. TODO - Later maybe figure out a more automatic way to do this
 		// Save font texture pages as well. TODO - Later maybe figure out a more automatic way to do this
-		SPtr<const FontBitmap> fontData = font->getBitmap(size);
+		for (auto& size : fontSizes)
+		{
+			SPtr<const FontBitmap> fontData = font->getBitmap(size);
 
 
-		Path texPageOutputPath = FileSystem::getWorkingDirectoryPath() + outputFolder;
+			Path texPageOutputPath = FileSystem::getWorkingDirectoryPath() + outputFolder;
 
 
-		UINT32 pageIdx = 0;
-		for (auto tex : fontData->texturePages)
-		{
-			texPageOutputPath.setFilename(fontName + L"_texpage_" + toWString(pageIdx) + L".asset");
-			Resources::instance().save(tex, texPageOutputPath, true);
-			manifest->registerResource(tex.getUUID(), texPageOutputPath);
+			UINT32 pageIdx = 0;
+			for (auto tex : fontData->texturePages)
+			{
+				texPageOutputPath.setFilename(fontName + L"_" + toWString(size) + L"_texpage_" + 
+					toWString(pageIdx) + L".asset");
+
+				Resources::instance().save(tex, texPageOutputPath, true);
+				manifest->registerResource(tex.getUUID(), texPageOutputPath);
+			}
 		}
 		}
 	}
 	}
 
 

+ 150 - 0
MBansheeEditor/AboutBox.cs

@@ -0,0 +1,150 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using BansheeEngine;
+
+namespace BansheeEditor
+{
+    /// <summary>
+    /// Displays information about the engine, its creator and licenses.
+    /// </summary>
+    public class AboutBox : ModalWindow
+    {
+        private GUITextBox emailLabel;
+
+        /// <summary>
+        /// Opens the about box.
+        /// </summary>
+        [MenuItem("Help/About", 5000)]
+        public static void Open()
+        {
+            new AboutBox();
+        }
+
+        /// <summary>
+        /// Constructs the about box.
+        /// </summary>
+        protected AboutBox()
+            : base(true)
+        {
+            Title = "About";
+            Width = 400;
+            Height = 350;
+        }
+
+        private void OnInitialize()
+        {
+            GUILabel title = new GUILabel(new LocEdString("Banshee Engine"), EditorStyles.TitleLabel);
+            GUILabel subTitle = new GUILabel(new LocEdString("A modern open-source game development toolkit"), 
+                EditorStyles.LabelCentered);
+            GUILabel license = new GUILabel(new LocEdString(
+                "This program is licensed under the GNU General Public License V3"), EditorStyles.LabelCentered);
+            GUILabel copyright = new GUILabel(new LocEdString("Copyright (C) 2015 Marko Pintera. All rights reserved."), 
+                EditorStyles.LabelCentered);
+            GUILabel emailTitle = new GUILabel(new LocEdString("E-mail"), GUIOption.FixedWidth(150));
+            emailLabel = new GUITextBox();
+            GUILabel linkedInTitle = new GUILabel(new LocEdString("LinkedIn"), GUIOption.FixedWidth(150));
+            GUIButton linkedInBtn = new GUIButton(new LocEdString("Profile"));
+
+            GUIToggle contactFoldout = new GUIToggle(new LocEdString("Author contact"), EditorStyles.Foldout);
+            GUIToggle thirdPartyFoldout = new GUIToggle(new LocEdString("Used third party libraries"), EditorStyles.Foldout);
+            GUIToggle noticesFoldout = new GUIToggle(new LocEdString("Third party notices"), EditorStyles.Foldout);
+
+            GUILabel freeTypeNotice = new GUILabel(new LocEdString(
+                        "Portions of this software are copyright (C) 2015 The FreeType Project (www.freetype.org). " +
+                        "All rights reserved."), EditorStyles.MultiLineLabelCentered, 
+                        GUIOption.FlexibleHeight(), GUIOption.FixedWidth(380));
+
+            GUILabel fbxSdkNotice = new GUILabel(new LocEdString(
+                "This software contains Autodesk(R) FBX(R) code developed by Autodesk, Inc. Copyright 2013 Autodesk, Inc. " +
+                "All rights, reserved. Such code is provided \"as is\" and Autodesk, Inc. disclaims any and all warranties, " +
+                "whether express or implied, including without limitation the implied warranties of merchantability, " +
+                "fitness for a particular purpose or non-infringement of third party rights. In no event shall Autodesk, " +
+                "Inc. be liable for any direct, indirect, incidental, special, exemplary, or consequential damages " +
+                "(including, but not limited to, procurement of substitute goods or services; loss of use, data, or " +
+                "profits; or business interruption) however caused and on any theory of liability, whether in contract, " +
+                "strict liability, or tort (including negligence or otherwise) arising in any way out of such code."),
+                EditorStyles.MultiLineLabelCentered, GUIOption.FlexibleHeight(), GUIOption.FixedWidth(380));
+
+            GUILayoutY mainLayout = GUI.AddLayoutY();
+            mainLayout.AddSpace(10);
+            mainLayout.AddElement(title);
+            mainLayout.AddElement(subTitle);
+            mainLayout.AddSpace(10);
+            mainLayout.AddElement(license);
+            mainLayout.AddElement(copyright);
+            mainLayout.AddSpace(10);
+            mainLayout.AddElement(contactFoldout);
+
+            GUILayoutY contactLayout = mainLayout.AddLayoutY();
+            GUILayout emailLayout = contactLayout.AddLayoutX();
+            emailLayout.AddSpace(10);
+            emailLayout.AddElement(emailTitle);
+            emailLayout.AddElement(emailLabel);
+            emailLayout.AddSpace(10);
+            GUILayout linkedInLayout = contactLayout.AddLayoutX();
+            linkedInLayout.AddSpace(10);
+            linkedInLayout.AddElement(linkedInTitle);
+            linkedInLayout.AddElement(linkedInBtn);
+            linkedInLayout.AddSpace(10);
+
+            mainLayout.AddSpace(5);
+            mainLayout.AddElement(thirdPartyFoldout);
+            GUILayoutY thirdPartyLayout = mainLayout.AddLayoutY();
+
+            CreateThirdPartyGUI(thirdPartyLayout, "Autodesk FBX SDK",
+                "http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=10775847", "FBX_SDK_License.rtf");
+            CreateThirdPartyGUI(thirdPartyLayout, "FreeImage", "http://freeimage.sourceforge.net/", "freeimage-license.txt");
+            CreateThirdPartyGUI(thirdPartyLayout, "FreeType", "http://www.freetype.org/", "FTL.TXT");
+            CreateThirdPartyGUI(thirdPartyLayout, "Mono", "http://www.mono-project.com/", "Mono.txt");
+            CreateThirdPartyGUI(thirdPartyLayout, "NVIDIA Texture Tools",
+                "https://github.com/castano/nvidia-texture-tools", "NVIDIATextureTools.txt");
+
+            mainLayout.AddSpace(5);
+            mainLayout.AddElement(noticesFoldout);
+            GUILayout noticesLayout = mainLayout.AddLayoutY();
+            noticesLayout.AddElement(freeTypeNotice);
+            noticesLayout.AddSpace(10);
+            noticesLayout.AddElement(fbxSdkNotice);
+            mainLayout.AddFlexibleSpace();
+
+            contactLayout.Active = false;
+            contactFoldout.OnToggled += x => contactLayout.Active = x;
+
+            thirdPartyLayout.Active = false;
+            thirdPartyFoldout.OnToggled += x => thirdPartyLayout.Active = x;
+
+            noticesLayout.Active = false;
+            noticesFoldout.OnToggled += x => noticesLayout.Active = x;
+
+            emailLabel.Text = "[email protected]";
+            linkedInBtn.OnClick += () => { System.Diagnostics.Process.Start("http://hr.linkedin.com/in/markopintera"); };
+        }
+
+        private void CreateThirdPartyGUI(GUILayoutY layout, string name, string webURL, string licenseFile)
+        {
+            GUILabel label = new GUILabel(new LocEdString(name), GUIOption.FixedWidth(150));
+            GUIButton linkBtn = new GUIButton(new LocEdString("Website"), GUIOption.FixedWidth(50));
+            GUIButton licenseBtn = new GUIButton(new LocEdString("License"), GUIOption.FixedWidth(50));
+
+            string licensePath = "..\\..\\..\\License\\Third Party\\" + licenseFile;
+
+            GUILayoutX horzLayout = layout.AddLayoutX();
+            horzLayout.AddSpace(10);
+            horzLayout.AddElement(label);
+            horzLayout.AddSpace(10);
+            horzLayout.AddElement(linkBtn);
+            horzLayout.AddSpace(5);
+            horzLayout.AddElement(licenseBtn);
+            horzLayout.AddSpace(10);
+
+            linkBtn.OnClick += () => { System.Diagnostics.Process.Start(webURL); };
+            licenseBtn.OnClick += () => { System.Diagnostics.Process.Start(licensePath); };
+        }
+
+        private void OnEditorUpdate()
+        {
+            emailLabel.Text = "[email protected]";
+        }
+    }
+}

+ 2 - 0
MBansheeEditor/EditorStyles.cs

@@ -14,6 +14,8 @@ namespace BansheeEditor
     {
     {
         public const string Blank = "Blank";
         public const string Blank = "Blank";
         public const string Label = "Label";
         public const string Label = "Label";
+        public const string LabelCentered = "LabelCentered";
+        public const string TitleLabel = "TitleLabel";
         public const string MultiLineLabel = "MultiLineLabel";
         public const string MultiLineLabel = "MultiLineLabel";
         public const string MultiLineLabelCentered = "MultiLineLabelCentered";
         public const string MultiLineLabelCentered = "MultiLineLabelCentered";
         public const string Button = "Button";
         public const string Button = "Button";

+ 1 - 0
MBansheeEditor/MBansheeEditor.csproj

@@ -39,6 +39,7 @@
     <Reference Include="System.Xml" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <Compile Include="AboutBox.cs" />
     <Compile Include="BrowseDialog.cs" />
     <Compile Include="BrowseDialog.cs" />
     <Compile Include="BuildManager.cs" />
     <Compile Include="BuildManager.cs" />
     <Compile Include="CodeEditor.cs" />
     <Compile Include="CodeEditor.cs" />

+ 0 - 1
TODO.txt

@@ -51,7 +51,6 @@ Stage 2 polish:
  - Splash screen
  - Splash screen
  - Settings/Preferences window (+ menu entry)
  - Settings/Preferences window (+ menu entry)
  - Console window
  - Console window
- - About box - license info, version info and other general info (+ menu entry)
 
 
 Optional:
 Optional:
  - When starting drag from hierarchy tree view it tends to select another object (can't repro)
  - When starting drag from hierarchy tree view it tends to select another object (can't repro)