Skip to content
Browse files

Made the map hud shorter and IMHO nicer to look at.

They should be more noticeable now but get less in the way, also.
  • Loading branch information...
1 parent 5ac8312 commit 1e494151927a1b0c402f2ca9a936e6029960e53b Yohann Ferreira committed
Showing with 17 additions and 9 deletions.
  1. +1 −0 LICENSES
  2. +4 −1 dat/config/fonts.lua
  3. BIN img/fonts/Berenika-Oblique.ttf
  4. +3 −0 img/fonts/OFL-1.1.txt
  5. +9 −8 src/modes/map/map.cpp
View
1 LICENSES
@@ -128,6 +128,7 @@ img/effects/emotes/interrogation.png CC by SA 3.0
img/fonts/LinBiolinum_RBah.ttf OFL 1.1 / GPLv2 Philipp H. Poll - http://www.linuxlibertine.org
img/fonts/LinLibertine_aBS.ttf OFL 1.1 / GPLv2 Philipp H. Poll - http://www.linuxlibertine.org
+img/fonts/Berenika-Oblique.ttf OFL 1.1 wmk69 - http://openfontlibrary.org/en/font/klaudia-and-berenika
img/icons/actors/characters/kalya.png GPLv2 Allacrost (was Laila icon)
img/icons/actors/characters/sylve.png GPLv2 Allacrost (was Raphaela icon)
View
5 dat/config/fonts.lua
@@ -21,7 +21,10 @@ fonts = {
["text26"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 26},
["text28"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 28},
["text36"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 36},
- ["text48"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 48}
+ ["text48"] = {font = "img/fonts/LinBiolinum_RBah.ttf", size = 48},
+
+ -- Map title font
+ ["map_title"] = {font = "img/fonts/Berenika-Oblique.ttf", size = 30}
}
-- The font is white with a black shadow anyway.
View
BIN img/fonts/Berenika-Oblique.ttf
Binary file not shown.
View
3 img/fonts/OFL-1.1.txt
@@ -1,6 +1,9 @@
Copyright (c) 2003–2012, Philipp H. Poll (www.linuxlibertine.org | gillian at linuxlibertine.org),
with Reserved Font Name "Linux Libertine" and "Biolinum".
+Copyright (c) 2011, wmk69 (wmk69@o2.pl),
+with Reserved Font Names 'Berenika Oblique'.
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
View
17 src/modes/map/map.cpp
@@ -114,7 +114,7 @@ MapMode::MapMode(const std::string& filename) :
_dialogue_supervisor = new DialogueSupervisor();
_treasure_supervisor = new TreasureSupervisor();
- _intro_timer.Initialize(7000, 0);
+ _intro_timer.Initialize(4000, 0);
_intro_timer.EnableAutoUpdate(this);
_camera_timer.Initialize(0, 1);
@@ -936,11 +936,11 @@ void MapMode::_DrawGUI() {
uint32 time = _intro_timer.GetTimeExpired();
Color blend(1.0f, 1.0f, 1.0f, 1.0f);
- if (time < 2000) { // Fade in
- blend.SetAlpha((static_cast<float>(time) / 2000.0f));
+ if (time < 1000) { // Fade in
+ blend.SetAlpha((static_cast<float>(time) / 1000.0f));
}
- else if (time > 5000) { // Fade out
- blend.SetAlpha(1.0f - static_cast<float>(time - 5000) / 2000.0f);
+ else if (time > 2000) { // Fade out
+ blend.SetAlpha(1.0f - static_cast<float>(time - 2000) / 1000.0f);
}
// Don't draw the map location again, when it is the same as the last map.
@@ -950,8 +950,9 @@ void MapMode::_DrawGUI() {
VideoManager->SetDrawFlags(VIDEO_X_CENTER, VIDEO_Y_CENTER, 0);
VideoManager->Move(512.0f, 100.0f);
_map_image.Draw(blend);
- VideoManager->MoveRelative(0.0f, -80.0f);
- VideoManager->Text()->Draw(_map_hud_name, TextStyle("title24", blend, VIDEO_TEXT_SHADOW_DARK));
+ float shifting = (((float)time) - 2000.0f) / 100.0f;
+ VideoManager->MoveRelative(0.0f + shifting, -80.0f);
+ VideoManager->Text()->Draw(_map_hud_name, TextStyle("map_title", blend, VIDEO_TEXT_SHADOW_DARK));
VideoManager->PopState();
}
@@ -968,7 +969,7 @@ void MapMode::_DrawGUI() {
if (_unlimited_stamina) {
_DrawStaminaBar(blend);
}
- else if (time < 2000) {
+ else if (time < 1000) {
// Draw the normal bar fade in only (no fade out)
_DrawStaminaBar(blend);
}

0 comments on commit 1e49415

Please sign in to comment.
Something went wrong with that request. Please try again.