mirror of
https://github.com/edubart/otclient.git
synced 2025-10-18 05:23:26 +02:00
implementing battle window, need some improvements but its working
This commit is contained in:
56
modules/game_battle/battleButton.otui
Normal file
56
modules/game_battle/battleButton.otui
Normal file
@@ -0,0 +1,56 @@
|
||||
BattleButton < UIButton
|
||||
|
||||
BattleButton
|
||||
height: 20
|
||||
margin-top: 5
|
||||
fixed-size: true
|
||||
@onClick: Battle.onButtonClick(self)
|
||||
&isBattleButton: true
|
||||
|
||||
UICreature
|
||||
id: creature
|
||||
size: 20 20
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
@onClick: Battle.onButtonClick(parent)
|
||||
&battleButtonChild: true
|
||||
|
||||
UIWidget
|
||||
id: spacer
|
||||
width: 5
|
||||
anchors.left: creature.right
|
||||
anchors.top: creature.top
|
||||
&battleButtonChild: true
|
||||
|
||||
UIWidget
|
||||
id: skull
|
||||
height: 11
|
||||
anchors.left: spacer.right
|
||||
anchors.top: spacer.top
|
||||
&battleButtonChild: true
|
||||
|
||||
UIWidget
|
||||
id: emblem
|
||||
height: 11
|
||||
anchors.left: skull.right
|
||||
anchors.top: creature.top
|
||||
&battleButtonChild: true
|
||||
|
||||
LargerLabel
|
||||
id: label
|
||||
anchors.left: emblem.right
|
||||
anchors.top: creature.top
|
||||
color: #888888
|
||||
margin-left: 2
|
||||
@onClick: Battle.onButtonClick(parent)
|
||||
&battleButtonChild: true
|
||||
|
||||
ProgressBar
|
||||
id: lifeBar
|
||||
height: 5
|
||||
anchors.left: spacer.right
|
||||
anchors.right: parent.right
|
||||
anchors.top: label.bottom
|
||||
margin-top: 2
|
||||
@onClick: Battle.onButtonClick(parent)
|
||||
&battleButtonChild: true
|
Reference in New Issue
Block a user