Some more UI updates and fixes.

* Added UICreatureButton class for handling/replacing "battle buttons" (can now be used in other modules).
* Added the ability to use items on creatures via the battle window.
* Some minor cosmetics.
This commit is contained in:
BeniS
2012-08-26 04:05:33 +12:00
parent f93d79649f
commit 0763b266d5
9 changed files with 252 additions and 194 deletions

View File

@@ -12,6 +12,7 @@ local skin = {
styles = {
'buttons.otui',
'creaturebuttons.otui',
'labels.otui',
'panels.otui',
'separators.otui',

View File

@@ -58,4 +58,4 @@ NextButton < BrowseButton
icon-source: /images/arrow_right.png
PreviousButton < BrowseButton
icon-source: /images/arrow_left.png
icon-source: /images/arrow_left.png

View File

@@ -0,0 +1,48 @@
CreatureButton < UICreatureButton
height: 20
margin-bottom: 5
UICreature
id: creature
size: 20 20
anchors.left: parent.left
anchors.top: parent.top
phantom: true
UIWidget
id: spacer
width: 5
anchors.left: creature.right
anchors.top: creature.top
phantom: true
UIWidget
id: skull
height: 11
anchors.left: spacer.right
anchors.top: spacer.top
phantom: true
UIWidget
id: emblem
height: 11
anchors.left: skull.right
anchors.top: creature.top
phantom: true
Label
id: label
anchors.left: emblem.right
anchors.top: creature.top
color: #888888
margin-left: 2
phantom: true
ProgressBar
id: lifeBar
height: 5
anchors.left: spacer.right
anchors.right: parent.right
anchors.top: label.bottom
margin-top: 2
phantom: true