Commit graph

1566 commits

Author SHA1 Message Date
Mark de Wever
133eb440fb Move the panel definition to its own file. 2009-01-23 22:54:51 +00:00
Mark de Wever
19a0d1f02d Rename a badly ided widget. 2009-01-23 22:34:49 +00:00
Mark de Wever
302007bffb Remove some unused code. 2009-01-23 22:25:37 +00:00
Mark de Wever
1e06d99b2f Add a better test to detect old portraits.
It seems not all old images are 205x205 so that test failed. Now test
whether both dimensions are < 300 if so treat it as an old small image
and don't scale otherwise scale. This doesn't work entirely for Arne
(TB) 297x333 but unscaled he'll hide some text.
2009-01-18 05:43:34 +00:00
Mark de Wever
741f8efa01 Fix the right side wml dialog. 2009-01-17 17:53:15 +00:00
Mark de Wever
0be39435c3 Add support for 205x205 images in the new dialogs. 2009-01-17 16:55:26 +00:00
Thomas Baumhauer
798e0a1001 Added a textbox widget that displays its input as stars to be used...
...in the mp login dialogs.
2009-01-15 17:38:23 +00:00
Thomas Baumhauer
ba0692ceb2 add option to prevent the password from being saved 2009-01-13 22:31:03 +00:00
Thomas Baumhauer
61fc432f9b somewhat clearing the multiplayer login dialog mess:
- added the possibility to provide a password in the mp method selection dialog

- merged all dialogs that displayed erros or allowed entering the
  username or password into one dialog.

- password is now saved in preferences (todo: add option to turn this off)
2009-01-13 20:46:19 +00:00
Thomas Baumhauer
f3ace4861a making sending a private message the default in the command wrapper dialog. 2009-01-10 15:22:17 +00:00
Thomas Baumhauer
862030b806 added a graphical front end to various mp commands, replacing the whisper dialog 2009-01-06 14:02:47 +00:00
Mark de Wever
d3a3ece9b8 Allow the message dialog to grow higher.
Kitty, Jetryl and zookeeper aren't too fond of the scrollbars in the
dialog if the text gets too long. Technically it's the easiest solution
to make things working in all cases. So we decided to let the dialog to
grow near the top so the scrollbars will pop up less frequently and
hopefully never.
2009-01-05 20:50:40 +00:00
Mark de Wever
2a23ba1884 Cleanup part 5.
The full redraw flag is no longer needed since widgets are always fully
redrawn now.
2009-01-03 15:45:38 +00:00
Mark de Wever
8d62d4fa92 Fix the alignment of the text in the new dialogs.
Kitty pointed out the short texts seemed to start more to the middle.
2009-01-02 17:13:23 +00:00
Mark de Wever
01df1d2fee Use the proper button ids.
With the invalid ids the buttons on the horizontal scrollbar didn't fix,
which has been fix.
2009-01-02 13:34:08 +00:00
Thomas Baumhauer
06cf6bdf04 redoing the login dialog with the new widgets 2008-12-30 19:41:58 +00:00
Mark de Wever
c916ead0ad Improve the showing of scrollbars.
The not needed scrollbars are no longer shown, the space reserved for
them is not always freed. (Easyclose still doesn't work as wanted.)
2008-12-29 21:39:09 +00:00
Mark de Wever
2cc2a51603 Make NEW_DRAW unconditionally, WML side.
Remove the condition from the WML, also a few code changes which are not
longer needed, now that the WML has been converted.
2008-12-29 08:51:37 +00:00
Mark de Wever
a963d007a0 Rewrote the listbox class.
Now uses the scrollbar container as base and the generator for its
items. The scrolling doesn't work properly yet.
2008-12-24 16:01:02 +00:00
Nils Kneuper
d7c2091ec2 add a missing ' in string 2008-12-22 10:57:50 +00:00
Mark de Wever
665ef636e3 Revert 2008-12-13T22:07:30Z!ai0867@gmail.com.
2008-12-15T18:12:07Z!esr@thyrsus.com did the rename on the engine side which makes this
change no longer right. The name _initial.cfg sounds better as
_init.cfg.
2008-12-15 18:20:57 +00:00
Alexander van Gessel
589f9240e3 Rename _initial.cfg to _init.cfg to match the the C++. 2008-12-13 23:07:30 +01:00
Mark de Wever
ebf482bbb5 Move some macros to their own file.
This way those macros can be reused for all containers that need scrollbars.
2008-12-13 11:35:08 +00:00
Mark de Wever
53bdb88159 Restructure the data tree a bit.
In the macros directory some more generic macros will be defined, the
_initial.cfg should be loaded first. The engine doesn't enforce that yet but
probably esr will add that feature. (The odds of it not being loaded first is
probably theoretical.)
2008-12-13 11:22:50 +00:00
Mark de Wever
fba341cd49 Add a proof of concept new container class.
With the change of the drawing engine a rewrite of the containers is
needed as well. This adds a new container class which the scroll_label
uses. The class can't forward events and also the scrollbars are
always visible.
2008-12-08 21:26:35 +00:00
Mark de Wever
2f700cd925 Added a horizontal scrollbar widget.
Also added 'new' art, since the current toolkit has no art for it. The art is
of the copy-paste-rotate kind. (The scrollbar is not used yet.)
2008-12-04 19:00:44 +00:00
Ignacio R. Morelle
93d82bf2aa s/Ok/OK/ 2008-11-29 00:06:53 +00:00
Mark de Wever
2bb2da1e80 Improved the new ingame dialogs with portrait.
The code can now show a scrollbar if the text doesn't fit like the normal
dialog. (Note there's a redraw glitch which turns most of the dialog black.)
Also updated the changelog.
2008-11-25 19:07:06 +00:00
Mark de Wever
d0883b1cd1 Make wrapping for dialogs work nicely.
As long as the text is shown without a scrollbar the window closes on a
mouse click. When the scrollbar is needed a button will also be shown
and a mouse click (expect on the button) won't close the window anymore.
2008-11-24 19:54:44 +00:00
Tomasz Śniatowski
71be6f8a52 editor strings 2008-11-22 14:24:34 +01:00
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