Hello I have a problem with implementing scrollbar
It show itself but scrolling is not working.
shop.lua:
shop.otui:
and premium.otui:
It show itself but scrolling is not working.
shop.lua:
Code:
function init()
shopWindow = g_ui.displayUI('shop')
shopWindow:hide()
shopTabBar = shopWindow:getChildById('shopTabBar')
shopTabBar:setContentWidget(shopWindow:getChildById('shopTabContent'))
premiumPanel = g_ui.loadUI('premium')
shopTabBar:addTab(tr('Premium'), premiumPanel, '/modules/game_shop/images/shoptabs/premium')
end
shop.otui:
Code:
MainWindow
id: shopWindow
!text: tr('Shop')
size: 550 340
@onEnter: modules.game_shop.hide()
@onEscape: modules.game_shop.hide()
TabBarVertical
id: shopTabBar
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: closeButton.top
ScrollablePanel
id: shopTabContent
anchors.top: shopTabBar.top
anchors.left: shopTabBar.right
anchors.right: questListScrollBar.left
anchors.bottom: closeButton.top
vertical-scrollbar: questListScrollBar
margin-bottom: 10
focusable: false
VerticalScrollBar
id: questListScrollBar
anchors.top: parent.top
anchors.bottom: closeButton.top
anchors.right: parent.right
margin-bottom: 10
step: 14
pixels-scroll: true
and premium.otui:
Code:
AddonButton < UIButton
width: 400
height: 64
margin-left: 7
Panel
AddonButton
id: box1
image-source: /modules/game_shop/images/buttonimg/test
anchors.top: parent.top
anchors.left: parent.left
@onClick: modules.game_shop.buyAssassin()
AddonButton
id: box2
image-source: /modules/game_shop/images/buttonimg/test
anchors.top: box1.bottom
anchors.left: parent.left
@onClick: modules.game_shop.buyBarbarian()
AddonButton
id: box3
image-source: /modules/game_shop/images/buttonimg/test
anchors.top: box2.bottom
anchors.left: parent.left
@onClick: modules.game_shop.buyBeggar()
AddonButton
id: box4
image-source: /modules/game_shop/images/buttonimg/test
anchors.top: box3.bottom
anchors.left: parent.left
@onClick: modules.game_shop.buyNorseman()
AddonButton
id: box5
image-source: /modules/game_shop/images/buttonimg/test
anchors.top: box4.bottom
anchors.left: parent.left
@onClick: modules.game_shop.buyPirate()
AddonButton
id: box6
image-source: /modules/game_shop/images/buttonimg/test
anchors.top: box5.bottom
anchors.left: parent.left
@onClick: modules.game_shop.buyPirate()