Skip to content

Commit

Permalink
v4.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
r-e-d committed Jul 20, 2021
1 parent 55761fb commit 97c87da
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 26 deletions.
2 changes: 1 addition & 1 deletion LeUI-SoD/LeUI-SoD.tp2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BACKUP ~LeUI-SoD/backup~
AUTHOR ~lefreut~
VERSION ~4.4.1~
VERSION ~4.4.2~
LANGUAGE
~English~ ~en_US~ ~LeUI-SoD/lang/en_US/setup.tra~

Expand Down
56 changes: 32 additions & 24 deletions LeUI-SoD/copy/UI.menu
Original file line number Diff line number Diff line change
Expand Up @@ -1346,9 +1346,9 @@ function compareCustomSound(s1, s2)
elseif (s2.sound == "DEFAULT" and s1.sound ~= "DEFAULT") then
return false
elseif (string.sub(s1.sound, 1, 4) == "BDTP" and string.sub(s2.sound, 1, 4) ~= "BDTP") then
return false
return false;
elseif (string.sub(s2.sound, 1, 4) == "BDTP" and string.sub(s1.sound, 1, 4) ~= "BDTP") then
return true
return true;
end
return s1.sound < s2.sound
end
Expand Down Expand Up @@ -4198,6 +4198,7 @@ function itemDescLeftButtonAction()
if(itemDesc.item.identified == 0) then
Infinity_OnSpellIdentify(itemDesc.id)
itemDesc.item = characters[id].equipment[selectedSlot].item --update itemDesc item
computeSplitPosition(itemDesc.item.description, 'itemDescriptionSplit')
else
Infinity_PushMenu('ITEM_ABILITIES',0,0)
end
Expand Down Expand Up @@ -4226,6 +4227,7 @@ function itemDescRightButtonAction()
if(itemDesc.item.identified == 0) then
Infinity_OnScrollIdentify(itemDesc.id)
itemDesc.item = characters[id].equipment[selectedSlot].item --update itemDesc item
computeSplitPosition(itemDesc.item.description, 'itemDescriptionSplit')
else
Infinity_PopMenu()
Infinity_OnUseButtonClick(itemDesc.id, itemDesc.useMode)
Expand All @@ -4243,6 +4245,7 @@ function computeSplitPosition(str, name)
elseif firstChar == 195 then startPos = 3 end
splitPos = startPos
curPos = startPos
local newLine = false
while splitPos ~= -1 do
local b = str:byte(curPos)
if b == nil then
Expand All @@ -4253,7 +4256,10 @@ function computeSplitPosition(str, name)
curPos = curPos + 2
elseif b >= 194 then
curPos = curPos + 1
elseif b == 10 or b == 32 then
elseif b == 10 then
splitPos = curPos
newLine = true
elseif b == 32 and not newLine then
splitPos = curPos
end
Infinity_ScaleToText(name)
Expand All @@ -4270,7 +4276,7 @@ menu
modal
onOpen
"
-- Infinity_PlaySound('GAM_03')
Infinity_PlaySound('GAM_03')
computeSplitPosition(itemDesc.item.description, 'itemDescriptionSplit')
"
onClose
Expand Down Expand Up @@ -4310,7 +4316,7 @@ menu
{
name "itemDescriptionSplit"
enabled "false"
area 0 0 380 -1
area 44 0 370 -1
text lua "itemDesc.item.description:sub(startPos, curPos)"
text style "parchment"
scrollbar 'GUISBR'
Expand All @@ -4330,14 +4336,15 @@ menu
label
{
enabled "rowNumber == 1"
area 44 0 386 -1
area 44 0 370 -1
text lua "itemDesc.item.description:sub(startPos, splitPos - 1)"
text style "parchment"
}
label
{
enabled "rowNumber == 2"
area 0 0 430 -1
area 0 0 -1 -1
pad 0 0 16 0
text lua "itemDesc.item.description:sub(splitPos + 1)"
text style "parchment"
}
Expand Down Expand Up @@ -4392,7 +4399,6 @@ menu
area 327 638 201 44
text "DONE_BUTTON"
text style "button"
sound ""
action
"
Infinity_PopMenu()
Expand Down Expand Up @@ -8771,7 +8777,7 @@ menu
{
name "spellDescriptionSplit"
enabled "false"
area 0 0 665 -1
area 44 0 655 -1
text lua "Infinity_FetchString(currentSpell.description):sub(startPos, curPos)"
text style "parchment"
scrollbar 'GUISBR'
Expand All @@ -8791,14 +8797,15 @@ menu
label
{
enabled "rowNumber == 1"
area 44 0 671 -1
area 44 0 655 -1
text lua "Infinity_FetchString(currentSpell.description):sub(startPos, splitPos - 1)"
text style "parchment"
}
label
{
enabled "rowNumber == 2"
area 0 0 715 -1
area 0 0 -1 -1
pad 0 0 16 0
text lua "Infinity_FetchString(currentSpell.description):sub(splitPos + 1)"
text style "parchment"
}
Expand All @@ -8825,7 +8832,6 @@ menu
bam GUIOSTUM
text "DONE_BUTTON"
text style "button"
sound ""
action "Infinity_PopMenu('SPELL_DESCRIPTION')"
}
button
Expand Down Expand Up @@ -9055,7 +9061,7 @@ menu
{
name "popupDetailsSplit"
enabled "false"
area 0 0 665 -1
area 44 0 655 -1
text lua "Infinity_FetchString(PopupDetails.description):sub(startPos, curPos)"
text style "parchment"
scrollbar 'GUISBR'
Expand All @@ -9075,14 +9081,15 @@ menu
label
{
enabled "rowNumber == 1"
area 44 0 671 -1
area 44 0 655 -1
text lua "Infinity_FetchString(PopupDetails.description):sub(startPos, splitPos - 1)"
text style "parchment"
}
label
{
enabled "rowNumber == 2"
area 0 0 715 -1
area 0 0 -1 -1
pad 0 0 16 0
text lua "Infinity_FetchString(PopupDetails.description):sub(splitPos + 1)"
text style "parchment"
}
Expand All @@ -9109,7 +9116,6 @@ menu
text "DONE_BUTTON"
text style "button"
on escape
sound ""
action
"
Infinity_PopMenu('POPUP_DETAILS')
Expand Down Expand Up @@ -10473,7 +10479,7 @@ menu
{
name "chapterSplit"
enabled "false"
area 0 0 782 -1
area 44 0 772 -1
text lua "text_CHAPTERSCROLL:sub(startPos, curPos)"
text style normal
scrollbar 'GUISCRC'
Expand All @@ -10495,15 +10501,16 @@ menu
{
enabled "rowNumber == 1"
opacity lua "textOpacity"
area 44 0 788 -1
area 44 0 772 -1
text lua "text_CHAPTERSCROLL:sub(startPos, splitPos - 1)"
text style normal
}
label
{
enabled "rowNumber == 2"
opacity lua "textOpacity"
area 0 0 832 -1
area 0 0 -1 -1
pad 0 0 16 0
text lua "text_CHAPTERSCROLL:sub(splitPos + 1)"
text style normal
}
Expand Down Expand Up @@ -10591,7 +10598,7 @@ menu
{
name "epilogueSplit"
enabled "false"
area 0 0 442 -1
area 44 0 432 -1
text lua "text_CHAPTERSCROLL:sub(startPos, curPos)"
text style normal
scrollbar 'GUISCRC'
Expand All @@ -10613,15 +10620,16 @@ menu
{
enabled "rowNumber == 1"
opacity lua "textOpacity"
area 44 0 448 -1
area 44 0 432 -1
text lua "text_CHAPTERSCROLL:sub(startPos, splitPos - 1)"
text style normal
}
label
{
enabled "rowNumber == 2"
opacity lua "textOpacity"
area 0 0 492 -1
area 0 0 -1 -1
pad 0 0 16 0
text lua "text_CHAPTERSCROLL:sub(splitPos + 1)"
text style normal
}
Expand Down Expand Up @@ -14139,14 +14147,14 @@ menu
{
enabled "rowNumber == 1"
opacity lua "step == 1 and 0 or 255"
area 0 0 752 -1
area 0 0 736 -1
text lua "getDialogText(1)"
text style "normal"
}
text
{
enabled "rowNumber == 2"
area 0 0 752 -1
area 0 0 736 -1
pad 0 0 0 12
text lua "getDialogText(2)"
text style "normal"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The goal of this mod is to provide an unified and improved UI for Baldur's Gate

## Compatibility

For EE version 2.6, use the v4.4.1 version of this mod.
For EE version 2.6, use the v4.4.2 version of this mod.

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

Expand Down

0 comments on commit 97c87da

Please sign in to comment.