Skip to content

Commit 0e3f1c8

Browse files
committed
v4.4.2
1 parent 70cde4d commit 0e3f1c8

File tree

3 files changed

+32
-24
lines changed

3 files changed

+32
-24
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.1~
3+
VERSION ~4.4.2~
44
LANGUAGE
55
~English~ ~en_US~ ~LeUI/lang/en_US/setup.tra~
66

LeUI/copy/UI.menu

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4200,6 +4200,7 @@ function itemDescLeftButtonAction()
42004200
if(itemDesc.item.identified == 0) then
42014201
Infinity_OnSpellIdentify(itemDesc.id)
42024202
itemDesc.item = characters[id].equipment[selectedSlot].item --update itemDesc item
4203+
computeSplitPosition(itemDesc.item.description, 'itemDescriptionSplit')
42034204
else
42044205
Infinity_PushMenu('ITEM_ABILITIES',0,0)
42054206
end
@@ -4228,6 +4229,7 @@ function itemDescRightButtonAction()
42284229
if(itemDesc.item.identified == 0) then
42294230
Infinity_OnScrollIdentify(itemDesc.id)
42304231
itemDesc.item = characters[id].equipment[selectedSlot].item --update itemDesc item
4232+
computeSplitPosition(itemDesc.item.description, 'itemDescriptionSplit')
42314233
else
42324234
Infinity_PopMenu()
42334235
Infinity_OnUseButtonClick(itemDesc.id, itemDesc.useMode)
@@ -4245,6 +4247,7 @@ function computeSplitPosition(str, name)
42454247
elseif firstChar == 195 then startPos = 3 end
42464248
splitPos = startPos
42474249
curPos = startPos
4250+
local newLine = false
42484251
while splitPos ~= -1 do
42494252
local b = str:byte(curPos)
42504253
if b == nil then
@@ -4255,7 +4258,10 @@ function computeSplitPosition(str, name)
42554258
curPos = curPos + 2
42564259
elseif b >= 194 then
42574260
curPos = curPos + 1
4258-
elseif b == 10 or b == 32 then
4261+
elseif b == 10 then
4262+
splitPos = curPos
4263+
newLine = true
4264+
elseif b == 32 and not newLine then
42594265
splitPos = curPos
42604266
end
42614267
Infinity_ScaleToText(name)
@@ -4272,7 +4278,7 @@ menu
42724278
modal
42734279
onOpen
42744280
"
4275-
-- Infinity_PlaySound('GAM_03')
4281+
Infinity_PlaySound('GAM_03')
42764282
computeSplitPosition(itemDesc.item.description, 'itemDescriptionSplit')
42774283
"
42784284
onClose
@@ -4307,7 +4313,7 @@ menu
43074313
{
43084314
name "itemDescriptionSplit"
43094315
enabled "false"
4310-
area 0 0 380 -1
4316+
area 44 0 370 -1
43114317
text lua "itemDesc.item.description:sub(startPos, curPos)"
43124318
text style "parchment"
43134319
scrollbar 'GUISBR'
@@ -4327,14 +4333,15 @@ menu
43274333
label
43284334
{
43294335
enabled "rowNumber == 1"
4330-
area 44 0 386 -1
4336+
area 44 0 370 -1
43314337
text lua "itemDesc.item.description:sub(startPos, splitPos - 1)"
43324338
text style "parchment"
43334339
}
43344340
label
43354341
{
43364342
enabled "rowNumber == 2"
4337-
area 0 0 430 -1
4343+
area 0 0 -1 -1
4344+
pad 0 0 16 0
43384345
text lua "itemDesc.item.description:sub(splitPos + 1)"
43394346
text style "parchment"
43404347
}
@@ -4389,7 +4396,6 @@ menu
43894396
area 327 638 201 44
43904397
text "DONE_BUTTON"
43914398
text style "button"
4392-
sound ""
43934399
action
43944400
"
43954401
Infinity_PopMenu()
@@ -8781,7 +8787,7 @@ menu
87818787
{
87828788
name "spellDescriptionSplit"
87838789
enabled "false"
8784-
area 0 0 665 -1
8790+
area 44 0 655 -1
87858791
text lua "Infinity_FetchString(currentSpell.description):sub(startPos, curPos)"
87868792
text style "parchment"
87878793
scrollbar 'GUISBR'
@@ -8801,14 +8807,15 @@ menu
88018807
label
88028808
{
88038809
enabled "rowNumber == 1"
8804-
area 44 0 671 -1
8810+
area 44 0 655 -1
88058811
text lua "Infinity_FetchString(currentSpell.description):sub(startPos, splitPos - 1)"
88068812
text style "parchment"
88078813
}
88088814
label
88098815
{
88108816
enabled "rowNumber == 2"
8811-
area 0 0 715 -1
8817+
area 0 0 -1 -1
8818+
pad 0 0 16 0
88128819
text lua "Infinity_FetchString(currentSpell.description):sub(splitPos + 1)"
88138820
text style "parchment"
88148821
}
@@ -8835,7 +8842,6 @@ menu
88358842
bam GUIOSTUM
88368843
text "DONE_BUTTON"
88378844
text style "button"
8838-
sound ""
88398845
action "Infinity_PopMenu('SPELL_DESCRIPTION')"
88408846
}
88418847
button
@@ -9064,7 +9070,7 @@ menu
90649070
{
90659071
name "popupDetailsSplit"
90669072
enabled "false"
9067-
area 0 0 665 -1
9073+
area 44 0 655 -1
90689074
text lua "Infinity_FetchString(PopupDetails.description):sub(startPos, curPos)"
90699075
text style "parchment"
90709076
scrollbar 'GUISBR'
@@ -9084,14 +9090,15 @@ menu
90849090
label
90859091
{
90869092
enabled "rowNumber == 1"
9087-
area 44 0 671 -1
9093+
area 44 0 655 -1
90889094
text lua "Infinity_FetchString(PopupDetails.description):sub(startPos, splitPos - 1)"
90899095
text style "parchment"
90909096
}
90919097
label
90929098
{
90939099
enabled "rowNumber == 2"
9094-
area 0 0 715 -1
9100+
area 0 0 -1 -1
9101+
pad 0 0 16 0
90959102
text lua "Infinity_FetchString(PopupDetails.description):sub(splitPos + 1)"
90969103
text style "parchment"
90979104
}
@@ -9118,7 +9125,6 @@ menu
91189125
text "DONE_BUTTON"
91199126
text style "button"
91209127
on escape
9121-
sound ""
91229128
action
91239129
"
91249130
Infinity_PopMenu('POPUP_DETAILS')
@@ -10491,7 +10497,7 @@ menu
1049110497
{
1049210498
name "chapterSplit"
1049310499
enabled "false"
10494-
area 0 0 782 -1
10500+
area 44 0 772 -1
1049510501
text lua "text_CHAPTERSCROLL:sub(startPos, curPos)"
1049610502
text style normal
1049710503
scrollbar 'GUISCRC'
@@ -10513,15 +10519,16 @@ menu
1051310519
{
1051410520
enabled "rowNumber == 1"
1051510521
opacity lua "textOpacity"
10516-
area 44 0 788 -1
10522+
area 44 0 772 -1
1051710523
text lua "text_CHAPTERSCROLL:sub(startPos, splitPos - 1)"
1051810524
text style normal
1051910525
}
1052010526
label
1052110527
{
1052210528
enabled "rowNumber == 2"
1052310529
opacity lua "textOpacity"
10524-
area 0 0 832 -1
10530+
area 0 0 -1 -1
10531+
pad 0 0 16 0
1052510532
text lua "text_CHAPTERSCROLL:sub(splitPos + 1)"
1052610533
text style normal
1052710534
}
@@ -10609,7 +10616,7 @@ menu
1060910616
{
1061010617
name "epilogueSplit"
1061110618
enabled "false"
10612-
area 0 0 490 -1
10619+
area 44 0 480 -1
1061310620
text lua "text_CHAPTERSCROLL:sub(startPos, curPos)"
1061410621
text style normal
1061510622
scrollbar 'GUISCRC'
@@ -10631,15 +10638,16 @@ menu
1063110638
{
1063210639
enabled "rowNumber == 1"
1063310640
opacity lua "textOpacity"
10634-
area 44 0 496 -1
10641+
area 44 0 480 -1
1063510642
text lua "text_CHAPTERSCROLL:sub(startPos, splitPos - 1)"
1063610643
text style normal
1063710644
}
1063810645
label
1063910646
{
1064010647
enabled "rowNumber == 2"
1064110648
opacity lua "textOpacity"
10642-
area 0 0 540 -1
10649+
area 0 0 -1 -1
10650+
pad 0 0 16 0
1064310651
text lua "text_CHAPTERSCROLL:sub(splitPos + 1)"
1064410652
text style normal
1064510653
}
@@ -14157,14 +14165,14 @@ menu
1415714165
{
1415814166
enabled "rowNumber == 1"
1415914167
opacity lua "step == 1 and 0 or 255"
14160-
area 0 0 752 -1
14168+
area 0 0 736 -1
1416114169
text lua "getDialogText(1)"
1416214170
text style "normal"
1416314171
}
1416414172
text
1416514173
{
1416614174
enabled "rowNumber == 2"
14167-
area 0 0 752 -1
14175+
area 0 0 736 -1
1416814176
pad 0 0 0 12
1416914177
text lua "getDialogText(2)"
1417014178
text style "normal"

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.1 version of this mod.
7+
For EE version 2.6, use the v4.4.2 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)