Skip to content

Commit

Permalink
gui2/toggle_button: Add a checkbox variation without a label
Browse files Browse the repository at this point in the history
  • Loading branch information
irydacea committed Jul 7, 2020
1 parent 68f1cd6 commit 5afb96e
Showing 1 changed file with 112 additions and 0 deletions.
112 changes: 112 additions & 0 deletions data/gui/widget/toggle_button_no_label.cfg
@@ -0,0 +1,112 @@
#textdomain wesnoth-lib
###
### Definition of a toggle button without a label.
###

#define _GUI_RESOLUTION RESOLUTION WIDTH HEIGHT
[resolution]

{RESOLUTION}

min_width = {WIDTH}
min_height = {HEIGHT}

default_width = {WIDTH}
default_height = {HEIGHT}

max_width = 0
max_height = {HEIGHT}

[state]
[enabled]

[draw]

[image]
name = "buttons/checkbox.png"
[/image]

[/draw]

[/enabled]

[disabled]

[draw]

[image]
name = "buttons/checkbox.png~GS()"
[/image]

[/draw]

[/disabled]

[focused]

[draw]

[image]
name = "buttons/checkbox-active.png"
[/image]

[/draw]

[/focused]
[/state]

###
### Selected
###

[state]
[enabled]

[draw]

[image]
name = "buttons/checkbox-pressed.png"
[/image]

[/draw]

[/enabled]

[disabled]

[draw]

[image]
name = "buttons/checkbox-pressed.png~GS()"
[/image]

[/draw]

[/disabled]

[focused]

[draw]

[image]
name = "buttons/checkbox-active-pressed.png"
[/image]

[/draw]

[/focused]
[/state]

[/resolution]
#enddef

[toggle_button_definition]

id = "no_label"
description = "Checkbox without a label."

{_GUI_RESOLUTION () 20 18}

[/toggle_button_definition]

#undef _GUI_RESOLUTION

0 comments on commit 5afb96e

Please sign in to comment.