• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Problem with scrollbar

zabka229

New Member
Joined
Dec 30, 2009
Messages
147
Reaction score
0
Hello I have a problem with implementing scrollbar :D
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()
 
Someone, something?
Or maybe there is some tutorial about otui styling?
 
Back
Top