Skip to content

Commit

Permalink
GUI2/Image: added tiled-to-size image definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jul 30, 2017
1 parent f818745 commit 6f1a13c
Showing 1 changed file with 31 additions and 27 deletions.
58 changes: 31 additions & 27 deletions data/gui/widget/image_default.cfg
Expand Up @@ -3,10 +3,7 @@
### Definition of an image.
###

[image_definition]
id = "default"
description = "an image."

#define _GUI_RESOLUTION _IMAGE_ATTRIBUTES
[resolution]

min_width = 0
Expand All @@ -23,45 +20,52 @@
[draw]

[image]
name = "(text)"

{_IMAGE_ATTRIBUTES}

[/image]

[/draw]

[/state_enabled]

[/resolution]

[/image_definition]
#enddef

[image_definition]
id = "centered"
id = "default"
description = "an image."

[resolution]

min_width = 0
min_height = 0
{_GUI_RESOLUTION (
name = "(text)"
)}

default_width = 0
default_height = 0

max_width = 0
max_height = 0
[/image_definition]

[state_enabled]
[image_definition]
id = "centered"
description = "an image."

[draw]
{_GUI_RESOLUTION (
name = "(text)"
{GUI_CENTERED_IMAGE}
)}

[image]
name = "(text)"
{GUI_CENTERED_IMAGE}
[/image]

[/draw]
[/image_definition]

[/state_enabled]
[image_definition]
id = "tiled_to_size"
description = "an image."

[/resolution]
{_GUI_RESOLUTION (
name = "(text)"
x = 0
y = 0
w = "(width)"
h = "(height)"
resize_mode = "tile"
)}

[/image_definition]

#undef _GUI_RESOLUTION

0 comments on commit 6f1a13c

Please sign in to comment.