Commit Graph

180 Commits

Author SHA1 Message Date
Mark de Wever
80b2b5255a Initial implementation of the scaling image.
We now use a 400x400 image (max size 500x500) and scale that down to a
'nice' size for the current window size. The scale factor might need
some tuning.

Kitty also prefers to see a 400x400 image scaled down and evaluate the
quality, this might means we only need a 400x400 image but also that we
still need a 300x300 and maybe a 200x200 image.

It's still not possible to manipulate the new portraits from the WML
but that's postponed until we know how much images will be used.
2008-11-04 16:54:49 +00:00
Mark de Wever
cbac265dfb Add the easy close feature to the new widgets.
The easy close feature closes windows by a single mouse click, without
the need for a close button. Also converted the test dialog for the
remove addons to use this feature and commenting out the button in the
config (it will be needed later again).
2008-10-31 18:45:33 +00:00
Mark de Wever
c89168bf0e Add the easy close code to the window.
Easy close means a single click will close a window (if this is enabled
in the configs). Also convert the dialogs in the test scenario to use
this feature.
2008-10-31 18:45:14 +00:00
Nils Kneuper
01c575209c add a textdomain declaration to every .cfg file...
...(via utils/change-textdomain -t)
2008-10-07 10:35:42 +00:00
Tomasz Śniatowski
e5756e7b68 make the editor's lighting settings auto-update-when-slider-moved feature...
...optional via a toggle button and off by default
2008-10-05 13:16:40 +01:00
Mark de Wever
9f8cf8935a Fix some macro parameters. 2008-10-04 13:39:57 +00:00
Tomasz Śniatowski
11aff95bb8 work around a slider issue to allow setting 0 2008-09-30 19:14:25 +01:00
Mark de Wever
413402e4bc Aargh forgot one more file. 2008-09-22 21:38:26 +00:00
Mark de Wever
d3751f85ea Add a new image widget and optionally use it in the message dialog. 2008-09-22 21:22:54 +00:00
Mark de Wever
af362c7832 Add a new proof-of-concept generic widget.
This widget will need some more changes to be able to replace the current
dialogs shown to the user. Only replaced one place where widgets are used in
order to test the dialog.
2008-09-21 11:22:24 +00:00
Mark de Wever
11cccff142 Some fixes to the scroll label.
* Render the text a the right location.

* Make the label grow properly.
2008-09-21 10:33:57 +00:00
Mark de Wever
bcb10dfc79 Fix some bugs with the grid flags.
The flags did an uncorrect test on the flags, now properly uses a mask.
Also added better detection for invalid flags. Avoided grow and
alignment both to be set (leading to invalid flags) and removed all
occurances in the configs.
2008-09-21 09:25:36 +00:00
Mark de Wever
3a47eef6b3 Add the scroll label widget. 2008-09-19 16:39:16 +00:00
Tomasz Śniatowski
a806efa0a8 editor2: settings dialog
currently only does lightning settings by having presets and custom
sliders. Functional but still WIP, may have some subtle bugs. Changing
slider values refreshes the underlying map, in a possibly inefficient
way (flicker), but working reasonably. This fills fr#11408
2008-09-17 17:45:10 +01:00
Mark de Wever
b721f865f2 Refactoring the listbox.
Added the option to show or hide the scrollbar. Moved the sizing code
to the tvertical_scrollbar_container_ class which will query the listbox
to as it for the best size for the list.
2008-09-13 08:24:07 +00:00
Gunter Labes
68b245e4be added "mixed fighter" to all recruitment patterns involving...
...the Orcish Assassin line

