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

OTClient center skillbuton

i dont know how to do it but im pretty sure you have to check you client top_menu folder and edit the otui file play with values left right centre etc... ;) good luck
 

i dont know how to do it but im pretty sure you have to check you client top_menu folder and edit the otui file play with values left right centre etc... ;) good luck

He is right, not with "play with" but setting the aligment / anchor to center will fix it.
Did you test it, or did you just bump the thread?
 
He is right, not with "play with" but setting the aligment / anchor to center will fix it.
Did you test it, or did you just bump the thread?
i dont know what you mean.
i want remove it from left panel and like spell have it on centered
i arleady try copy paste outui from spellslist but it doesnt work
 
i dont know what you mean.
i want remove it from left panel and like spell have it on centered
i arleady try copy paste outui from spellslist but it doesnt work

What?
You need to center it, like this;
Lua:
anchors.center: parent.center

I think thats correct ..
 
What?
You need to center it, like this;
Lua:
anchors.center: parent.center

I think thats correct ..
Code:
ERROR: failed to apply style to widget 'skillWindow': OTML error in '/game_skills/skills.otui:35': cannot create anchor, the parent widget doesn't use anchor layout!
stack traceback:
    [C]: in function 'loadUI'
    /game_skills/skills.lua:30: in function 'init'
    /game_skills/skills.otmod:8:[@onLoad]:1: in main chunk
    [C]: in function 'ensureModuleLoaded'
    /init.lua:46: in main chunk
at:
    [C++]: ?applyStyle@UIWidget@@QAEXABV?$shared_object_ptr@VOTMLNode@@@stdext@@@Z

skills.otui
Code:
SkillFirstWidget < UIWidget

SkillButton < UIButton
  height: 21
  margin-bottom: 2
  &onClick: onSkillButtonClick

SkillNameLabel < GameLabel
  font: verdana-11px-monochrome
  anchors.left: parent.left
  anchors.top: parent.top
  anchors.bottom: parent.bottom

SkillValueLabel < GameLabel
  id: value
  font: verdana-11px-monochrome
  text-align: topright
  anchors.right: parent.right
  anchors.top: parent.top
  anchors.bottom: parent.bottom
  anchors.left: prev.left

SkillPercentPanel < ProgressBar
  id: percent
  background-color: green
  height: 5
  margin-top: 15
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: parent.top
  phantom: false

MiniWindow
  id: skillWindow
  anchors.center: parent.center
  !text: tr('Skills')
  height: 150
  icon: /images/topbuttons/skills
  @onClose: modules.game_skills.onMiniWindowClose()
  &save: true

  MiniWindowContents
    padding-left: 5
    padding-right: 5
    layout: verticalBox

    SkillButton
      margin-top: 5
      id: experience
      height: 15
      SkillNameLabel
        !text: tr('Experience')
      SkillValueLabel

    SkillButton
      id: level
      SkillNameLabel
        !text: tr('Level')
      SkillValueLabel
      SkillPercentPanel
        background-color: red

    SkillButton
      id: health
      height: 15
      SkillNameLabel
        !text: tr('Hit Points')
      SkillValueLabel

    SkillButton
      id: mana
      height: 15
      SkillNameLabel
        !text: tr('Mana')
      SkillValueLabel

    SkillButton
      id: soul
      height: 15
      SkillNameLabel
        !text: tr('Soul Points')
      SkillValueLabel

    SkillButton
      id: capacity
      height: 15
      SkillNameLabel
        !text: tr('Capacity')
      SkillValueLabel

    SkillButton
      id: speed
      height: 15
      SkillNameLabel
        !text: tr('Speed')
      SkillValueLabel

    SkillButton
      id: regenerationTime
      SkillNameLabel
        !text: tr('Regeneration Time')
      SkillValueLabel

    SkillButton
      id: stamina
      SkillNameLabel
        !text: tr('Stamina')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: offlineTraining
      SkillNameLabel
        !text: tr('Offline Training')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: magiclevel
      SkillNameLabel
        !text: tr('Magic Level')
      SkillValueLabel
      SkillPercentPanel
        background-color: red

    SkillButton
      id: skillId0
      SkillNameLabel
        !text: tr('Fist Fighting')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId1
      SkillNameLabel
        !text: tr('Club Fighting')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId2
      SkillNameLabel
        !text: tr('Sword Fighting')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId3
      SkillNameLabel
        !text: tr('Axe Fighting')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId4
      SkillNameLabel
        !text: tr('Distance Fighting')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId5
      SkillNameLabel
        !text: tr('Shielding')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId6
      SkillNameLabel
        !text: tr('Fishing')
      SkillValueLabel
      SkillPercentPanel
 
Code:
ERROR: failed to apply style to widget 'skillWindow': OTML error in '/game_skills/skills.otui:35': cannot create anchor, the parent widget doesn't use anchor layout!
stack traceback:
    [C]: in function 'loadUI'
    /game_skills/skills.lua:30: in function 'init'
    /game_skills/skills.otmod:8:[@onLoad]:1: in main chunk
    [C]: in function 'ensureModuleLoaded'
    /init.lua:46: in main chunk
at:
    [C++]: ?applyStyle@UIWidget@@QAEXABV?$shared_object_ptr@VOTMLNode@@@stdext@@@Z

skills.otui
Code:
SkillFirstWidget < UIWidget

SkillButton < UIButton
  height: 21
  margin-bottom: 2
  &onClick: onSkillButtonClick

SkillNameLabel < GameLabel
  font: verdana-11px-monochrome
  anchors.left: parent.left
  anchors.top: parent.top
  anchors.bottom: parent.bottom

SkillValueLabel < GameLabel
  id: value
  font: verdana-11px-monochrome
  text-align: topright
  anchors.right: parent.right
  anchors.top: parent.top
  anchors.bottom: parent.bottom
  anchors.left: prev.left

SkillPercentPanel < ProgressBar
  id: percent
  background-color: green
  height: 5
  margin-top: 15
  anchors.left: parent.left
  anchors.right: parent.right
  anchors.top: parent.top
  phantom: false

MiniWindow
  id: skillWindow
  anchors.center: parent.center
  !text: tr('Skills')
  height: 150
  icon: /images/topbuttons/skills
  @onClose: modules.game_skills.onMiniWindowClose()
  &save: true

  MiniWindowContents
    padding-left: 5
    padding-right: 5
    layout: verticalBox

    SkillButton
      margin-top: 5
      id: experience
      height: 15
      SkillNameLabel
        !text: tr('Experience')
      SkillValueLabel

    SkillButton
      id: level
      SkillNameLabel
        !text: tr('Level')
      SkillValueLabel
      SkillPercentPanel
        background-color: red

    SkillButton
      id: health
      height: 15
      SkillNameLabel
        !text: tr('Hit Points')
      SkillValueLabel

    SkillButton
      id: mana
      height: 15
      SkillNameLabel
        !text: tr('Mana')
      SkillValueLabel

    SkillButton
      id: soul
      height: 15
      SkillNameLabel
        !text: tr('Soul Points')
      SkillValueLabel

    SkillButton
      id: capacity
      height: 15
      SkillNameLabel
        !text: tr('Capacity')
      SkillValueLabel

    SkillButton
      id: speed
      height: 15
      SkillNameLabel
        !text: tr('Speed')
      SkillValueLabel

    SkillButton
      id: regenerationTime
      SkillNameLabel
        !text: tr('Regeneration Time')
      SkillValueLabel

    SkillButton
      id: stamina
      SkillNameLabel
        !text: tr('Stamina')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: offlineTraining
      SkillNameLabel
        !text: tr('Offline Training')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: magiclevel
      SkillNameLabel
        !text: tr('Magic Level')
      SkillValueLabel
      SkillPercentPanel
        background-color: red

    SkillButton
      id: skillId0
      SkillNameLabel
        !text: tr('Fist Fighting')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId1
      SkillNameLabel
        !text: tr('Club Fighting')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId2
      SkillNameLabel
        !text: tr('Sword Fighting')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId3
      SkillNameLabel
        !text: tr('Axe Fighting')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId4
      SkillNameLabel
        !text: tr('Distance Fighting')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId5
      SkillNameLabel
        !text: tr('Shielding')
      SkillValueLabel
      SkillPercentPanel

    SkillButton
      id: skillId6
      SkillNameLabel
        !text: tr('Fishing')
      SkillValueLabel
      SkillPercentPanel

Humm, try this;
Lua:
anchors.horizontalCenter: parent.horizontalCenter
 
He wants it, probably, as MainWindow displayed on the center of the screen, like Options etc, instead of MiniWindow displayed on Left/RightPanel.
 
Back
Top