Commit Graph

55 Commits

Author SHA1 Message Date
Mark de Wever
99a9207ec8 Align the portraits against the edges. 2008-07-07 21:34:26 +00:00
Mark de Wever
d6d65f485f Improved the proof-of-concept of the new dialogs.
- added left and right side image support and added them to the test
  scenario.

- allow images the 200 x 200 image to be 250 x 250.

- added a mutulated shyde.

- mirrored the arch mage.
2008-07-03 16:19:35 +00:00
Mark de Wever
e9798bf356 Add the initial proof-of-concept version of Jetryl's new idea for messages...
...in game. See
http://www.allacrost.org/staff/user/jetryl/Wesnoth/DialogueTest.jpg
for a screenshot of the intended idea (which this version doesn't
achive.

Added one of Kitty's new transperant images to test.
2008-06-24 20:40:33 +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
8e4145ebb7 Added the option to use a double click on a toggle button and panel...
...to close the window. Also added it to listboxes used.
2008-06-24 15:48:04 +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
e1014e98c8 Port 2008-06-15T11:48:23Z!paniemin@cc.hut.fi to the new widget system. 2008-06-15 13:38:24 +00:00
Mark de Wever
d2580054b8 Convert the MP server selection dialog,
...including the server list dialog, to the new widget library. (The
listbox widget needs some redesigning since it starts it looks rather
bad with two columns (which can be fixed with a small hack but rather
find a cleaner way in general).)
2008-06-14 14:16:28 +00:00
Mark de Wever
897d9605db Add proof-of-concept code to init a listbox from a WML config. 2008-05-25 12:21:36 +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
63ad8892c7 Adding initial proof-of-concept version for the MP method selection dialog. 2008-05-23 18:25:20 +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
99b9026880 Fix an off by one error,
...this allows the background of the listbox to have no gaps.
2008-05-18 14:08:54 +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
9adac709e8 Add initial version the new language selection dialog.
It works but the used widgets look ugly and since scrolling isn't
possible yet only a few languages can be choosen.
2008-05-11 17:47:32 +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
1782658a29 Add the settings section for the gui. 2008-05-01 13:52:24 +00:00
Mark de Wever
672dd9bf3a Allow the user to set the x and y coordinate of a window.
Allow the user to choose to place the window automatically.

Change the addon window to be placed automatically.
2008-05-01 11:29:05 +00:00
Mark de Wever
d1be9ba41a Rename the badly named scale to grow_factor. 2008-04-30 16:36:19 +00:00
Mark de Wever
7960ef214f Rename all definitions to include their id in their name. 2008-04-30 09:13:20 +00:00
Mark de Wever
e7839ba088 Add the panel defintion. 2008-04-30 09:11:49 +00:00
Mark de Wever
0642efcaf5 Remove the dummy text_font_size since it's no longer mandatory. 2008-04-28 16:11:25 +00:00
Mark de Wever
848416aea8 Add a spacer class used to align the buttons better at the left side. 2008-04-27 18:09:34 +00:00
Mark de Wever
a0f17c383d Remove some not needed translatable strings.
Make other strings like the currently used strings.
2008-04-27 16:02:30 +00:00
Mark de Wever
f7228ced85 Add the widget library to the wesnoth-lib domain and update the helper files. 2008-04-27 15:48:07 +00:00
Mark de Wever
3db4fddac8 [[Mouse and select improvememts]]
* Added code allow the mouse the click in a text and set the cursor at the 
  proper location.

* Added the selection indication.

* Added mouse dragging to select a range.

* Mouse double click selects all (doesn't work due to bug in event code).

* ctrl-C, ctrl-X and ctrl-P do copy paste (doesn't work yet on Mac).

* On UNIX based sytsems select does copy (middle mouse paste doesn't work yet).

* Fixed some minor bugs.
2008-04-20 11:08:34 +00:00
Mark de Wever
479b1f5c5a Add a new framework to add a history to a ttext_box...
...and store it in the preferences.

Saving to the preferences needs some more work (patch #1054).
2008-04-17 16:39:47 +00:00
Mark de Wever
14199608f9 Allow a label to be multiline.
This can't be set in the config yet but is used for the tooltip and
help popup.
2008-04-13 16:58:37 +00:00
Mark de Wever
a1cbcd5a49 Rather large changeset, the primary change is allowing tooltips...
...and help messageto be shown. Secondary changes are:

- moving hovering in tcontrol instead of the widgets.

- make the visible flag working for drawing.

- small refactoring of the window_builder class.
2008-04-13 10:11:14 +00:00
Mark de Wever
7369f27443 Add the font style parameter.
Add a new label type for the window title.

Use the new window title label in the addon connect dialog.
2008-04-12 10:10:36 +00:00
Mark de Wever
b2332eb70a Rename all xxx_defintion to the more generic definition...
fixes a bug where all widgets except the button will fall back to the
default definition.
2008-04-11 18:53:24 +00:00
Mark de Wever
2ded2dc392 Label text should start at offset 0. 2008-04-11 17:43:35 +00:00
Mark de Wever
4728c92353 Make the button image scale and let all buttons use the image...
...instead of the drawn version.
2008-04-11 17:40:44 +00:00
Mark de Wever
decb6f51d8 Widgets can have a size of 0,0 so update the comment.
Adjust the label to set no default and minimum size.
2008-04-11 17:31:44 +00:00
Mark de Wever
8bcb690932 Added stretch_surface_horizontal and stretch_surface_vertical.
The functions stretch a surface based on the first row/column. This
looks better for the widget borders as scale_surface and should be
faster (not tested).  Added the option to the widget library to use
these functions and convert the window borders to use the new option.
2008-04-10 16:52:18 +00:00
Mark de Wever
3967001cb7 Add positioning and scaling to an image on the canvas.
With this feature the window can look much more like the original so
also made that change.
2008-04-09 19:04:01 +00:00
Mark de Wever
e2b44cf885 get_minimum_size() and get_best_size() now look at the actual text width. 2008-04-09 16:51:21 +00:00