Skip to content

Commit a3e323e

Browse files
committed
fix sell-buy lists and scrollbars pt3
1 parent 228d8ba commit a3e323e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

data/styles/30-npctrader.otui

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ NpcWindow < MiniWindow
1313
margin-right: 3
1414
margin-top: 0
1515

16+
$on:
17+
visible: false
18+
1619
Label
1720
font: verdana-11px-monochrome
1821
anchors.left: parent.left
@@ -116,9 +119,6 @@ NpcWindow < MiniWindow
116119
margin-top: 0
117120
pixels-scroll: true
118121

119-
$!on:
120-
width: 0
121-
122122
TextList
123123
id: contentsPanel
124124
anchors.top: headPanel.bottom
@@ -142,6 +142,9 @@ NpcWindow < MiniWindow
142142
margin-right: 3
143143
margin-bottom: 3
144144

145+
$on:
146+
visible: false
147+
145148
TextEdit
146149
id: searchText
147150
size: 164 20

modules/game_npctrade/npctrade.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ function init()
206206
local children = self:getChildren()
207207
for _, child in ipairs(children) do
208208
local className = child:getClassName()
209-
if className == 'FlatPanel' or className == 'UIScrollArea' or className == 'VerticalScrollBar' then
210-
if child:isVisible() and child:getId() ~= 'miniwindowHeader' and child:getId() ~= 'miniwindowHeaderBorder' then
209+
local childId = child:getId()
210+
if className == 'FlatPanel' or className == 'UIScrollArea' or className == 'VerticalScrollBar' or className == 'UITextList' then
211+
if child:isVisible() and childId ~= 'miniwindowHeader' and childId ~= 'miniwindowHeaderBorder' then
211212
table.insert(elementsToHide, child)
212213
child:setVisible(false)
213214
child:hide()

0 commit comments

Comments
 (0)