Skip to content

Commit 876fc9c

Browse files
ItsMumuItsMumuu
andauthored
fixing justified text to left from center (#15)
Co-authored-by: Gueho Frederic <frederic.gueho@campus.academy>
1 parent 6bcbfcc commit 876fc9c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.luacheckrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ unused_args = false
44
allow_defined_top = true
55
unused = false
66
shadowing = false
7-
max_line_length = 120
7+
max_line_length = 130
88

99
exclude_files = {
1010
"KeyRoller/Libs/",

KeyRoller.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,14 @@ local function UpdateKeyList(content)
112112
end
113113

114114
local formattedDisplay = ""
115+
local returnStr = "\n"
115116
for player, key in pairs(playerKeys) do
116117
if key.level >= minKeyLevel and key.level <= maxKeyLevel then
117118
formattedDisplay =
118-
formattedDisplay .. string.format("%s: %s +%d", player, key.dungeon, key.level) .. "\n" .. "\n"
119+
formattedDisplay .. string.format("%s: %s +%d %s %s", player, key.dungeon, key.level, returnStr, returnStr)
119120
end
120121
end
122+
text:SetJustifyH("LEFT");
121123
text:SetPoint("TOPLEFT", 0, 0)
122124
text:SetText(formattedDisplay)
123125
content:SetHeight(math.max(20, 0))

0 commit comments

Comments
 (0)