Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Commit

Permalink
buff icon localisation
Browse files Browse the repository at this point in the history
  • Loading branch information
joffreybesos committed Jun 3, 2022
1 parent 154a312 commit dd6ce83
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/localization.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ LoadLocalization(ByRef settings) {
localizedStringsItems := ReadSection(locale, "Items")
localizedStringsMonstes := ReadSection(locale, "Monsters")
localizedStringsRunes := ReadSection(locale, "Runes")
localizedStringsBuffs := ReadSection(locale, "Buffs")
localizedStringsUI := ReadSection(locale, "UI")
localizedStringsQuality := ReadSection(locale, "Quality")
localizedStringsSockets := ReadSection(locale, "Sockets")
Expand All @@ -50,6 +51,8 @@ LoadLocalization(ByRef settings) {
localizedStrings[k]:=v
for k, v in localizedStringsRunes
localizedStrings[k]:=v
for k, v in localizedStringsBuffs
localizedStrings[k]:=v
for k, v in localizedStringsUI
localizedStrings[k]:=v
for k, v in localizedStringsQuality
Expand Down
Binary file modified src/localization.ini
Binary file not shown.
12 changes: 9 additions & 3 deletions src/ui/gdip/BuffBarLayer.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class BuffBarLayer {
}

checkHover(mouseX, mouseY) {
this.showToolTip := 0
if (mouseX > this.leftMargin and mouseX < (this.leftMargin + this.textBoxWidth)) {
if (mouseY > this.topMargin and mouseY < (this.topMargin + this.textBoxHeight)) {

Expand All @@ -60,8 +61,9 @@ class BuffBarLayer {
if (mouseY > boxy and mouseY < (boxy + this.imageSize)) {
;Gdip_DrawImage(this.G, buffBitmaps[iconName.fileName], iconx, this.yoffset,this.imageSize, this.imageSize)
;Gdip_DrawRectangle(this.G, this.pPenBuff, iconx, this.yoffset, this.imageSize, this.imageSize)
;OutputDebug, % "Hover " iconName.fileName "`n"
this.drawFloatingText(iconx, 4, iconName.fileName)
; OutputDebug, % "Hover " iconName.num " " iconName.fileName "`n"
this.showToolTip := iconName.num
break
}
}
iconi++
Expand Down Expand Up @@ -116,7 +118,8 @@ class BuffBarLayer {
{
thisIcon := getStateIcon(state.stateNum)
if (thisIcon) {
this.iconsToShow[state.stateNum] := { "fileName": thisIcon, "num": state.stateNum, "active": true, "timestamp": A_TickCount}
;OutputDebug % this.iconsToShow[state.stateNum].showToolTip
this.iconsToShow[state.stateNum] := { "fileName": thisIcon, "num": state.stateNum, "active": true, "timestamp": A_TickCount }
this.lastIcons[state.stateNum] := 0
this.removedIcons[state.stateNum] := 0
this.totalicons++
Expand Down Expand Up @@ -157,6 +160,9 @@ class BuffBarLayer {
Gdip_FillRectangle(this.G, this.pBrushExpiring, iconx, this.yoffset, this.imageSize, this.imageSize-1)
}
}
if (this.showToolTip == iconName.num) {
this.drawFloatingText(iconx + (this.imageSize /2), 4, localizedStrings["buff" . iconName.num])
}
iconi++
}
this.lastIcons := this.iconsToShow.Clone()
Expand Down

0 comments on commit dd6ce83

Please sign in to comment.