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

Commit

Permalink
adjustable buff bar size
Browse files Browse the repository at this point in the history
  • Loading branch information
joffreybesos committed May 30, 2022
1 parent f9da609 commit cd08dfe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/d2r-map.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,8 @@ Update:
itemLogLayer := new ItemLogLayer(settings)
itemCounterLayer.delete()
itemCounterLayer := new ItemCounterLayer(settings)
buffBarLayer.delete()
buffBarLayer := new BuffBarLayer(settings)
SetupHotKeys(gameWindowId, settings)
if (cmode != settings["centerMode"]) { ; if centermode changed
lastlevel := "INVALIDATED"
Expand Down
2 changes: 1 addition & 1 deletion src/init/readSettings.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ readSettings(settingsFile, ByRef settings) {
settings["showItemStats"] := 0
settings["includeVendorItems"] := 1
settings["buffBarEnabled"] := 1
settings["buffBarIconSize"] := 70
settings["buffBarIconSize"] := 75

settings["allowTextToSpeech"] := 1
settings["textToSpeechVolume"] := 50
Expand Down
10 changes: 5 additions & 5 deletions src/ui/gdip/BuffBarLayer.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class BuffBarLayer {

Gui, BuffBar: -Caption +E0x20 +E0x80000 +E0x00080000 +LastFound +AlwaysOnTop +ToolWindow +OwnDialogs
this.buffBarLayerHwnd := WinExist()
this.imageSize := 90 ;settings["BuffBarSize"]
this.imageSize := settings["buffBarIconSize"]
this.textBoxWidth := this.imageSize * 15 ; 10 icons wide max
this.textBoxHeight := this.imageSize

Expand All @@ -39,10 +39,10 @@ class BuffBarLayer {
}

drawBuffBar(ByRef currentStates, ByRef buffBitmaps) {
; if (!settings["buffBarEnabled"]) {
; this.hide()
; return
; }
if (!settings["buffBarEnabled"]) {
this.hide()
return
}
if (readUI(d2rprocess)) {
this.hide()
return
Expand Down

0 comments on commit cd08dfe

Please sign in to comment.