mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 18:35:39 +00:00

The main reason for reverting are: The stuff has hampered my development for almost a month now, including forcing me to delay things I need to/want to work on. The recruit dialog looks very ugly on 1024x768 since it doesn't fit entirely on the screen. It's still usable, but lowering the height of the main window makes the dialog unusable. The code includes several new wml errors: "Invalid WML found: Window builder: parsing resolution tip with empty 'id' field. Will become mandatory in 1.9.7. (4)" The unit tests are broken, and instead of being fixed properly their code is being `fixed' by disabling tests. 2011-03-05T20:39:56Z!fabianmueller5@gmx.de indicates it should fix the unit tests, but it doesn't so the code seems untested. Which means I still can't use the tests for other code I want to commit. In 2011-03-05T09:12:02Z!fabianmueller5@gmx.de fendrin commits not working code with the goal to force me to help him, which I consider bad practice, show the code in a pastebin if you want help. I want to work on things when _I_ choose to, and not being coerced to by committing bad code. Commit 2011-03-05T12:04:13Z!fabianmueller5@gmx.de throws private _GUI* macros in a global header, which might break other code in unexpected ways. The file modified even contains the documentation regarding how to use GUI* and _GUI* macros. And another remark that I should look at fixing the issue. So I had enough of this stuff; it's incomplete, buggy and hampers the work of at least one other developer for several weeks now. Reverts fendrin's commits: 2011-02-11T19:01:16Z!fabianmueller5@gmx.de 2011-02-12T06:25:47Z!fabianmueller5@gmx.de 2011-02-12T16:43:20Z!fabianmueller5@gmx.de 2011-02-12T17:37:40Z!fabianmueller5@gmx.de 2011-02-12T18:36:30Z!fabianmueller5@gmx.de 2011-02-12T19:59:34Z!fabianmueller5@gmx.de 2011-02-12T20:47:43Z!fabianmueller5@gmx.de 2011-02-12T21:41:35Z!fabianmueller5@gmx.de 2011-02-12T22:35:15Z!fabianmueller5@gmx.de 2011-02-14T19:24:40Z!fabianmueller5@gmx.de 2011-02-14T20:55:55Z!fabianmueller5@gmx.de, 2011-03-02T18:59:59Z!fabianmueller5@gmx.de 2011-03-03T13:34:48Z!fabianmueller5@gmx.de 2011-03-03T13:56:10Z!fabianmueller5@gmx.de 2011-03-03T17:32:49Z!fabianmueller5@gmx.de 2011-03-04T00:52:26Z!fabianmueller5@gmx.de 2011-03-04T11:27:39Z!fabianmueller5@gmx.de 2011-03-04T11:28:48Z!fabianmueller5@gmx.de 2011-03-05T09:12:02Z!fabianmueller5@gmx.de 2011-03-05T11:16:09Z!fabianmueller5@gmx.de 2011-03-05T11:19:37Z!fabianmueller5@gmx.de 2011-03-05T11:21:19Z!fabianmueller5@gmx.de 2011-03-05T11:32:25Z!fabianmueller5@gmx.de 2011-03-05T11:47:30Z!fabianmueller5@gmx.de 2011-03-05T12:00:39Z!fabianmueller5@gmx.de 2011-03-05T12:01:22Z!fabianmueller5@gmx.de 2011-03-05T12:02:03Z!fabianmueller5@gmx.de 2011-03-05T12:02:46Z!fabianmueller5@gmx.de 2011-03-05T12:04:13Z!fabianmueller5@gmx.de 2011-03-05T12:05:02Z!fabianmueller5@gmx.de 2011-03-05T12:20:25Z!fabianmueller5@gmx.de 2011-03-05T12:24:39Z!fabianmueller5@gmx.de 2011-03-05T13:56:43Z!fabianmueller5@gmx.de, 2011-03-05T16:32:38Z!fabianmueller5@gmx.de 2011-03-05T16:34:34Z!fabianmueller5@gmx.de 2011-03-05T16:35:17Z!fabianmueller5@gmx.de 2011-03-05T20:39:56Z!fabianmueller5@gmx.de 2011-03-05T22:17:03Z!fabianmueller5@gmx.de 2011-03-05T22:29:29Z!fabianmueller5@gmx.de. Also reverts a build system change that is no longer needed: 2011-03-05T16:35:04Z!anonymissimus@arcor.de
281 lines
6.1 KiB
INI
281 lines
6.1 KiB
INI
#textdomain wesnoth-lib
|
|
#
|
|
# Contains the macros for the default widgets.
|
|
# - Global GUI macros get the GUI prefix.
|
|
# - Local (pre file) GUI macros get the _GUI prefix and should be undefined at
|
|
# the end of the file.
|
|
#
|
|
#
|
|
# For now only TINY and NORMAL gui will be defined, once this works SMALL gui
|
|
# will be added, need to see which parts need to change for that. Later there
|
|
# will also be definitions for larger screens, mainly for using the extra width
|
|
# better.
|
|
|
|
|
|
###############################################################################
|
|
### ###
|
|
### Generic macros usable for all resolutions. ###
|
|
### ###
|
|
###############################################################################
|
|
|
|
# Centers the text horizontally.
|
|
#
|
|
# If the text is too wide it returns the left side.
|
|
# Rounding happens to the left side.
|
|
#define GUI__TEXT_HORIZONTALLY_CENTRED
|
|
"(if(text_width < width, (width - text_width ) / 2, 0))"
|
|
#enddef
|
|
|
|
# Centers the text vertically.
|
|
#
|
|
# If the text is too high it returns the top side.
|
|
# Rounding happens to the bottom side.
|
|
#define GUI__TEXT_VERTICALLY_CENTRED
|
|
"(if(text_height < height, (height - text_height + 1) / 2, 0))"
|
|
#enddef
|
|
|
|
#define GUI__CENTERED_TEXT FONT_SIZE FONT_STYLE FONT_COLOR
|
|
[text]
|
|
x = {GUI__TEXT_HORIZONTALLY_CENTRED}
|
|
y = {GUI__TEXT_VERTICALLY_CENTRED}
|
|
w = "(text_width)"
|
|
h = "(text_height)"
|
|
font_size = {FONT_SIZE}
|
|
font_style = {FONT_STYLE}
|
|
color = {FONT_COLOR}
|
|
text = "(text)"
|
|
[/text]
|
|
#enddef
|
|
|
|
# This white color is used for most texts.
|
|
#define GUI__FONT_COLOR_ENABLED__DEFAULT
|
|
"221, 221, 221, 255"
|
|
#enddef
|
|
|
|
# This gray color is used for most text when the widget is disabled.
|
|
#define GUI__FONT_COLOR_DISABLED__DEFAULT
|
|
"128, 128, 128, 255"
|
|
#enddef
|
|
|
|
# This gold color is used for the
|
|
# - title labels
|
|
# - button captions
|
|
# - checkbox captions
|
|
# - menu captions
|
|
#define GUI__FONT_COLOR_ENABLED__TITLE
|
|
"188, 176, 136, 255"
|
|
#enddef
|
|
|
|
# This now uses the default disabled color but should be tiny bit lighter.
|
|
#define GUI__FONT_COLOR_DISABLED__TITLE
|
|
{GUI__FONT_COLOR_DISABLED__DEFAULT}
|
|
#enddef
|
|
|
|
# This color is used as background in the listbox.
|
|
#define GUI__BACKGROUND_COLOR_ENABLED
|
|
"21, 19, 19, 255"
|
|
#enddef
|
|
|
|
#define GUI__BACKGROUND_COLOR_DISABLED
|
|
"64, 64, 64, 255"
|
|
#enddef
|
|
|
|
# Draws the background for a selected cell in a listbox. For now there's one
|
|
# version for both tiny and normal gui.
|
|
#define GUI__LISTBOX_SELECTED_CELL
|
|
|
|
# corners are 10x10
|
|
[image]
|
|
x = 0
|
|
y = 0
|
|
name = "misc/selection2-border-topleft.png"
|
|
[/image]
|
|
|
|
[image]
|
|
x = "(width - 10)"
|
|
y = 0
|
|
name = "misc/selection2-border-topright.png"
|
|
[/image]
|
|
|
|
[image]
|
|
x = 0
|
|
y = "(height - 10)"
|
|
name = "misc/selection2-border-botleft.png"
|
|
[/image]
|
|
|
|
[image]
|
|
x = "(width - 10)"
|
|
y = "(height - 10)"
|
|
name = "misc/selection2-border-botright.png"
|
|
[/image]
|
|
|
|
# since the lines are already quite long scale them instead of stretching
|
|
# the height of the lines is 3 pixels.
|
|
[image]
|
|
x = 10
|
|
y = 0
|
|
w = "(width - 20)"
|
|
name = "misc/selection2-border-top.png"
|
|
[/image]
|
|
|
|
[image]
|
|
x = 10
|
|
y = "(height - 3)"
|
|
w = "(width - 20)"
|
|
name = "misc/selection2-border-bottom.png"
|
|
[/image]
|
|
|
|
[image]
|
|
x = 0
|
|
y = 10
|
|
h= "(height - 20)"
|
|
name = "misc/selection2-border-left.png"
|
|
[/image]
|
|
|
|
[image]
|
|
x = "(width - 3)"
|
|
y = 10
|
|
h = "(height - 20)"
|
|
name = "misc/selection2-border-right.png"
|
|
[/image]
|
|
|
|
#main background 320 x 67
|
|
[image]
|
|
x = 3
|
|
y = 3
|
|
w = "(width - 6)"
|
|
h = "(height - 6)"
|
|
name = "misc/selection2-background.png"
|
|
[/image]
|
|
|
|
#enddef
|
|
|
|
# Forces a wiget to be of a certain size.
|
|
# Depending of the flags of the parent widget the item will grow
|
|
#
|
|
# WIDTH Minimum width for the widget.
|
|
# HEIGHT Minimum height for the widget.
|
|
# WIDGET The widget to add into the item.
|
|
#
|
|
# eg instead of
|
|
# [label]
|
|
# # Note Foo has trailing spaces to force extra width.
|
|
# label = "
|
|
# Foo
|
|
# "
|
|
# [label]
|
|
# you can do:
|
|
#
|
|
# {GUI_FORCE_WIDGET_MINIMUM_SIZE 150 75 (
|
|
# [label]
|
|
# label = "Foo"
|
|
# [label]
|
|
# )}
|
|
#
|
|
#define GUI_FORCE_WIDGET_MINIMUM_SIZE WIDTH HEIGHT WIDGET
|
|
[stacked_widget]
|
|
definition = "default"
|
|
|
|
[stack]
|
|
|
|
[layer]
|
|
|
|
[row]
|
|
|
|
[column]
|
|
|
|
[spacer]
|
|
definition = "default"
|
|
width = "{WIDTH}"
|
|
height = "{HEIGHT}"
|
|
[/spacer]
|
|
|
|
[/column]
|
|
|
|
[/row]
|
|
|
|
[/layer]
|
|
|
|
[layer]
|
|
|
|
[row]
|
|
grow_factor = 1
|
|
[column]
|
|
grow_factor = 1
|
|
horizontal_grow = "true"
|
|
vertical_grow = "true"
|
|
{WIDGET}
|
|
[/column]
|
|
|
|
[/row]
|
|
|
|
[/layer]
|
|
|
|
[/stack]
|
|
|
|
[/stacked_widget]
|
|
#enddef
|
|
|
|
###############################################################################
|
|
### ###
|
|
### Macros for the tiny gui. ###
|
|
### ###
|
|
###############################################################################
|
|
|
|
#define GUI_TINY__RESOLUTION
|
|
window_width = 640
|
|
window_height = 480
|
|
#enddef
|
|
|
|
#define GUI_TINY__FONT_SIZE__TINY
|
|
8
|
|
#enddef
|
|
|
|
#define GUI_TINY__FONT_SIZE__SMALL
|
|
9
|
|
#enddef
|
|
|
|
#define GUI_TINY__FONT_SIZE__DEFAULT
|
|
10
|
|
#enddef
|
|
|
|
#define GUI_TINY__FONT_SIZE__LARGE
|
|
11
|
|
#enddef
|
|
|
|
#define GUI_TINY__FONT_SIZE__TITLE
|
|
11
|
|
#enddef
|
|
|
|
###############################################################################
|
|
### ###
|
|
### Macros for the normal gui. ###
|
|
### ###
|
|
###############################################################################
|
|
|
|
#define GUI_NORMAL__RESOLUTION
|
|
window_width = 0
|
|
window_height = 0
|
|
#enddef
|
|
|
|
#define GUI_NORMAL__FONT_SIZE__TINY
|
|
10
|
|
#enddef
|
|
|
|
#define GUI_NORMAL__FONT_SIZE__SMALL
|
|
12
|
|
#enddef
|
|
|
|
#define GUI_NORMAL__FONT_SIZE__DEFAULT
|
|
14
|
|
#enddef
|
|
|
|
#define GUI_NORMAL__FONT_SIZE__LARGE
|
|
18
|
|
#enddef
|
|
|
|
#define GUI_NORMAL__FONT_SIZE__TITLE
|
|
18
|
|
#enddef
|
|
|