ConditionBoxPopupMenu < ComboBoxPopupMenu
ConditionBoxPopupMenuButton < ComboBoxPopupMenuButton
ConditionBox < ComboBox
  @onSetup: |
    self:addOption("-")
    self:addOption("and")
    self:addOption("or")

PreButton < PreviousButton
  background: #363636
  height: 15

NexButton < NextButton
  background: #363636
  height: 15

CondidionLabel < FlatPanel
  padding: 1
  height: 15

  Label
    id: text
    anchors.fill: parent
    text-align: center
    font: verdana-11px-rounded
    background: #363636

Rule < UIWidget
  background-color: alpha
  text-offset: 18 2
  focusable: true
  height: 16
  text-align: left
  font: verdana-11px-rounded  

  CheckBox
    id: enabled
    anchors.left: parent.left
    anchors.verticalCenter: parent.verticalCenter
    width: 15
    height: 15
    margin-top: 2
    margin-left: 3
    tooltip: Entry enabled/disabled

  $focus:
    background-color: #00000055

  Button
    id: remove
    text: X
    anchors.right: parent.right
    margin-right: 15
    width: 14
    height: 14
    text-align: center
    tooltip: Remove entry
    anchors.verticalCenter: parent.verticalCenter

  Button
    id: visible
    text: V
    anchors.right: prev.left
    margin-right: 3
    width: 14
    height: 14
    text-align: center
    tooltip: Items must be visible
    anchors.verticalCenter: parent.verticalCenter


ConditionPanel < Panel
  height: 53

  NexButton
    id: nex
    anchors.top: parent.top
    margin-top: 5
    anchors.right: parent.right

  PreButton
    id: pre
    anchors.top: parent.top
    margin-top: 5
    anchors.left: parent.left

  CondidionLabel
    id: description
    anchors.top: parent.top
    margin-top: 5
    anchors.left: prev.right
    anchors.right: nex.left
    margin-left: 3
    margin-right: 3

  SpinBox
    id: spinbox
    anchors.top: description.bottom
    margin-top: 5
    anchors.horizontalCenter: parent.horizontalCenter
    width: 100
    text-align: center
    minimum: 0
    maximum: 100
    step: 1
    focusable: true

  BotTextEdit
    id: text
    anchors.top: description.bottom
    margin-top: 5
    anchors.horizontalCenter: parent.horizontalCenter
    width: 200
    text-align: center



ListPanel < FlatPanel
  size: 270 300
  padding-left: 10
  padding-right: 10
  padding-bottom: 10

  Label
    id: title
    anchors.verticalCenter: parent.top
    anchors.left: parent.left
    text: Rules List
    font: verdana-11px-rounded
    color: #FABD02

  Label
    id: mainLabel
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: parent.top
    margin-top: 10
    margin-left: 2
    !text: tr('More important methods come first.')
    text-align: left
    font: verdana-11px-rounded
    color: #aeaeae  

  TextList
    id: list
    anchors.fill: parent
    margin-top: 25
    margin-bottom: 18
    vertical-scrollbar: listScrollBar
    padding: 2

  VerticalScrollBar
    id: listScrollBar
    anchors.top: list.top
    anchors.bottom: list.bottom
    anchors.right: list.right
    step: 14
    pixels-scroll: true

  Button
    id: up
    anchors.right: parent.right
    anchors.top: list.bottom
    size: 60 17
    text: Move Up
    text-align: center
    font: cipsoftFont
    margin-top: 5

  Button
    id: down
    anchors.right: prev.left
    anchors.verticalCenter: prev.verticalCenter
    size: 60 17
    margin-right: 5
    text: Move Down
    text-align: center
    font: cipsoftFont



Unequip < Panel 
  height: 0
  padding: 5
  layout:
    type: verticalBox

  CheckBox
    text: Head Slot

  CheckBox
    text: Neck Slot

  CheckBox
    text: Torso Slot

  CheckBox
    text: Left Hand Slot
  
  CheckBox
    text: Right Hand Slot

  CheckBox
    text: Legs Slot
  
  CheckBox
    text: Finger Slot

  CheckBox
    text: Ammo Slot

  CheckBox
    text: Feet Slot



InputPanel < FlatPanel
  size: 270 300
  padding-left: 10
  padding-right: 10
  padding-bottom: 10

  Label
    id: title
    anchors.verticalCenter: parent.top
    anchors.left: parent.left
    text: Input Panel
    font: verdana-11px-rounded
    color: #FF0000

  Panel
    id: itemBox
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: parent.top
    margin-top: 10
    height: 80
    layout:
      type: grid
      cell-size: 34 34
      cell-spacing: 2
      num-columns: 7

  Button
    id: unequip
    anchors.top: prev.bottom
    anchors.left: parent.left
    text: Unequip
    height: 16
    width: 70

  Label
    id: mainLabel
    anchors.left: prev.right
    anchors.right: parent.right
    margin-top: 2
    anchors.verticalCenter: prev.verticalCenter
    margin-left: 2
    !text: tr('& Equip above item(s) when:')
    text-align: center
    font: verdana-11px-rounded
    color: #aeaeae

  Unequip
    id: unequipPanel
    anchors.top: prev.bottom
    anchors.left: parent.left
    anchors.right: parent.right

  HorizontalSeparator
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: prev.bottom
    margin-top: 4
    
  ConditionPanel
    id: condition
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: unequipPanel.bottom
    margin-top: 8

  HorizontalSeparator
    anchors.verticalCenter: next.verticalCenter
    anchors.left: parent.left
    anchors.right: parent.right

  ConditionBox
    id: useSecondCondition
    anchors.top: condition.bottom
    margin-top: 3
    anchors.horizontalCenter: parent.horizontalCenter
    width: 50

  ConditionPanel
    id: optionalCondition
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: prev.bottom
    margin-top: 3

  HorizontalSeparator
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: prev.bottom

  BotTextEdit
    id: name
    anchors.left: parent.left
    anchors.bottom: parent.bottom
    width: 175

  Label
    anchors.horizontalCenter: prev.horizontalCenter
    anchors.bottom: prev.top
    margin-bottom: 2
    text-align: center
    text: Profile Name
    font: verdana-11px-rounded
    color: #aeaeae

  Button
    id: addButton
    anchors.top: name.top
    anchors.bottom: name.bottom
    anchors.left: name.right
    margin-left: 3
    anchors.right: parent.right
    text: Add
    tooltip: On add above rule will be listed as Profile name - use friendly one!

EquipWindow < MainWindow
  size: 600 370
  text: Equipment Manager
  @onEscape: self:hide()

  ListPanel
    id: listPanel
    anchors.left: parent.left
    anchors.top: parent.top

  VerticalSeparator
    anchors.top: parent.top
    anchors.bottom: bottomSep.top
    margin-bottom: 5
    anchors.horizontalCenter: parent.horizontalCenter

  InputPanel
    id: inputPanel
    anchors.right: parent.right
    anchors.top: parent.top

  HorizontalSeparator
    id: bottomSep
    anchors.right: parent.right
    anchors.left: parent.left
    anchors.bottom: closeButton.top
    margin-bottom: 8    

  Button
    id: closeButton
    !text: tr('Close')
    font: cipsoftFont
    anchors.right: parent.right
    anchors.bottom: parent.bottom
    size: 45 21
    margin-top: 15
    margin-right: 5    