From cd506f8f08ada34c2bc33740c1fea468e55a1c8f Mon Sep 17 00:00:00 2001
From: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Date: Tue, 16 Jul 2024 13:09:58 +0100
Subject: [PATCH] Adjusts style meter fonts to not be blurry, fixes text
overlapping with meter/shifting up when you gain actions (#84979)
## About The Pull Request
Currently the fonts are blurry due to using wrong sizes and also overlap
with the style bar above them. Also they move upwards when actions are
gained due to wrong length coefficient.
Here's how it looks now:

## Changelog
:cl:
fix: Style meter text is no longer blurry and doesnt overlap with UI
anymore.
/:cl:
---
code/datums/components/style/style.dm | 12 ++++--------
code/datums/components/style/style_meter.dm | 2 +-
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/code/datums/components/style/style.dm b/code/datums/components/style/style.dm
index f39379d6367..fcf62dead1a 100644
--- a/code/datums/components/style/style.dm
+++ b/code/datums/components/style/style.dm
@@ -219,7 +219,7 @@
rank = rank_changed
meter.maptext = "[format_rank_string(rank)][generate_multiplier()][generate_actions()]"
- meter.maptext_y = 100 - 9 * length(actions)
+ meter.maptext_y = 94 - 12 * length(actions)
update_meter(point_to_rank(), go_back)
/datum/component/style/proc/update_meter(new_rank, go_back)
@@ -270,19 +270,15 @@
return "SPACED!"
/datum/component/style/proc/format_rank_string(new_rank)
- var/rank_string = rank_to_string(new_rank)
- var/final_string = ""
- final_string += "[rank_string[1]]"
- final_string += "[copytext(rank_string, 2)]"
- return final_string
+ return MAPTEXT_PIXELLARI("[rank_to_string(new_rank)]")
/datum/component/style/proc/generate_multiplier()
- return "
MULTIPLIER: [point_multiplier]X"
+ return "
" + MAPTEXT_GRAND9K("MULTIPLIER: [point_multiplier]X")
/datum/component/style/proc/generate_actions()
var/action_string = ""
for(var/action in actions)
- action_string += "
+ [actions[action]]"
+ action_string += "
" + MAPTEXT_GRAND9K("+ [actions[action]]")
return action_string
/datum/component/style/proc/action_to_color(action)
diff --git a/code/datums/components/style/style_meter.dm b/code/datums/components/style/style_meter.dm
index 94263700dda..cc02baec1d5 100644
--- a/code/datums/components/style/style_meter.dm
+++ b/code/datums/components/style/style_meter.dm
@@ -132,7 +132,7 @@
maptext_height = 120
maptext_width = 105
maptext_x = 5
- maptext_y = 100
+ maptext_y = 94
maptext = ""
layer = SCREENTIP_LAYER