Skip to content

Commit

Permalink
fixing justified text to left from center (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: Gueho Frederic <frederic.gueho@campus.academy>
  • Loading branch information
ItsMumu and ItsMumuu authored Nov 23, 2024
1 parent 6bcbfcc commit 876fc9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ unused_args = false
allow_defined_top = true
unused = false
shadowing = false
max_line_length = 120
max_line_length = 130

exclude_files = {
"KeyRoller/Libs/",
Expand Down
4 changes: 3 additions & 1 deletion KeyRoller.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@ local function UpdateKeyList(content)
end

local formattedDisplay = ""
local returnStr = "\n"
for player, key in pairs(playerKeys) do
if key.level >= minKeyLevel and key.level <= maxKeyLevel then
formattedDisplay =
formattedDisplay .. string.format("%s: %s +%d", player, key.dungeon, key.level) .. "\n" .. "\n"
formattedDisplay .. string.format("%s: %s +%d %s %s", player, key.dungeon, key.level, returnStr, returnStr)
end
end
text:SetJustifyH("LEFT");
text:SetPoint("TOPLEFT", 0, 0)
text:SetText(formattedDisplay)
content:SetHeight(math.max(20, 0))
Expand Down

0 comments on commit 876fc9c

Please sign in to comment.