65 Commits

Author SHA1 Message Date
Mark de Wever
45ebc2acf0 Avoid the text box text overflow termination.
When the text was too long the cursor would be drawn out of bounds which
caused an assert which terminated Wesnoth. Now the text will no longer
be drawn out of bounds and be ellipized. (The ellipses are always drawn
at the end, which will be fixed later.)
2008-08-30 15:17:58 +00:00
Mark de Wever
66d6be81bc Change the button to use the new macros. 2008-08-30 15:17:49 +00:00
Mark de Wever
b641844238 Cleanup the window definition. 2008-08-29 19:26:17 +00:00
Mark de Wever
ddc3769581 Cleanup patch to move macros in the string. 2008-08-29 19:26:12 +00:00
Mark de Wever
6ce967d869 Remove an obsolete proof-of-concept widget. 2008-08-29 18:34:53 +00:00
Mark de Wever
a5219f5df2 Updated to the new style. 2008-08-28 17:24:00 +00:00
Mark de Wever
708c847124 Updated to the new style. 2008-08-25 15:36:05 +00:00
Mark de Wever
653bee39bd Updated to the new style. 2008-08-25 15:36:01 +00:00
Mark de Wever
b5ae677123 Updated to the new style. 2008-08-25 15:35:57 +00:00
Mark de Wever
72f8b75d53 Updated to the new style. 2008-08-25 15:35:52 +00:00
Mark de Wever
98c8377a09 Converted the listbox items with icons to the new format. 2008-08-23 20:24:45 +00:00
Mark de Wever
42e30eb72d Changed the sizes of the listbox...
...so it can be used for normal and tiny gui.
2008-08-23 20:24:33 +00:00
Mark de Wever
030423a3b3 Fix the size problems for the listbox.
I forgot to add the resolutions so the last was always picked which
caused the tiny gui version never to be selected.
2008-08-23 18:59:29 +00:00
Mark de Wever
395b129ccd Merge the up and down arrow in one file.
With some macros it can be made quite the same and easier to add more
buttons in the future. Also added a tiny gui version.
2008-08-23 17:39:58 +00:00
Mark de Wever
56c14b6372 Change the vertical scrollbar to use more macros...
...and be usable with tiny-gui.
2008-08-23 16:54:18 +00:00
Mark de Wever
948d239017 Remove text_font_size since it's no longer mandatory...
...and makes no sense here.
2008-08-23 16:54:12 +00:00
Mark de Wever
3b22e1c100 Refactored the listbox text items.
More macros and added the tiny-gui definitions.
2008-08-23 16:54:00 +00:00
Mark de Wever
155336027e Textbox widget definition refactoring.
Cleaned up the widget to use the new macros and also added the (not so
well) tested code for tiny gui.
2008-08-23 13:44:19 +00:00
Mark de Wever
444f77e141 Fix a typo in a macro name, spotted by Zookeeper. 2008-08-22 19:33:45 +00:00
Mark de Wever
1af166edc6 Refactored the label definition and added a tiny-gui version. 2008-08-22 19:12:18 +00:00
Mark de Wever
af42d9eb9c Found out the button should use the small font,
...also restored the normal font to its previous value.
2008-08-22 18:58:44 +00:00
Mark de Wever
c47f2fc58a Cleaned up the macros and used more macros for the button.
Also add a definition for tiny gui in the button, other widgets will follow.
2008-08-21 17:56:33 +00:00
Ignacio R. Morelle
534e51c76b Fixed misspelled preprocessor directive (#unddef, should be #undef) 2008-08-15 22:36:01 +00:00
Mark de Wever
a506c03625 Add a new toggle button type for the resize direction in the new editor.
Also added proof-of-concept code in the editor and made a tight grid.
2008-08-12 20:05:32 +00:00
Mark de Wever
56b299a714 Initial version of the minimap widget.
* The C++ of the widget has the option to set border sizes, but this hasn't
  been exposed to WML yet.

* Moved the menubar around to keep it in alphabetic order.
2008-07-26 09:45:18 +00:00
Mark de Wever
477e594938 Add the new menubar code, which isn't used yet. 2008-07-18 20:41:09 +00:00
Mark de Wever
bdd251739f Fix some typos. 2008-07-18 19:48:53 +00:00
Mark de Wever
c4c9ca4060 Allow the label of the slider to be customized...
...so it can display special values it needed.
2008-07-18 16:43:49 +00:00
Mark de Wever
45a19e60c4 x2 is a coordinate no width, so needs an extra -1. 2008-07-18 10:45:18 +00:00
Mark de Wever
fa431a0582 Add the initial slider code,
...the length has an off by one error which will be fixed later.
2008-07-17 21:01:38 +00:00
Mark de Wever
1b4dd7fd2e Change the window definition into a macro and add the common used types. 2008-06-24 16:29:56 +00:00
Mark de Wever
e8b1280a7b [[drawing code fixes]]
* Rewrote the drawing code to be able to force a redraw and to invalidate the
  background. This fixes the ttoggle_panel redraw problems.

* Removed the no_redraw label hack

* Updated the WIKI comment blocks to fix some typos and add some forgotten info.
2008-06-23 16:32:37 +00:00
Mark de Wever
f2f84a592a Undefine a macro when no longer needed. 2008-06-22 17:59:22 +00:00
Mark de Wever
2cbe565950 Add new proof-of-concept toggle panel.
Drawing on the panel still has glitches.

Events are send to the panel not to the widget.

Sapient sorry for breaking the coding standard too lazy do convert the
0's ;-).
2008-06-22 17:49:58 +00:00
Mark de Wever
5230f12157 Add the option to add an icon to a toggle button...
...and wire that in for the mp  selection dialog.
2008-05-24 13:56:45 +00:00
Mark de Wever
c75b49a599 Fix typo in macro definition. 2008-05-24 13:30:51 +00:00
Mark de Wever
24bb485469 Wire in the new images Shadow_Master added in commit 26751. 2008-05-21 18:12:07 +00:00
Mark de Wever
6772f2f9bc Give the listbox scroll buttons with arrows and disable the other placeholders. 2008-05-20 15:25:52 +00:00
Ignacio R. Morelle
87639c63c9 Add code support for disabled button state graphic added on 2008-05-19T20:47:23Z!shadowm@wesnoth.org 2008-05-19 20:48:15 +00:00
Ignacio R. Morelle
b48116df19 Add path to some of the graphics on 2008-05-19T20:25:06Z!shadowm@wesnoth.org to GUI WML 2008-05-19 20:27:23 +00:00
Ignacio R. Morelle
7238b0b975 New graphics for pressed scrollbar block (new widget system) 2008-05-18 16:05:47 +00:00
Mark de Wever
37fec94e59 Add another background colour for disabled items. 2008-05-18 13:54:50 +00:00
Mark de Wever
7c745a47d0 Show (ugly) placeholder buttons for the scrollbar in the listbox.
Made those buttons also works.

Fixes a off by one bug in at_end().
2008-05-17 10:37:10 +00:00
Mark de Wever
28810e61ba Add a new widget defintion as background for a text in the language listbox. 2008-05-17 08:08:28 +00:00
Mark de Wever
8f58217bce Fix typo in undef 2008-05-17 08:00:33 +00:00
Mark de Wever
63e8e030fe Adding a crude listbox class,
...not yet really functional but the basics are there.
2008-05-11 17:37:59 +00:00
Mark de Wever
58328e8a35 Name the togglebutton fields internal also selected or not,
...like the recent API change. This also fixes a bug with how to react
to the selected state.  (Some parts inverted selected and not
selected.)
2008-05-10 12:40:14 +00:00
Mark de Wever
4ccb5dd736 Add a toggle button class.
A toggle button is a button which has two states up and down. For
example a radio button or a checkbox is a toggle button.
2008-05-09 16:16:44 +00:00
Mark de Wever
861ff2da3b Add a scrollbar base class and a vertical scrollbar class.
The class isn't used since some extra helper classes are needed for
that.  Note there is debug code left since not everything is tested
yet.
2008-05-03 14:59:38 +00:00
Mark de Wever
7960ef214f Rename all definitions to include their id in their name. 2008-04-30 09:13:20 +00:00