• 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!

Topmenu bugging all

katumblo

Member
Joined
Oct 20, 2010
Messages
60
Reaction score
7
I've been trying to solve this problem for about 5 hours and I finally decided to ask you for help...

If I put the "20-topmenu.otui" in "styles" this happens:


com top menu.png

*note that the panel items are on the right and organized, but there is a black band around it, on the lower arrow, note that the items are perfect



But if I remove the "20-topmenu.otui" from the "styles" folder it is correct, but it bugs all the icons and the items go to the left, and since I don't have the topmenu.otui inside the folder I can't adjust the position their
sem o top menu.png

Can someone please help me fix this?

Here is my 20-topmenu.otui

Diff:
TopButton < UIButton
  size: 26 26
  image-source: /images/ui/button_top
  image-clip: 0 0 26 26
  image-border: 3
  image-color: #ffffffff
  icon-color: #ffffffff
  icon-clip: 0 0 20 20
 
  $on:
    image-source: /images/ui/button_top_blink
    icon-clip: 0 20 20 20

  $hover !disabled:
    image-color: #ffffff99
    image-clip: 26 0 26 26

  $pressed:
    image-clip: 52 0 26 26
    icon-clip: 0 20 20 20

  $disabled:
    image-color: #ffffff44
    icon-color: #ffffff44

TopToggleButton < UIButton
  size: 20 20
  image-source: /images/ui/button_top
  image-clip: 0 0 26 26
  image-color: #ffffffff
  image-border: 3
  icon-clip: 0 0 20 20
  icon-color: #ffffffff
 
  $on:
    icon-clip: 0 20 20 20

  $hover !disabled:
    image-color: #ffffff99
    image-clip: 26 0 26 26

  $pressed:
    image-clip: 52 0 26 26
    icon-clip: 0 20 20 20

  $disabled:
    image-color: #ffffff44
    icon-color: #ffffff44
    
TopMenuButtonsPanel < Panel
  layout:
    type: horizontalBox
    spacing: 4
    fit-children: true
  padding: 6 4

TopMenuPanel < Panel
  height: 36
  image-source: /images/ui/panel_top
  image-repeated: false
  image-border: 3
  image-border-top: 0
  focusable: false

TopMenuFrameCounterLabel < Label
  font: verdana-11px-rounded
  color: white
  margin-top: 4
  margin-left: 5

TopMenuPingLabel < Label
  font: verdana-11px-rounded

TopMenu < TopMenuPanel
  id: topMenu
  width: 800
  anchors.horizontalCenter: parent.horizontalCenter
  anchors.top: parent.top
  &hideIngame: false
  &reverseButtons: true

  UIWidget
    id: discord
    anchors.top: parent.top
    anchors.left: parent.left
    margin-top: 3
    margin-left: 5
    image-source: /images/ui/discord
    
  Label
    id: discordLabel
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    anchors.left: prev.right
    text-align: center
    margin-left: 2
    text-auto-resize: true

  TopMenuButtonsPanel
    id: rightButtonsPanel
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    anchors.left: prev.right

  TopMenuButtonsPanel
    id: rightGameButtonsPanel
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    anchors.left: prev.right
    visible: false

  Label
    id: onlineLabel
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    anchors.horizontalCenter: parent.horizontalCenter
    text-align: center
    text-auto-resize: true

  TopMenuButtonsPanel
    id: leftButtonsPanel
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    anchors.right: parent.right

  TopMenuButtonsPanel
    id: leftGameButtonsPanel
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    anchors.right: prev.left
    visible: false

**Bonus doubt

Does anyone know how I can leave these buttons up here as they look when I start my client in "mobile" mode?


duvida bonus.png
 
game_interface change:
Code:
UIWidget
  id: gameRootPanel
  anchors.fill: parent
  anchors.top: topMenu.bottom
To:
Code:
UIWidget
  id: gameRootPanel
  anchors.fill: parent
That should fix the issue.
 
Back
Top