Refactored square/minimal button definition code
* Reduced used of macro arguments slightly * Made overlay images centered instead of stretched to size
This commit is contained in:
parent
dba4bd78b3
commit
8609955b74
1 changed files with 27 additions and 21 deletions
|
@ -1,8 +1,14 @@
|
|||
#textdomain wesnoth-lib
|
||||
###
|
||||
### Definition of buttons which have a 25 x 25 pixels image.
|
||||
### - down arrow button for the listbox.
|
||||
### - up arrow button for the listbox.
|
||||
### Definition of non-standard buttons of varying sizes
|
||||
###
|
||||
|
||||
#define _GUI_OVERLAY_ATTRIBUTES
|
||||
x = "((width / 2) - (min(width, image_width) / 2))"
|
||||
y = "((height / 2) - (min(height, image_height) / 2))"
|
||||
w = "(min(width, image_width))"
|
||||
h = "(min(height, image_height))"
|
||||
#enddef
|
||||
|
||||
#define _GUI_RESOLUTION RESOLUTION SIZE IMAGE IMAGE_OVERLAY IPF
|
||||
[resolution]
|
||||
|
@ -23,14 +29,14 @@
|
|||
[draw]
|
||||
|
||||
[image]
|
||||
w = {SIZE}
|
||||
h = {SIZE}
|
||||
w = "(width)"
|
||||
h = "(height)"
|
||||
name = {IMAGE} + ".png{IPF}"
|
||||
[/image]
|
||||
|
||||
|
||||
[image]
|
||||
w = {SIZE}
|
||||
h = {SIZE}
|
||||
{_GUI_OVERLAY_ATTRIBUTES}
|
||||
|
||||
name = {IMAGE_OVERLAY} + ".png{IPF}"
|
||||
[/image]
|
||||
|
||||
|
@ -43,14 +49,14 @@
|
|||
[draw]
|
||||
|
||||
[image]
|
||||
w = {SIZE}
|
||||
h = {SIZE}
|
||||
w = "(width)"
|
||||
h = "(height)"
|
||||
name = {IMAGE} + ".png~GS(){IPF}"
|
||||
[/image]
|
||||
|
||||
[image]
|
||||
w = {SIZE}
|
||||
h = {SIZE}
|
||||
{_GUI_OVERLAY_ATTRIBUTES}
|
||||
|
||||
name = {IMAGE_OVERLAY} + ".png~GS(){IPF}"
|
||||
[/image]
|
||||
|
||||
|
@ -67,10 +73,10 @@
|
|||
h = {SIZE}
|
||||
name = {IMAGE} + "-pressed.png{IPF}"
|
||||
[/image]
|
||||
|
||||
|
||||
[image]
|
||||
w = {SIZE}
|
||||
h = {SIZE}
|
||||
{_GUI_OVERLAY_ATTRIBUTES}
|
||||
|
||||
name = {IMAGE_OVERLAY} + "-pressed.png{IPF}"
|
||||
[/image]
|
||||
|
||||
|
@ -83,14 +89,14 @@
|
|||
[draw]
|
||||
|
||||
[image]
|
||||
w = {SIZE}
|
||||
h = {SIZE}
|
||||
w = "(width)"
|
||||
h = "(height)"
|
||||
name = {IMAGE} + "-active.png{IPF}"
|
||||
[/image]
|
||||
|
||||
|
||||
[image]
|
||||
w = {SIZE}
|
||||
h = {SIZE}
|
||||
{_GUI_OVERLAY_ATTRIBUTES}
|
||||
|
||||
name = {IMAGE_OVERLAY} + "-active.png{IPF}"
|
||||
[/image]
|
||||
|
||||
|
@ -325,7 +331,7 @@
|
|||
[state_focused]
|
||||
|
||||
[draw]
|
||||
|
||||
|
||||
[image]
|
||||
w = {SIZE}
|
||||
h = {SIZE}
|
||||
|
|
Loading…
Add table
Reference in a new issue