Skip to content
Open
Show file tree
Hide file tree
Changes from 9 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
Binary file added data/images/game/proficiency/augment-icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/game/proficiency/bonus-select-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/game/proficiency/icon-lock-grey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/game/proficiency/icon-star-dark.png
Binary file added data/images/game/proficiency/icon-star-tiny-gold.png
Binary file added data/images/game/proficiency/icons-0.png
Binary file added data/images/game/proficiency/icons-1.png
Binary file added data/images/game/proficiency/icons-2.png
Binary file added data/images/game/proficiency/icons-3.png
Binary file added data/images/game/proficiency/icons-4.png
Binary file added data/images/game/proficiency/icons-5.png
Binary file added data/images/game/proficiency/icons-6.png
Binary file added data/images/game/proficiency/icons-7.png
Binary file added data/images/game/proficiency/icons-8.png
Binary file added data/images/game/proficiency/icons-9-off.png
Binary file added data/images/game/proficiency/icons-9.png
Binary file added data/images/game/proficiency/progress-bg.png
Binary file added data/images/game/proficiency/star-progress-bg.png
Binary file added data/images/game/proficiency/star-progress.png
Binary file added data/images/game/topbar/backgroundTop.png
Binary file added data/images/game/topbar/boost-vertical.png
Binary file added data/images/game/topbar/boost.png
Binary file added data/images/game/topbar/bottom-topbar.png
Binary file added data/images/game/topbar/condition-topbar.png
Binary file added data/images/game/topbar/healthMana-topbar.png
Binary file added data/images/game/topbar/icon-combopoint-empty.png
Binary file added data/images/game/topbar/icon-combopoint-filled.png
Binary file added data/images/game/topbar/icon-proficiencytree-off.png
Binary file added data/images/game/topbar/icon-proficiencytree-on.png
Binary file added data/images/game/topbar/icon-serene-off.png
Binary file added data/images/game/topbar/icon-serene-on.png
Binary file added data/images/game/topbar/icons.png
Binary file added data/images/game/topbar/large/large-container.png
Binary file added data/images/game/topbar/large/small-container.png
Binary file added data/images/game/topbar/left-bg.png
Binary file added data/images/game/topbar/marker_left.png
Binary file added data/images/game/topbar/marker_top.png
Binary file added data/images/game/topbar/proficiency-bg.png
Binary file added data/images/game/topbar/proficiency-button.png
Binary file added data/images/game/topbar/proficiency-progress.png
Binary file added data/images/game/topbar/progressbar-large-100.png
Binary file added data/images/game/topbar/right-bg.png
Binary file added data/images/game/topbar/topBarBG.png
Binary file added data/images/options/button_proficiency.png
4,577 changes: 4,577 additions & 0 deletions data/json/SkillwheelStringsJsonLibrary.json

Large diffs are not rendered by default.

27,713 changes: 27,713 additions & 0 deletions data/json/proficiencies.json

Large diffs are not rendered by default.

90 changes: 89 additions & 1 deletion data/styles/30-statsbar.otui
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,13 @@ TopStatsBarParallelOnTop < UIWidget
margin-right: 18
height: 0

ProficiencyTopBarWidget
id: proficiencyTopBar
anchors.top: skills.bottom
anchors.right: icons.left
margin-right: 4
size: 113 13

Panel
id: icons
image-border: 3
Expand Down Expand Up @@ -575,6 +582,13 @@ TopStatsBarDefaultOnTop < UIWidget
margin-right: 18
height: 0

ProficiencyTopBarWidget
id: proficiencyTopBar
anchors.top: skills.bottom
anchors.right: icons.left
margin-right: 4
size: 113 13

Panel
id: icons
image-border: 3
Expand Down Expand Up @@ -1281,4 +1295,78 @@ TopStatsBarCompactOnBottom < UIWidget
anchors.top: manashield.bottom
margin-top: 6
margin-right: 6
height: 0
height: 0

// Proficiency XP Bar Widget for TopBar
// Structure: [Button+Highlight] [Progress Bar with % label] [Tree Icon]
ProficiencyTopBarWidget < UIWidget
id: proficiencyTopBar
size: 113 13
visible: false

