gna.org/bugs/?23297
If we are waiting for a synced user choice during a prestart events we
now show a gui2 dialog that informs the player about why the client is
waiting and also offers the player the option to quit the game.
This makes for somewhat simpler event handling and allows using the
keyboard to switch between tabs. It doesn't solve the layout issues with
long tab labels, though.
Also fixes the toggle panels that show the addons description and the filter
textbox in the non new-widgets codepath.
These changes mostly effect the non new-wigets codepath. The new-widgets
codepath (which already had a sorting feature) still works like before
except that it was adjusted to the changes to the cfg file.
Fixes http://gna.org/bugs/index.php?23751
Gui2 listboxes can now be sorted. As an example how to use it i changed the
gui2 loadgame dialog to use this new feature.
To make your listbox sortable you have to add togglebuttons/panels with the
id sort_n where n is a number in [0, numer_of_columns) to the [header] of
the listbox, then the listbox will be sorted when a user clicks on that
togglebutton/panel. Also you have to register the comparision functions for
each column with listbox::set_column_order.
Alternatively you can sort the listbox manually by calling listbox::order_by
This feautre still suffers from http://gna.org/bugs/?15763 . But for small
listboxes without scrollbars this is already a good feature.
This commit adds the c++ code to add tristate buttons: toggle_buttons and
toggle_panels can now have an arbitrary number of states instead of just 2
(selected and not selected). The number of states is determined by the number
of [state] tags in the widgets definition.
This doesn't add tristate definitions yet, but the plan is to use tristate
buttons later for the headers of sortable lists (No-Sort, Sort-Up, Sort-Down
buttons)
TODO: figure out whether to remove the parameter from tcontrols constructor.
- The "category" property is mainly for use by scenario designers; players will be able to hide labels based on this
- The "creator" property is meant to allow players to hide labels placed by specific other players
- Map editor allows setting the "category" property
This frees up some space for the central stacked widget so the game
doesn't crash to desktop due to requiring a vertical resolution of 487
or more to fit it with the version label and button.
Also, the layout of the version label and button is now simpler as they
are now on their own grid outside the central stacked widget. This also
happens to ensure that the label doesn't end up behind the tip of the
day panel. Whether this is a good thing or not depends on personal
opinion.
(And incidentally, the button no longer has a margin around it. This is
intentional.)
It's on the bottom left corner, just like the version number. It's not
possible to have both the version number label and the button on the
same layer because only widgets on the topmost stacked_widget layer
receive events, and the label can't be on there because it messes up the
layout of the button panels row.
This currently causes the game to abort on 800x480 because the layout
algorithm runs out of space (needs 800x487) due to to the top row on the
dialog's main grid taking up a fixed amount of vertical space. This will
be corrected in a separate commit.
The dialog now includes the game and OS version, and has three tabs with
extra information: the Game Paths tab with the existing contents
inherited from the tgame_paths dialog, the Libraries tab with a table
listing the build/runtime library versions, and the Features tab listing
the status of optional build-time features.
Had to move a lot of code around for this, obviously. Now I have to
decide again where to move the button from Preferences -> General.
This means less clicks when activating modifications in SP.
In order to do this we enable the alternative campaign list which was
previously disabled. A side effect of this is, that completed campaigns
are now seperated from not-played-yet campaigns.
We now automaticly show mp_configure in sp iff there are actually things
to configure. This means if eigher force_lock_settiings was explicitly
set to false or if the [campaign] or one of the [modification] provides
[options] to configure.
This makes it so the grid and its children are only displayed when the
client has mod access to the sever, rather than keeping them visible at
all times and graying them out when not available.