Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion hook/lua/options/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,17 @@ table.insert(options.ui.items,
custom = GetBooleanStates(),
set = SetOptions,
})

table.insert(options.ui.items,
{
tip = "Specify whether or not show tooptip when hover share resources/units icons \n \n Game Session only",
title = "SSB Show Tooltip When Hover Icons",
key = 'SSB_Show_Tooltip_On_Hover',
type = 'toggle',
default = true,
custom = GetBooleanStates(),
set = SetOptions,
})

-- SSB Ping options
table.insert(options.ui.items,
{
Expand Down
19 changes: 14 additions & 5 deletions modules/score_board.lua
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,11 @@ function CreateArmyLine(armyID, army)
Diplomacy.SendUnits(self.armyID, false) -- share selected units
end
end
Tooltip.AddControlTooltip(group.shareUnitsIcon, str.tooltip('share_units'))


if GameOptions['SSB_Show_Tooltip_On_Hover'] then
Tooltip.AddControlTooltip(group.shareUnitsIcon, str.tooltip('share_units'))
end

position = position + iconSize + 5
group.shareEngyIcon = CreateInfoIcon(group, 'eco.engyIncome.dds')
--group.shareEngyIcon:SetTexture(modTextures..'eco.engyIncome.dds')
Expand All @@ -681,8 +684,11 @@ function CreateArmyLine(armyID, army)
Diplomacy.SendResource(self.armyID, 0, 50) -- Share 50% energy
end
end
Tooltip.AddControlTooltip(group.shareEngyIcon, str.tooltip('share_engy'))


if GameOptions['SSB_Show_Tooltip_On_Hover'] then
Tooltip.AddControlTooltip(group.shareEngyIcon, str.tooltip('share_engy'))
end

-- UI for showing allied players' energy stats
position = position + iconSize + 3
group.engyColumn = UIUtil.CreateText(group, '0', fontSize, fontName)
Expand All @@ -707,7 +713,10 @@ function CreateArmyLine(armyID, army)
Diplomacy.SendResource(self.armyID, 50, 0) -- Share 50% mass
end
end
Tooltip.AddControlTooltip(group.shareMassIcon, str.tooltip('share_mass'))

if GameOptions['SSB_Show_Tooltip_On_Hover'] then
Tooltip.AddControlTooltip(group.shareMassIcon, str.tooltip('share_mass'))
end

-- UI for showing allied players' mass stats
position = position + iconSize + 2
Expand Down