From 97c87da0f8a2f3b07e0fa9a78fcc04bc2f54f9e8 Mon Sep 17 00:00:00 2001 From: Renaud Durlin Date: Tue, 20 Jul 2021 10:50:35 +0200 Subject: [PATCH] v4.4.2 --- LeUI-SoD/LeUI-SoD.tp2 | 2 +- LeUI-SoD/copy/UI.menu | 56 ++++++++++++++++++++++++------------------- README.md | 2 +- 3 files changed, 34 insertions(+), 26 deletions(-) diff --git a/LeUI-SoD/LeUI-SoD.tp2 b/LeUI-SoD/LeUI-SoD.tp2 index e1c9c30..6761d4c 100644 --- a/LeUI-SoD/LeUI-SoD.tp2 +++ b/LeUI-SoD/LeUI-SoD.tp2 @@ -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~ diff --git a/LeUI-SoD/copy/UI.menu b/LeUI-SoD/copy/UI.menu index 4cfc19e..6c436c7 100644 --- a/LeUI-SoD/copy/UI.menu +++ b/LeUI-SoD/copy/UI.menu @@ -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 @@ -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 @@ -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) @@ -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 @@ -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) @@ -4270,7 +4276,7 @@ menu modal onOpen " - -- Infinity_PlaySound('GAM_03') + Infinity_PlaySound('GAM_03') computeSplitPosition(itemDesc.item.description, 'itemDescriptionSplit') " onClose @@ -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' @@ -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" } @@ -4392,7 +4399,6 @@ menu area 327 638 201 44 text "DONE_BUTTON" text style "button" - sound "" action " Infinity_PopMenu() @@ -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' @@ -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" } @@ -8825,7 +8832,6 @@ menu bam GUIOSTUM text "DONE_BUTTON" text style "button" - sound "" action "Infinity_PopMenu('SPELL_DESCRIPTION')" } button @@ -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' @@ -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" } @@ -9109,7 +9116,6 @@ menu text "DONE_BUTTON" text style "button" on escape - sound "" action " Infinity_PopMenu('POPUP_DETAILS') @@ -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' @@ -10495,7 +10501,7 @@ 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 } @@ -10503,7 +10509,8 @@ menu { 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 } @@ -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' @@ -10613,7 +10620,7 @@ 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 } @@ -10621,7 +10628,8 @@ menu { 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 } @@ -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" diff --git a/README.md b/README.md index 649b4df..00fb013 100644 --- a/README.md +++ b/README.md @@ -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.