Skip to content

Commit 6cb69c0

Browse files
committed
v4.5
1 parent ebc439d commit 6cb69c0

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

LeUI/LeUI.tp2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BACKUP ~LeUI/backup~
22
AUTHOR ~lefreut~
3-
VERSION ~4.4.6~
3+
VERSION ~4.5~
44
LANGUAGE
55
~English~ ~en_US~ ~LeUI/lang/en_US/setup.tra~
66

LeUI/copy/UI.menu

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13916,6 +13916,14 @@ function dragMessagesY(newY)
1391613916
setQuickLootOffset()
1391713917
chatboxScrollToBottom = 1
1391813918
end
13919+
13920+
function clean(str)
13921+
-- remove extra space in front of innate abilities
13922+
str = str:gsub('(%^%-: %^0x%x%x%x%x%x%x%x%x) ', '%1')
13923+
-- remove empty name
13924+
str = str:gsub('%^0x%x%x%x%x%x%x%x%x %^%-: ', '')
13925+
return str
13926+
end
1391913927
`
1392013928
menu
1392113929
{
@@ -13963,7 +13971,7 @@ menu
1396313971
label
1396413972
{
1396513973
area 0 0 816 -1
13966-
text lua "combatLog[rowNumber]"
13974+
text lua "clean(combatLog[rowNumber])"
1396713975
text style "normal"
1396813976
}
1396913977
}
@@ -14085,7 +14093,7 @@ function getDialogText(row)
1408514093
idx2 = idx2 - 1
1408614094
end
1408714095

14088-
return trim(row == 1 and worldMessageBoxText:sub(1, idx1) or worldMessageBoxText:sub(idx1 + 1))
14096+
return clean(trim(row == 1 and worldMessageBoxText:sub(1, idx1) or worldMessageBoxText:sub(idx1 + 1)))
1408914097
end
1409014098

1409114099
function B3Split(inputstr, sep)
@@ -16147,7 +16155,10 @@ function specialistFrame(num)
1614716155
return 0
1614816156
end
1614916157
function specialistOrSelectedFrame(num)
16150-
if chargen.choose_spell[rowNumber].enabled or chargen.choose_spell[rowNumber].known then
16158+
if chargen.choose_spell[rowNumber].known then
16159+
return 4
16160+
end
16161+
if chargen.choose_spell[rowNumber].enabled then
1615116162
return 2
1615216163
end
1615316164
return specialistFrame(num)
@@ -21692,25 +21703,23 @@ function createEntry(questId, objectiveId, entryId, previousObjectives, subGroup
2169221703
table.insert(subGroups[subGroup],entry)
2169321704
end
2169421705

21695-
--This code is different if we're sod or BG
2169621706
local lineCount = 1
2169721707
local fullStr = Infinity_FetchString(entryId)
2169821708
for line in string.gmatch(fullStr, "[^\r\n]+") do
2169921709
if(lineCount == 1) then
2170021710
--objective text is first line.
2170121711
objective.text = line
21702-
end
21703-
if(lineCount > 1) then
21712+
else
2170421713
--entry text is everything after first
2170521714
entry.text = entry.text .. line .. "\n"
2170621715
end
2170721716
lineCount = lineCount + 1
21717+
if(line:sub(-1) == ".") then break end
2170821718
end
2170921719
if(lineCount == 2) then
2171021720
--it looks like sometimes entries are just an unbroken paragraph
2171121721
--in this case the entry should get the paragraph and the objective gets nothing
21712-
--note lineCount == 2 is a bit misleading, there's only one line in this case.
21713-
entry.text = objective.text
21722+
entry.text = fullStr
2171421723
objective.text = Infinity_FetchString(quest.text)
2171521724
end
2171621725
objective.entries = {entry}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The goal of this mod is to provide an unified and improved UI for Baldur's Gate
44

55
## Compatibility
66

7-
For EE version 2.6, use the v4.4.6 version of this mod.
7+
For EE version 2.6, use the v4.5 version of this mod.
88

99
For EE version 2.5, use the v4.3.2 version of this mod.
1010

0 commit comments

Comments
 (0)