Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Help Browser: properly implement toggling by clicking the book icons
- Loading branch information
Showing
3 changed files
with
193 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
#textdomain wesnoth-lib | ||
### | ||
### Definition of a toggle button to toggle sections in the help browser. | ||
### | ||
|
||
#define _GUI_ICON ICON | ||
[image] | ||
x = 0 | ||
y = 1 # The images are 24px high | ||
w = "(image_width)" | ||
h = "(image_height)" | ||
name = {ICON} | ||
[/image] | ||
#enddef | ||
|
||
[toggle_button_definition] | ||
|
||
id = "help_section_toggle" | ||
description = "This toggle button is meant to be used in topic tree in the help browser" | ||
|
||
[resolution] | ||
|
||
{GUI_NORMAL__RESOLUTION} | ||
|
||
min_width = 26 | ||
min_height = 26 | ||
|
||
default_width = 26 | ||
default_height = 26 | ||
|
||
max_width = 26 | ||
max_height = 26 | ||
|
||
text_extra_width = 0 | ||
text_font_size = 0 | ||
|
||
[state] | ||
[enabled] | ||
|
||
[draw] | ||
|
||
{_GUI_ICON ("help/closed_section.png")} | ||
|
||
[/draw] | ||
|
||
[/enabled] | ||
|
||
[disabled] | ||
|
||
[draw] | ||
|
||
{_GUI_ICON ("help/closed_section.png~GS()")} | ||
|
||
[/draw] | ||
|
||
[/disabled] | ||
|
||
[focused] | ||
|
||
[draw] | ||
|
||
{_GUI_ICON ("help/closed_section.png")} | ||
|
||
[/draw] | ||
|
||
[/focused] | ||
[/state] | ||
|
||
### | ||
### Selected | ||
### | ||
|
||
[state] | ||
[enabled] | ||
|
||
[draw] | ||
|
||
{_GUI_ICON ("help/open_section.png")} | ||
|
||
[/draw] | ||
|
||
[/enabled] | ||
|
||
[disabled] | ||
|
||
[draw] | ||
|
||
{_GUI_ICON ("help/open_section.png~GS()")} | ||
|
||
[/draw] | ||
|
||
[/disabled] | ||
|
||
[focused] | ||
|
||
[draw] | ||
|
||
{_GUI_ICON ("help/open_section.png")} | ||
|
||
[/draw] | ||
|
||
[/focused] | ||
[/state] | ||
|
||
[/resolution] | ||
|
||
[/toggle_button_definition] | ||
|
||
#undef _GUI_ICON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters