49903 Commits

Author SHA1 Message Date
Mark de Wever
75757e52e1 Add an ifdef to tcontrol::init().
It is only used in GUI2_EXPERIMENTAL_LISTBOX context and will probably
be replaced with another way to initialise objects. So comment it out
for now.
2012-05-17 16:21:56 +00:00
Mark de Wever
994453967e Made load_config a non virtual function.
It was defined virtual in twidget but only overriden in tcontrol. So
added it there as a non-virtual function.

Also made it private since most code doesn't really use the function and
that part of the code is a bit more tricky as it should.
2012-05-17 16:21:53 +00:00
Mark de Wever
1887fbed7e Remove tcontrol's unneeded virtual destructor.
The base class already has a virtual destructor so no need to add it
in this class.
2012-05-17 16:21:50 +00:00
Mark de Wever
6e6d7c74ae Move the definition to the tcontrol class.
The widget class itself doesn use it, so no need to keep it there.
2012-05-17 16:21:47 +00:00
Nils Kneuper
a2f48af85a updated Italian translation 2012-05-16 20:22:13 +00:00
Mark de Wever
4677d5f33e Fixes has_widget for grids.
This reapplies 2012-05-13T13:33:33Z!koraq@xs4all.nl and resolves the issue found in 
2012-05-13T18:03:56Z!koraq@xs4all.nl.
2012-05-15 18:24:50 +00:00
Steven Panek
2bcafec78b Updated the Finnish translation. 2012-05-15 16:07:45 +00:00
Ignacio R. Morelle
9419e19f9c addon/mg: Fix terrible application of logic...
...causing the Add-ons Manager to never show up when the server list
is empty, even when there are publishable add-ons installed
2012-05-15 03:59:13 +00:00
Steven Panek
8333789e96 Updated the Finnish translation. 2012-05-14 22:32:09 +00:00
Mark de Wever
0b3648fe28 Temporary disable 2012-05-13T13:33:33Z!koraq@xs4all.nl.
the_new_lipk discovered an issue when trying to remove and addon caused
by this commit. Needs more investigation but I don't have time at the
moment. So restore its previous behaviour and look for a proper fix
later.
2012-05-13 18:03:56 +00:00
Mark de Wever
a849f6c7a4 Fix the formatting for a growing pane.
The code seems to work for this specific case but needs more testing.

This commit finishes the proof-of-concept prototype it seems the big
hurdles in the listbox have been tackled. Now need to focus on getting a
real widget out of this prototype.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-13 15:46:12 +00:00
Mark de Wever
db8ddc9b02 Add a debug and test code.
In order to test with formatting growing listboxes I need a growing
listbox. When showing the addon dialogue only one is shown, the others
are loaded with the load button. The code is a bit hacky, but hidden
under the --new-widgets switch.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-13 14:47:03 +00:00
Mark de Wever
f4815396d4 Let the pane handle resizes of its children.
It is not perfect yet, but the resizing of the addon list is much faster
now and feels usable. The resizing happens when a row is expanded or
collapsed.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-13 13:33:37 +00:00
Mark de Wever
c560e29d50 Fixes has_widget for grids.
The function now searches recursively finding nested widgets.
2012-05-13 13:33:33 +00:00
Mark de Wever
78234a5c08 Replace tabs with four spaces. 2012-05-13 13:33:30 +00:00
Mark de Wever
cb04e4ccb9 Set the visible state before requesting an update.
This makes sure when the event is processed the state is the proper one.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-13 13:33:27 +00:00
Mark de Wever
98816a43e9 Fire a message when switching visible status.
Instead of requesting the window to do a full layout fire a request.
This allows other widgets to intercept the request and handle it at
another level.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-13 13:33:24 +00:00
Mark de Wever
f2ad4a0a35 Use hide for the expand button.
Using hide instead of expand looks a bit nicer with the size of the rows
in the addon list.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-13 13:33:21 +00:00
Ignacio R. Morelle
d65124a8c2 terrain2wiki: Remove leading/trailing whitespace in lines before parsing
The Dark Flagstones terrain had .aliasof at the last line before the
closing tag, which caused a newline to be output right before </code> in
the wiki page, and in turn causing MW to generate invalid XHTML.

This change makes the generated wiki page valid XHTML again (except for
another problem with the actual glamdrol theme, not the page contents).
2012-05-12 21:29:00 +00:00
Ignacio R. Morelle
15510a8dcd terrain2wiki: Wrap .string and .aliasof column contents in <code>...
...and use &#124; instead of the Unicode broken bar (fixes bug #19678)

This also extends the vertical bar escaping to the .aliasof column
contents (in case we ever get base terrains with vertical bars)

