aboutsummaryrefslogtreecommitdiff
path: root/game/hud/HudSubScene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/hud/HudSubScene.cpp')
-rw-r--r--game/hud/HudSubScene.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/game/hud/HudSubScene.cpp b/game/hud/HudSubScene.cpp
index e76623d..126f933 100644
--- a/game/hud/HudSubScene.cpp
+++ b/game/hud/HudSubScene.cpp
@@ -11,25 +11,26 @@ void HudSubScene::create(Scene & scn){
// Distance
GameObject hud_dis = scn.new_object(HUD_DISTANCE);
- crepe::vec2 size_distance = {DISTANCE_WIDTH,(DISTANCE_WIDTH/DISTANCE_LENGTH)*2};
+
+ crepe::vec2 size_distance = {DISTANCE_CHAR_WIDTH*DISTANCE_LENGTH,(DISTANCE_CHAR_WIDTH)*2};
hud_dis.add_component<Text>(size_distance, FONT,Text::Data{
.world_space = false,
.text_color = Color::WHITE,
- }, TOP_LEFT+FONTOFFSET, DISTANCE_PLACEHOLDER);
+ }, TOP_LEFT+FONTOFFSET + vec2{DISTANCE_LENGTH * DISTANCE_CHAR_WIDTH/2,0}, DISTANCE_PLACEHOLDER);
// Best
GameObject hud_best = scn.new_object(HUD_BEST);
- crepe::vec2 size_best = {BEST_WIDTH,(BEST_WIDTH/BEST_LENGTH)*2};
+ crepe::vec2 size_best = {BEST_CHAR_WIDTH*BEST_LENGTH,(BEST_CHAR_WIDTH)*2};
hud_best.add_component<Text>(size_best, FONT,Text::Data{
.world_space = false,
- .text_color = Color::WHITE,
- }, TOP_LEFT+FONTOFFSET+BEST_OFFSET, BEST);
+ .text_color = Color::GREY,
+ }, TOP_LEFT+FONTOFFSET+BEST_OFFSET + vec2{BEST_LENGTH * BEST_CHAR_WIDTH/2,0}, BEST);
// Coins
GameObject hud_coin = scn.new_object(HUD_COINS);
- crepe::vec2 size = {COINS_WIDTH,(COINS_WIDTH/COINS_LENGTH)*2};
+ crepe::vec2 size = {COINS_CHAR_WIDTH*COINS_LENGTH,(COINS_CHAR_WIDTH)*2};
hud_coin.add_component<Text>(size, FONT,Text::Data{
.world_space = false,
- .text_color = Color::WHITE,
- }, TOP_LEFT+FONTOFFSET+COINS_OFFSET, COINS);
+ .text_color = Color::YELLOW,
+ }, TOP_LEFT+FONTOFFSET+COINS_OFFSET + vec2{COINS_LENGTH * COINS_CHAR_WIDTH/2,0}, COINS);
}