Skip to content

Commit

Permalink
v1.53.0 (Hotfix 2) merge
Browse files Browse the repository at this point in the history
hotfix 2: fixed doubled text in segmented notepad widgets & color-coding issue with colons
  • Loading branch information
Lailloken authored Apr 24, 2024
2 parents fd573e5 + e007f32 commit a78fa36
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions data/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[
["1.53.0", 15300],
"hotfix 1: t17 drop-multipliers showed blank instead of 0 when shift-clicking currency",
"hotfix 2: fixed doubled text in segmented notepad widgets",
"item-info: updated unique drop-tier data (poeladder.com)",
"map-info: partially redesigned",
"map-info: added support for t17 drop-multipliers",
Expand Down
2 changes: 1 addition & 1 deletion data/versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_release": [15300, "https://github.com/Lailloken/Lailloken-UI/archive/refs/heads/main.zip"],
"hotfix": 1
"hotfix": 2
}
15 changes: 9 additions & 6 deletions modules/qol tools.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ NotepadWidget(tab, mode := 0, color := 0)
Else If !A_Gui && !longpress && !color
Return

If InStr(vars.notepad.entries[tab], "`n#`n") && InStr(A_Gui, "notepad")
If InStr(vars.notepad.entries[tab], "`n#`n") && (InStr(A_Gui, "notepad") || color)
{
vars.notepad_widgets[tab] := {"text": [], "page": (vars.notepad_widgets[tab].page ? vars.notepad_widgets[tab].page : "1"), "x": vars.notepad_widgets[tab].x, "y": vars.notepad_widgets[tab].y}
Loop, Parse, % StrReplace(vars.notepad.entries[tab], "`n#`n", "¢"), % "¢", % "`r`n"
Expand Down Expand Up @@ -818,7 +818,7 @@ NotepadWidget(tab, mode := 0, color := 0)
If IsObject(vars.notepad_widgets[tab].text)
{
page := vars.notepad_widgets[tab].page, pages := vars.notepad_widgets[tab].text.Count(), multi := 1
Gui, %GUI_name%: Add, Text, % "Section", % StrReplace(tab, "&", "&&") " (" page "/" pages "):`n" StrReplace(vars.notepad_widgets[tab].text[page], "&", "&&")
Gui, %GUI_name%: Add, Text, % "Section", % StrReplace(tab, "&", "&&") " (" page "/" pages "):" ;StrReplace(vars.notepad_widgets[tab].text[page], "&", "&&")
}

If (tab = "notepad_reminder_feature")
Expand All @@ -827,8 +827,9 @@ NotepadWidget(tab, mode := 0, color := 0)
{
Loop, Parse, % multi ? StrReplace(vars.notepad_widgets[tab].text[page], "&", "&&") : StrReplace(vars.notepad.entries[tab], "&", "&&"), `n
{
segment := "", style := "xs Section y+0", color := "", colon := ""
style := "xs Section y+0", segment := color := colon := rgb := ""
If InStr(A_LoopField, "§",, 2) && (SubStr(A_LoopField, InStr(A_LoopField, "§") + 7, 2) = ": ")
{
Loop, Parse, A_LoopField
{
continue := 0
Expand All @@ -839,26 +840,28 @@ NotepadWidget(tab, mode := 0, color := 0)
Gui, %GUI_name%: Add, Text, % style, % segment
style := "ys x+0"
}
color := "start", segment := "", continue := 1
color := "start", segment := "", continue := rgb := 1
}
Else If (A_LoopField = "§")
{
Gui, %GUI_name%: Add, Text, % style " c" color, % segment
style := "ys x+0", color := "", segment := "", colon := "", continue := 1
style := "ys x+0", color := segment := colon := rgb := "", continue := 1
}
Else If (color = "start") || !Blank(color) && (StrLen(color) < 6)
color := (color = "start") ? A_LoopField : color . A_LoopField, continue := 1
Else If !colon && (A_LoopField = ":")
Else If !colon && rgb && (A_LoopField = ":")
colon := A_Index
If continue || colon && LLK_IsBetween(A_Index, colon, colon + 1)
Continue
segment .= A_LoopField
}
}
Else segment := A_LoopField
If !Blank(segment)
Gui, %GUI_name%: Add, Text, % style, % segment
}
}

Gui, %GUI_name%: Show, NA x10000 y10000
WinGetPos,,, w, h, ahk_id %widget%
While longpress && (InStr(A_Gui, "notepad") || mode = 1) && GetKeyState("LButton", "P")
Expand Down

0 comments on commit a78fa36

Please sign in to comment.