Commit graph

736 commits

Author SHA1 Message Date
Tomasz Śniatowski
1dc5bc157b workaround for gui2 limitation causing bug#12545...
...make the slider wider than necessary to ensure all values are
reachable
2008-11-21 18:39:42 +01:00
Tomasz Śniatowski
1589d8713c editor2 MDI feature - have more than one map open in the editor...
...with fast switching between them. Can be disabled in the editor
settings. Also changed:

* the display class now holds a pointer to the map instead of a
  reference, a pointer can be changed which permits the entire MDI
  behavior. Related bits were also changed in terrain_builder.

* mouse_handler_base no longer holds a reference to the map

* the map labels class does not hold a gamemap reference, as it can
  use the display object to access the map. Also clearing all labels
  was exposed as a public member function.

* used scoped_ptrs and forward declarations to avoid having to include
  map_label.hpp and terrain_builder.hpp in display.hpp, this reduces
  build dependencies quite a bit.

* made get_action_state use the menu index to allow a dynamic menu to
  have checkboxes. This entire chunk of code needs a rewrite.
2008-11-21 15:42:34 +01:00
Tomasz Śniatowski
9b65061bd2 translating numbers doesn't make much sense 2008-11-21 15:38:55 +01:00
Mark de Wever
220f72d90a Change the label to a scroll_label.
This is required to get the wrapping and scrolling working for the
dialog. (Note the code to do wrapping and scrolling doesn't work
properly yet. This will be fixed but is a much larger change.)
2008-11-04 16:54:54 +00:00
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