Commit graph

1878 commits

Author SHA1 Message Date
Charles Dang
72a80fed5b Removed GUI_NORMAL__RESOLUTION macro
[ci skip]

Not necessary since the "tiny" resolution was removed a long time ago, and the parameters
would implicitly convert to 0 engine-side.
2018-02-17 17:33:32 +11:00
Charles Dang
ec03dfcd08 Updated GUI2 schema for f4a1abdb9b 2018-02-14 14:48:30 +11:00
Charles Dang
1632afe1af Outro: used script font for text
[ci skip]
2018-02-14 14:40:31 +11:00
Charles Dang
7d647a6d3d Update GUI2 schema for 6bd9740 2018-02-14 09:18:31 +11:00
Charles Dang
0b77514031 Outro: improved text display
[ci skip]

Increased text size to 100 and made use of the light variant.
2018-02-14 04:05:50 +11:00
Charles Dang
b4c220260e MP Join Game: increase gold icon and text size
[ci skip]

Also removed some superfluous tooltips.
2018-02-11 10:36:50 +11:00
Charles Dang
7a7744c943 Game Load: some UI tweaks
[ci skip]

* Improved leader list display
* Made dialog slightly wider to reduce likelihood of a horizontal scrollbar appearing.
  Still not a perfect fix, but it's better.
