aboutsummaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-02-23 15:47:29 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-02-23 15:47:29 +0000
commit09cb93c06202febc160b644b384a8d7d29978c04 (patch)
treeb16975f0c3e26ce1d2cdb793f6edaa8c824fb977 /src/base
parentfb364dd193945e9027df807b4648e1f325b43d35 (diff)
downloadusdx-09cb93c06202febc160b644b384a8d7d29978c04.tar.gz
usdx-09cb93c06202febc160b644b384a8d7d29978c04.tar.xz
usdx-09cb93c06202febc160b644b384a8d7d29978c04.zip
medley mod: Themes modifications. This is considered the last part of the medley mod.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2946 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base')
-rw-r--r--src/base/TextGL.pas28
-rw-r--r--src/base/UThemes.pas26
2 files changed, 46 insertions, 8 deletions
diff --git a/src/base/TextGL.pas b/src/base/TextGL.pas
index feca0974..7da1d558 100644
--- a/src/base/TextGL.pas
+++ b/src/base/TextGL.pas
@@ -56,6 +56,7 @@ const
ftBold = 1;
ftOutline1 = 2;
ftOutline2 = 3;
+ ftBoldHighRes = 4;
var
Fonts: array of TGLFont;
@@ -98,7 +99,7 @@ procedure AddFontFallbacks(FontIni: TMemIniFile; Font: TFont);
var
FallbackFont: IPath;
IdentName: string;
- I: Integer;
+ I: integer;
begin
// evaluate the ini-file's 'Fallbacks' section
for I := 1 to 10 do
@@ -117,8 +118,8 @@ begin
end;
const
- FONT_NAMES: array [0..3] of string = (
- 'Normal', 'Bold', 'Outline1', 'Outline2'
+ FONT_NAMES: array [0..4] of string = (
+ 'Normal', 'Bold', 'Outline1', 'Outline2', 'BoldHighRes'
);
procedure BuildFonts;
@@ -126,6 +127,8 @@ var
I: integer;
FontIni: TMemIniFile;
FontFile: IPath;
+ FontMaxResolution: integer;
+ FontPreCache: integer;
Outline: single;
Embolden: single;
OutlineFont: TFTScalableOutlineFont;
@@ -144,12 +147,21 @@ begin
FontFile := FindFontFile(FontIni.ReadString(SectionName , 'File', ''));
+ FontMaxResolution := FontIni.ReadInteger(SectionName, 'MaxResolution', 64);
+ FontPreCache := FontIni.ReadInteger(SectionName, 'PreCache', 1);
+
// create either outlined or normal font
Outline := FontIni.ReadFloat(SectionName, 'Outline', 0.0);
if (Outline > 0.0) then
begin
// outlined font
- OutlineFont := TFTScalableOutlineFont.Create(FontFile, 64, Outline, True, True);
+ OutlineFont := TFTScalableOutlineFont.Create(
+ FontFile,
+ FontMaxResolution,
+ Outline,
+ True,
+ (FontPreCache <> 0)
+ );
OutlineFont.SetOutlineColor(
FontIni.ReadFloat(SectionName, 'OutlineColorR', 0.0),
FontIni.ReadFloat(SectionName, 'OutlineColorG', 0.0),
@@ -163,7 +175,13 @@ begin
begin
// normal font
Embolden := FontIni.ReadFloat(SectionName, 'Embolden', 0.0);
- Fonts[I].Font := TFTScalableFont.Create(FontFile, 64, Embolden, True, True);
+ Fonts[I].Font := TFTScalableFont.Create(
+ FontFile,
+ FontMaxResolution,
+ Embolden,
+ True,
+ (FontPreCache <> 0)
+ );
Fonts[I].Outlined := false;
end;
diff --git a/src/base/UThemes.pas b/src/base/UThemes.pas
index b385406f..7dd30f7f 100644
--- a/src/base/UThemes.pas
+++ b/src/base/UThemes.pas
@@ -34,12 +34,12 @@ interface
{$I switches.inc}
uses
- IniFiles,
SysUtils,
Classes,
+ IniFiles,
ULog,
- UTexture,
- UPath;
+ UPath,
+ UTexture;
type
TRGB = record
@@ -261,6 +261,10 @@ type
//Video Icon Mod
VideoIcon: TThemeStatic;
+ //Medley Icons
+ MedleyIcon: TThemeStatic;
+ CalculatedMedleyIcon: TThemeStatic;
+
//Show Cat in TopLeft Mod
TextCat: TThemeText;
StaticCat: TThemeStatic;
@@ -356,6 +360,9 @@ type
TextP3R: TThemeText;
TextP3RScore: TThemeText;
+ StaticSongName: TThemeStatic;
+ TextSongName: TThemeText;
+
//Linebonus Translations
LineBonusText: array [0..8] of UTF8String;
@@ -401,6 +408,9 @@ type
StaticLevelRound: array[1..6] of TThemeStatic;
StaticPlayerIdBox: array[1..6] of TThemeStatic;
+ StaticNavigate: TThemeStatic;
+ TextNavigate: TThemeText;
+
// Description: array[0..5] of string;}
end;
@@ -1087,6 +1097,10 @@ begin
//Video Icon Mod
ThemeLoadStatic(Song.VideoIcon, 'SongVideoIcon');
+ //Medley Icons
+ ThemeLoadStatic(Song.MedleyIcon, 'SongMedleyIcon');
+ ThemeLoadStatic(Song.CalculatedMedleyIcon, 'SongCalculatedMedleyIcon');
+
//Show Cat in TopLeft Mod
ThemeLoadStatic(Song.StaticCat, 'SongStaticCat');
ThemeLoadText(Song.TextCat, 'SongTextCat');
@@ -1210,6 +1224,9 @@ begin
ThemeLoadStatic(Sing.StaticP3RScoreBG, 'SingP3RStatic2');
ThemeLoadText(Sing.TextP3RScore, 'SingP3RTextScore');
+ ThemeLoadStatic(Sing.StaticSongName, 'SingSongNameStatic');
+ ThemeLoadText(Sing.TextSongName, 'SingSongNameText');
+
//Line Bonus Texts
Sing.LineBonusText[0] := Language.Translate('POPUP_AWFUL');
Sing.LineBonusText[1] := Sing.LineBonusText[0];
@@ -1260,6 +1277,9 @@ begin
ThemeLoadStatic(Score.StaticRatings[I], 'ScoreStaticRatingPicture' + IntToStr(I));
end;
+ ThemeLoadStatic(Score.StaticNavigate, 'ScoreStaticNavigate');
+ ThemeLoadText(Score.TextNavigate, 'ScoreTextNavigate');
+
// Top5
ThemeLoadBasic(Top5, 'Top5');