By using <code> we should be able to stick to byte-accurate contents
without compromising readability, by styling terrain type strings in a
default monospace font suitable for code display (i.e. | and l should be
distinguishable from each other).
2012-05-12 21:11:07 +00:00
J. Tyne
0c8990bb98 Don't kill a unit before her last line. 2012-05-12 17:54:06 +00:00
J. Tyne
720348a01e Always call unhighlight_reach() before moving.
(It was not called before moving in a move & attack.)
2012-05-12 17:06:13 +00:00
J. Tyne
a72b8c952b Stop suppressing shroud data from the inspection window.
FR / bug #19623
2012-05-12 16:28:46 +00:00
Steven Panek
e887e2dbc5 Ran umcpropfix. 2012-05-11 23:02:36 +00:00
J. Tyne
95f83b148a Forgot to redraw the minimap (after WML kills a unit). 2012-05-11 22:31:47 +00:00
Steven Panek
63025c72c3 Updated localized image sources for French. 2012-05-11 22:30:37 +00:00
Steven Panek
0aa46516e5 Updated localized images for French. 2012-05-11 22:23:39 +00:00
J. Tyne
31625f9216 Make units disappear when WML-killed without animations.
Discovered this while checking my revisions to screen invalidations,
but it appears to be a separate issue.
2012-05-11 22:07:45 +00:00
J. Tyne
4aee8b709e Making the logic of when to clear the shroud more obvious
(less prone to breaking by future edits).

After this change, one test seems redundant or superfluous,
but I have not checked to see if it might actually be necessary.
2012-05-11 21:51:34 +00:00
J. Tyne
2a7296fc09 Revising how the screen is updated in undo/redo.
Since changes to fog are not allowed to be undone, no need to clear_shroud().

Redos were not updating the minimap.

And otherwise making the invalidations/draws consistent across the
various events.
2012-05-11 21:14:57 +00:00
J. Tyne
b4f0d659ce Streamlining invalidations associated with fog/shroud clearing.
The foundation for this was introduced with the enter/ext hex events.
This update allows more of the game to take advantage of this (as
well as consolidating some code to make it more robust in the face
of edits).
2012-05-11 20:43:52 +00:00
Lari Nieminen
1ac951d00d Fixed an event filter bug as reported on the forums. 2012-05-11 17:40:51 +00:00
Lari Nieminen
50e0e4703a Wired in Alanin's alternate portraits as well as the winter overlay. 2012-05-11 15:22:29 +00:00
Richard Kettering
9e1b0926c3 Wired in new troll portrait. 2012-05-11 09:03:45 +00:00
Richard Kettering
2582112982 Small version of the troll hero portrait. 2012-05-11 06:30:41 +00:00
Richard Kettering
b38225d726 Repurposed the existing human spearman portrait as an alt,
...and replaced the primary one with a new portrait.  Added a new
troll hero portrait.
2012-05-11 06:26:07 +00:00
Richard Kettering
2b2215321c New portraits to finish the set for Sceptre of Fire. 2012-05-11 06:19:00 +00:00
Richard Kettering
fa8fcdb357 New portrait for lionel in DM. 2012-05-11 05:55:26 +00:00
Ignacio R. Morelle
3637bb9a5b help: Minor punctuation and/or wording changes to...
...the Abilities and Weapon Specials index topics according to forum
feedback
2012-05-10 20:16:39 +00:00
Mark de Wever
5d335b8231 Implement the expand and collapse button.
The items  in the adon list can now be expanded and collapsed, by
default the description is collapsed.

The expanding and collapsing causes a resize event not handled by the
pane causing a huge slowdown. This will needs some love.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-09 19:42:16 +00:00
Mark de Wever
35fc1b2234 Add an accessor for the grid of a pane's items.
The code is used to experiment with a different approach of the
implementation of a listbox
2012-05-09 19:42:11 +00:00
Steven Panek
4a6077a663 Updated the Finnish translation. 2012-05-09 13:41:36 +00:00
Elvish_Hunter
d3fee6ae1a UtBS: changed Human Commander's movetype to smallfoot 2012-05-08 19:36:47 +00:00
J. Tyne
760b3ce485 Extend an unnamed namespace to include what was a static function
(for consistency).
2012-05-08 19:14:28 +00:00
J. Tyne
31ab9798c3 Base the ability to undo actions (with regard to fog/shroud)...
...on shared vision/maps, rather than team vision/maps.

This is more consistent with what a player sees, and the end result better
handles situations where WML has changed a unit's side during movement.
2012-05-08 19:09:54 +00:00
Anonymissimus
ea64fce777 remove the default I case I added in 2012-05-08T14:00:37Z!anonymissimus@arcor.de
since gcc screams in case someone adds a value to the enum and it's
not handled in the switch
2012-05-08 19:03:00 +00:00
Mark de Wever
af24278c42 Remove an odd length for a call to substr.
It seems it's intended to use the string starting at position 7. So use the
default argument, which copies the rest of the string.
2012-05-08 19:02:51 +00:00
Mark de Wever
e5c0be72eb Increase the size of the pane and viewport.
This allows to select some widgets that otherwise would be outside the
widget area.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-08 18:49:05 +00:00
Mark de Wever
9a256caf3e Fix the coordinate fixups for the pane.
This transfers the mouse coordinates on the screen to the proper
location on the widget.

The code is used to experiment with a different approach of the
implementation of a listbox.
2012-05-08 18:49:02 +00:00
Mark de Wever
2a766c7ae3 Mark a function static to silence a gcc warning. 2012-05-08 18:45:53 +00:00