2018-02-11 10:36:49 +11:00
Jyrki Vesterinen
3b88de6cbc Add sort order dropdown to add-on manager (#1747)
This dropdown allows the player to sort add-ons by name, author, size,
download count, type, or the time of last update or original upload.
Sorting by the last two hasn't been possible in the GUI2 add-on manager
before.

Closes #1747.
2018-02-10 18:06:38 +02:00
Charles Dang
c75ca87517 GUI2/Addon List: improved a bunch of stuff related to inline control buttons
* Flipped the arrow on the Update icon set to point downwards, since it's a download operation.
* Renamed existing small Update icon set Publish, and added downwards version to replace Update.
* Renamed all addon manager icons and their respective button definitions to be clearer.
* Moved unused small icon versions to their own subfolder.
* Added separate Publish inline button to image list. This is now used in all cases to publish,
  regardless of whether the addon has been uploaded previously or not. Prior to this, the Install
  button was used for non-published addons, and the Update one for published ones. This means the
* Refactor addon_list inline button setup to be clearer.
* Made inline Uninstall button display in all cases where an addon was installed, instead of just
  INSTALLED and NSTALLED_UPGRADABLE. It will not display if a publishable addon has not been
  published, however.
* Changed is_local check to match the ADDON_INSTALLED_LOCAL_ONLY. I figured this is a bit more
  robust. TODO: do the same in the addon manager itself?

Art assets credit to @Lordbob
2018-02-10 21:26:33 +11:00
Charles Dang
3b6da9a232 Addon Manager: include outdated addons in dependency check (fixes #1494)
Also added missing border around addon list in Install Dependencies.
2018-02-10 00:36:38 +11:00
Charles Dang
aeed6d5538 GUI2/Chatbox: disable chat history
[ci skip]

This prevents private chat logs being saved in your preferences file. History isn't
currently working anyway, and it seems weird to be saving logs this way, especially
since it also records private messages.
2018-02-09 07:20:51 +11:00
Charles Dang
01105cc924 MP Staging/MP Join Game: always draw leader sprite at 72x72 (fixes #1981)
This is also related to #1932. I fixed leader sprites being cropped in 41e674128f,
and that made sprites in MP Staging always scale to 72x72. However, large sprites like the
Fire Dragon's still drew at full size in MP Join Game since the damn tree nodes are being
recreated when new changes come in (a separate issue I need to fix). This change fixes the
size of leader sprites in both dialogs to 72x72 regardless of sprite size, so we're saved
any similar issues cropping up in the future even once I do fix the excessive node recreation
in MP Join Game.
2018-02-07 03:07:31 +11:00
Matthias Krüger
b11d3fdcbe fix a bunch of typos found by codespell in data directory.
https://github.com/lucasdemarchi/codespell
2018-02-06 23:03:06 +11:00
Charles Dang
c2ead6e56b Addons Manager: updated dialog title
[ci skip]
2018-02-05 22:47:12 +11:00
Charles Dang
4c2cddaa9e Surrender Quit: clearer button/message text
[ci skip]
2018-02-05 16:35:02 +11:00
kallaballa
024b2e7e9b Implement a surrender dialog
This records a surrender command in replays and quits the game.
2018-02-05 00:35:35 +01:00
Charles Dang
e34341145f Campaign Selection: removed excess borders around sort buttons
[ci skip]
2018-01-23 17:12:47 +11:00
Charles Dang
ab2cfa0ac2 Fixup 002b1a3c87 (bad indent)
[ci skip]
2017-12-14 11:15:07 +11:00
Charles Dang
002b1a3c87 MP Staging/Join Game: unified player list handling and added player icons
Previously, MP Staging was using connect_engine::connected_users() to fill in the user list.
However, I noticed that the server was already sending the user list to all clients, including
the host, so I could unify the handling between Staging and Join Game by just using the server
data for both.

I've also added appropriate indicators for host, observer, and self in the list for both dialogs.
Additional host= and observer= status keys are sent by the server for that purpose.

I've also made the server dispatch the player list to the host when a game is created. This is
slightly redundant, since the host is the only player at that point, but it's easier than creating
a user config locally, or using connected_users(), not to mention easier to maintain.

The wesnothd::game::send_user_list function no longer exists early id `description_` is null.
No idea why it did that. It's not even used in the function. Anyway, it needed to be removed in
order for the above change to work.

Speaking of the host's copy of the player list, I haven't touched that. It's still needed for
managing things in the connect_engine. Might simplify things further in the future by delegating
more handling to the server, since it has a lot of the data needed already, but that's a different
project.
2017-12-14 11:12:49 +11:00
Charles Dang
e08350cd17 Revert "rebase commit: implemented a surrender dialog that records a surrender command in replays and quits the game"
This reverts commit 4dda0ad9b2. This feature needs to be
considered further. Right now the design doesn't make sense.
2017-12-06 13:35:28 +11:00
kallaballa
4dda0ad9b2
rebase commit: implemented a surrender dialog that records a surrender command in replays and quits the game 2017-12-05 17:01:06 -06:00
Jyrki Vesterinen
b0c139c16a Chatbox tabs can no longer shrink vertically 2017-11-15 21:03:44 +02:00
Jyrki Vesterinen
506ee85d2d Revert "GUI2: implemented fixed_width and fixed_height keys for all widgets"
This reverts commit 556331ac3f.

Since the keys aren't working, the implementation shouldn't be in the
Git repository. Otherwise some poor soul will attempt to use them and
face additional work afterwards.
2017-11-15 19:04:47 +02:00
Jyrki Vesterinen
18e208e07c Revert "GUI2: removed GUI_FORCE_WIDGET_SIZE macro in favor of fixed_width/fixed_height keys"
This reverts commit 9f386ed563.

fixed_width/fixed_height are broken and completely fail to block the
widget from growing.
2017-11-15 19:04:03 +02:00
Charles Dang
9f386ed563 GUI2: removed GUI_FORCE_WIDGET_SIZE macro in favor of fixed_width/fixed_height keys
[ci skip]
2017-11-11 23:12:14 +11:00
Charles Dang
556331ac3f GUI2: implemented fixed_width and fixed_height keys for all widgets
This is meant to be a cleaner replacement to the [size_lock] widget. Both keys are optional,
in which case the layout engine will assume dynamic sizing for that dimension. Dynamic sizing
will also occur if either the fixed with or height evaluates to 0 or less.
2017-11-11 23:11:24 +11:00
Charles Dang
457d42f200 Removed unused sort_list and iconize_list MP preferences
These have no effect in the GUI2 lobby, nor do I intend to make use of them (plus the lobby has
its own sort controls anyway). I'm assuming they were for the GUI1 lobby.
2017-11-10 14:31:55 +11:00
Charles Dang
71b32cec16 Lobby Main: tweak player list entry borders
[ci skip]

No wonder this list looked messy. The labels didn't have full borders!
2017-11-10 13:05:29 +11:00
Charles Dang
961c8c05d3 MP Lobby: cleaned up WML layout
[ci skip]

This mostly focused on formatting and reducing the number of sub-grids in the player tree area.
2017-11-05 22:22:15 +11:00
Charles Dang
fa14cf65e1 MP Lobby: right-align status text
[ci skip]

This prevents status text from sometimes floating off to the left if the status label shrinks but
a relayout hasn't occurred. In that case, the label widget's area would be larger than needed for
the text, and since left-align is the default setting, the next text gets stuck weirdly aligned.
2017-11-01 11:18:40 +11:00
Charles Dang
b1ad293ccd GUI2: removed unused MP Command Wrapper dialog
This was the equivalent of the Player Info dialog for the old GUI1 MP Lobby, and is now unused.
The new GUI2 lobby uses the aforementioned Player Info dialog. The functionality is basically
the same, though, except the send-private-message interface is more streamlined in the new lobby.
2017-10-29 16:56:16 +11:00
Charles Dang
0737736d3c MP Lobby: completely redesigned game entry layout
I did one of these about a year ago, but in the time since I realize it was honestly really crowded
and had some fundamental problems (for example, the listbox would get a horizontal scrollbar if a game
with a lot of mods was started).

This time around, I've focused on simplicity. The main changes:
* The minimap has been made 10 px larger. This was to accommodate the 5 px borders, so now the actual
  map image is 72x72.
* Game name and scenario name have swapped places, and the latter is now larger.
* Game names are no longer colorized based on the number of vacant slots or whether you can observe
  the game or not.
* The Turns/Slots label coloring has been toned down and been made larger. It is now either white
  (game has started), green (vacant slots available), or yellow (vacant slots available for reloaded game).
* The Turns limit  no longer displays "/-" for games with unlimited turns. Now you just get "Turn n".
* Due to 1bfa170856, proper names of all missing content is displayed. I also got rid of those
  "Unknown Scenario"/"Unknown Campaign" labels in favor of a simple red-color game type token (S or C),
  respectively.
* All game setting icons have been moved to a tooltip attached to an info icon, except those for
  Password Required and Observes Allowed.
* The info icon will also change color (and its tooltip display a message) if the player need to download
  additional content to join that game.
2017-10-29 16:55:42 +11:00
gfgtdf
e3e2747009 use step_size for exp modifer slider 2017-10-29 01:35:50 +02:00
Charles Dang
c2393a55bd Game Stats: made image columns share width
[ci skip]

This fixes (among other things) misaligned team name labels if a leader has died.
2017-10-13 19:47:15 +11:00
Charles Dang
b6847141f2 Addon Manager: enable markup in details title
[ci skip]

This is necessary since addon_info::display_name escapes markup (see 88ebb72b98). Without this,
certain characters like "'" don't display properly. It might be worth revisiting this at some
point and only escape formatting in specific cases where it's used with markup-enabled widgets,
but this is a quick solution.
2017-09-15 06:38:25 +11:00
Charles Dang
d9f1feafd0 Campaign Difficulty: fixup laurel path post-0fef006 (fixes #1985)
[ci skip]
2017-09-13 08:30:03 +11:00
Charles Dang
d707f94830 MP Staging: fixed position of gender image tooltip
[ci skip]

The gender image was growing to fill all available space so the tooltip was showing centered over that area.
2017-09-06 11:01:08 +11:00
gfgtdf
d3277e03d2 disable mp create small_resolution
It looks only acceptable (=without scrollbars, with acceptable minimum size for th game list) with resulutions of at least 1100x900, while the 'default ' resolution looks already good at 1300x700 which is less tatal space then what the small_resolution needs, for anythign smaller than 1300x700 we will then just use the tiny resolution.
2017-09-05 14:42:52 +02:00
Charles Dang
41e674128f MP Join Game/MP Staging: use scaled to size for leader image definitions
[ci skip]

This should fix bug #1932 and prevent cropping of larger sprites, but needs testing.
2017-09-03 17:01:17 +11:00
Charles Dang
84f3e79504 GUI2/Unit Advance: allowed text formatting in advancement name field (closes #1914) 2017-08-26 10:49:06 +11:00
Celtic Minstrel
74cff96475 Vary victory laurel in campaign select, depending on the difficulty beaten at
(No change to the laurel in difficulty select.)
2017-08-14 12:36:08 -04:00
Celtic Minstrel
25a0d099a9 Enable sorting campaign list in chronological or lexicographical order 2017-08-14 12:36:07 -04:00
Charles Dang
470d8956b8 GUI2/Addon List: restored extra version display for upgradable or outdated addons
The old GUI1 addon manager displayed both local and published versions of the addon directly in the list
if the addon was upgradable or outdated on the server. It seems to have gotten lost in the transition, so
this restores it.
2017-08-09 23:24:25 +11:00
gfgtdf
edbefe4e85 fix multimenu button resolution
just liek the other fixes of this type this only 'reverts' multimenu buttons to the prviusly behaviour which is that the smallest resolution is only chosen for 600x800 resolutions, for other bigger resolutions like 601x801 the medium resolution is chosen.
2017-08-07 17:15:39 +02:00
gfgtdf
55f0ccad5c fixes to widget resolutions 2017-07-31 04:37:40 +02:00
Charles Dang
fd7877c26c GUI2/Addon Manager: removed some excessive borders in the low resolution definition 2017-07-31 04:30:13 +11:00
Charles Dang
02ed22b8f2 GUI2/Toggle Button: added medium-sized icon button definition 2017-07-31 04:30:12 +11:00
Charles Dang
5a90290050 GUI2/Image: added scaled-to-size definition 2017-07-31 04:30:12 +11:00
Charles Dang
05210ae1f2 GUI2: fixed some overlay drawing issues with icon toggle buttons
Not sure why, but in some cases the overlay calculations were getting screwed up. This makes them use
the general centered image macro, with accompanying fallback safety checks.
2017-07-31 04:30:11 +11:00
Charles Dang
6f1a13c3a6 GUI2/Image: added tiled-to-size image definition 2017-07-31 04:30:11 +11:00