added a newline to the end of some files
2008-09-09 17:53:22 +00:00
Mark de Wever
7f13663100 Fix ltr language alignement problems in the language dialog.
Needed to set the proper maximum width and use the extends size and
offset to get the proper required width. Added a debug ostream function
which already has been written a few times and added some debug code.
2008-09-07 19:53:31 +00:00
Mark de Wever
6e767674bd When the text on a label doesn't fit, use an ellipse instead of truncating. 2008-09-07 19:53:19 +00:00
Tomasz Śniatowski
d3e819dd22 editor2: alllow different map generators to be used 2008-09-04 19:11:26 +01:00
Mark de Wever
289aaa9f0b Listbox cell refactoring.
The cells in a listbox now share some more macros and the background of
the selected cell now looks like the version in the older gui.
2008-09-02 18:03:53 +00:00
Mark de Wever
7498fd2fc5 Remove deprected macros. 2008-08-31 17:43:34 +00:00
Mark de Wever
97a72eff4c Removed the usage of deprecated macros. 2008-08-31 17:43:25 +00:00
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
a5abf58f2c Add a new title screen.
Now that all 'stable' --new-widgets code has been moved to the default way
starting with --new-widgets is no longer needed unless you want to develop for
it. So the new proof-of-concept title screen can be committed. Only has the
basic buttons which work, but needs some cleanup up, both in looks and code
working.
2008-08-24 19:27:53 +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
31e3435e74 The disabled text was fully transparent by default, fixed to fully opaque. 2008-08-23 15:57:16 +00:00
Mark de Wever
a0d21aa9e4 Rename addon.cfg to addon_connect.cfg 2008-08-23 15:13:39 +00:00
Mark de Wever
8cbc6a3d92 Add the new button in the addon dialog to the definition as well. 2008-08-23 13:44:26 +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
41aeb68c43 The extra parens are no longer needed, the bug has been fixed in 2008-08-21T18:01:14Z!b.waresiak@gmail.com. 2008-08-22 18:55:11 +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
Mark de Wever
d50b3d4854 Cleaned up the code for the new in game message dialogs.
Still contains some ugly hacks.
2008-08-18 16:10:44 +00:00
Tomasz Śniatowski
15eb3d54c9 editor2: random map generation 2008-08-17 19:24:02 +01:00
Ignacio R. Morelle
534e51c76b Fixed misspelled preprocessor directive (#unddef, should be #undef) 2008-08-15 22:36:01 +00:00
Tomasz Śniatowski
ea2193aa08 editor2 resize dialog update 2008-08-13 10:27:29 +01: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
Tomasz Śniatowski
f2aea15b1f editor2: allow resizing the map in any direction,
...the dialog needs some more work (use icons instead of text in the
descriptions). Also use the map sizes sans the border in dialogs.
2008-08-09 17:32:45 +01:00
Tomasz Śniatowski
f72d75a179 editor2 resize dialog update, some misc cleanup. The dialog is not stable atm. 2008-08-08 18:23:13 +01:00
Mark de Wever
d53d754e32 Make the length of the slide area configurable for WML.
Converted the sliders in the new editor to use this feature.
2008-08-08 15:57:19 +00:00
Tomasz Śniatowski
0c918613e2 editor2: resize map dialog,
...fix resizing issues that also came up in flipping, made size
members in map protected to allow said fix. Flipping still broken but
at least will no longer occasionally crash.
2008-08-08 16:41:21 +01:00
Tomasz Śniatowski
4110e8564f editor2 dialog update 2008-08-08 12:36:38 +01:00
Tomasz Śniatowski
25c22b9c91 editor2: use sliders in new map dialog 2008-08-08 12:29:24 +01:00
Mark de Wever
6f4b9e9432 Make the stepsize 10 for experience work. 2008-08-06 15:19:08 +00:00
Mark de Wever
ce41f025a2 Fix some alignment problems in the dialog. 2008-08-06 15:08:05 +00:00
Tomasz Śniatowski
a9362872b3 editor2: random map generate dialog stub, refresh image cache option 2008-08-04 13:36:59 +01:00
Mark de Wever
6849efdef3 Initial commit of the new mp create game dialog.
It's only a prototype and doesn't really work yet.

This dialog uses most features of the widget library so its a main
purpose is to help testing the widgets and develop new widgets.

NOTE so don't use --new-widgets if you want to play a mp game.
2008-07-27 07:23:14 +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
Benoît Timbert
3e6738bbfc Update/fix a few SVN properties 2008-07-19 23:40:12 +00:00
Tomasz Śniatowski
9048879d26 editor2: new map, save map, save map as, confirm lost map changes...
...and minor tweaks
2008-07-19 22:09:55 +01:00
Tomasz Śniatowski
aaa239fdce new map dialog in editor2 (compiles but doesn't work atm) 2008-07-19 16:23:03 +01: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
40075dc494 Make the code work for images at the right side as well.
It seemed the dialog was 2 pixels to wide for left and right side,
which has been fixed.

Move the right side trigger closer to the left side test area in the test 
scenario.
2008-07-12 18:44:47 +00:00
Mark de Wever
ee140c0587 Add engine support for mirrored portraits. 2008-07-12 13:11:45 +00:00
Mark de Wever
4118f94622 Make the portrait shown configurable from C++,
...this means I can start to wire in images to start the real testing.
2008-07-11 21:47:59 +00:00
Mark de Wever
f5c7ed0cca Make the new message dialog less hardcoded and tricked in WML.
The dialog now gets a fixed size in C++ but it removes some sizing
spacers.
2008-07-11 19:25:29 +00:00
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