UIButton
id: proficiencyButton
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
size: 13 13
image-source: /images/game/topbar/proficiency-button
image-clip: 0 0 13 13
!tooltip: tr('Open Weapon Proficiency')
@onClick: |
if modules.game_proficiency and modules.game_proficiency.toggle then
modules.game_proficiency.toggle()
end
$pressed:
image-clip: 0 13 13 13

UIWidget
id: highlightProficiencyButton
size: 15 15
anchors.top: proficiencyButton.top
anchors.left: proficiencyButton.left
margin-top: -1
margin-left: -1
visible: false
phantom: true
image-source: /images/game/topbar/highlight-proficiency-button

UIWidget
id: proficiencyBg
anchors.left: proficiencyButton.right
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
margin-left: 3
image-source: /images/game/topbar/proficiency-bg
image-border: 2
!tooltip: tr('Proficiency Progress')

ProgressBar
id: proficiencyProgress
anchors.left: proficiencyBg.left
anchors.right: proficiencyBg.right
anchors.top: proficiencyBg.top
anchors.bottom: proficiencyBg.bottom
margin: 1 1 1 1
background-color: #1abc9c
percent: 0

Label
id: proficiencyLabel
anchors.left: proficiencyBg.left
anchors.right: proficiencyBg.right
anchors.verticalCenter: proficiencyBg.verticalCenter
text-align: center
font: verdana-11px-rounded
color: #ffffff
text: 0%
phantom: true

UIWidget
id: proficiencyIcon
anchors.right: proficiencyBg.right
anchors.verticalCenter: proficiencyBg.verticalCenter
margin-right: 1
size: 9 11
phantom: true
image-source: /images/game/topbar/icon-proficiencytree-on
27 changes: 25 additions & 2 deletions modules/game_interface/widgets/statsbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ local statsBarsPlacements = {
-- hideAll() and destroyALlIcons functions.
local statsBarsDimensions = {
Large = {
height = 35
height = 52
},
Default = {
height = 35
height = 52
},
Parallel = {
height = 55
Expand Down Expand Up @@ -509,6 +509,8 @@ function constructStatsBar(dimension, placement)
StatsBar.reloadCurrentStatsBarQuickInfo()

modules.game_healthcircle.setStatsBarOption()

StatsBar.initProficiencyTopBar()
else
print("No stats bar found for:", dimensionOnPlacement .. " on constructStatsBar()")
end
Expand Down Expand Up @@ -683,6 +685,27 @@ function StatsBar.OnGameStart()
StatsBar.loadSettings()
StatsBar.reloadCurrentTab()
modules.game_healthcircle.setStatsBarOption()

-- Initialize proficiency topbar widget
StatsBar.initProficiencyTopBar()
end

-- Initialize proficiency top bar widget
function StatsBar.initProficiencyTopBar()
local statsBar = StatsBar.getCurrentStatsBarWithPosition()
if not statsBar then return end

local profWidget = statsBar:recursiveGetChildById('proficiencyTopBar')
if profWidget then
-- Show only if client supports proficiency (version >= 1500)
local showProficiency = g_game.getClientVersion() >= 1500
profWidget:setVisible(showProficiency)

-- Update proficiency display if module is loaded
if showProficiency and modules.game_proficiency and modules.game_proficiency.updateTopBarProficiency then
modules.game_proficiency.updateTopBarProficiency()
end
end
end

function createStatsBarWidgets(statsBar)
Expand Down
10 changes: 10 additions & 0 deletions modules/game_inventory/inventory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ local function inventoryEvent(player, slot, item, oldItem)
ItemsDatabase.setCharges(slotPanel.item, item)
end
ItemsDatabase.setTier(slotPanel.item, item)

if slot == InventorySlotLeft then
if modules.game_proficiency and modules.game_proficiency.updateTopBarProficiency then
-- Request proficiency data for new weapon
if item and g_game.sendWeaponProficiencyAction then
g_game.sendWeaponProficiencyAction(0, item:getId())
end
modules.game_proficiency.updateTopBarProficiency()
end
end
end

local function onSoulChange(localPlayer, soul)
Expand Down
Loading