Merge pull request #4753 from mike-f1/fix_labels

Restore the ability to hide labels in the WorldView.
master
Webster Sheets 2019-12-08 17:16:46 -05:00 committed by GitHub
commit d82ac096fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -144,16 +144,17 @@ local function displayOnScreenObjects()
local mainBody = group[2].body
local mainCoords = group[1].screenCoordinates
local count = #group - 1
local label = mainBody:GetLabel()
if count > 1 then
label = label .. " (" .. count .. ")"
end
ui.addIcon(mainCoords, getBodyIcon(mainBody), colors.frame, iconsize, ui.anchor.center, ui.anchor.center)
mainCoords.x = mainCoords.x + label_offset
ui.addStyledText(mainCoords, ui.anchor.left, ui.anchor.center, label , colors.frame, pionillium.small)
if should_show_label then
local label = mainBody:GetLabel()
if count > 1 then
label = label .. " (" .. count .. ")"
end
ui.addStyledText(mainCoords, ui.anchor.left, ui.anchor.center, label , colors.frame, pionillium.small)
end
local mp = ui.getMousePos()
-- mouse release handler for radial menu
if (mp - mainCoords):length() < iconsize:length() * 1.5 then