Commit graph

1566 commits

Author SHA1 Message Date
Celtic Minstrel
cd9fc1aa2d Fix changed window IDs 2016-11-10 15:35:56 -05:00
Charles Dang
5872f52879 Fix some missed rename instances and wrong widget/window IDs 2016-11-10 11:04:09 -05:00
Charles Dang
da5ca8efce GUI2: bunch of small internal layout tweaks to dialogs using unit preview panes
These should have littke to no obvious effect, except if one of these dialogs is made fixed-size or
extra space becomes available for some reason.
2016-11-05 19:53:06 +11:00
Charles Dang
37a450fe19 Unit Preview Pane: don't force a minimum height for the tree view
This causes a window scrollbar to appear on 600h (or > min tree height + height of rest of widget) resolutions.
I'll need to deal with some minimum size-setting on a dialog basis.
2016-11-05 16:21:10 +11:00
Charles Dang
72f4c95b2b MP Staging, MP Join Game: use gold_small definition for Connected Players header 2016-11-05 16:01:03 +11:00
Charles Dang
f4870a86d0 Cleaned up kate modlines 2016-10-24 23:32:07 +11:00
Charles Dang
600e0c47b0 Chat Log: made dialog fixed-size and cleaned up WML 2016-10-24 23:29:16 +11:00
Charles Dang
231cb1a4a4 Preferences: demote Show Halos to Advanced 2016-10-24 16:46:42 +11:00
Charles Dang
d54f440cb9 Game Load: use small label for leader name
This is to reduce the number of leader names that would cause a list resize.
2016-10-23 00:39:31 +11:00
Charles Dang
80881de369 Made Preferences and Game Load windows fixed-size
Both are slightly wider than before. In the latter case, 750 would have matched the old automatic width, but
for some reason, the window's scrollbars were showing. Need to investigate further.
2016-10-23 00:35:21 +11:00
Charles Dang
06570d093e Removed 'draw outline around widget' stuff 2016-10-23 00:07:24 +11:00
Charles Dang
71bc3f356b Added GUI_WINDOW_FIXED_SIZE_CENTERED macro 2016-10-22 23:58:00 +11:00
Charles Dang
41672422a6 Colorize spacer lines 2016-10-21 02:43:39 +11:00
Charles Dang
339b4f3ee1 Enabled some commented out tooltips now that bug #22176 is fixed 2016-10-19 22:36:57 +11:00
Charles Dang
1964d71023 Updated GUI2 schema for fb6c85e70b 2016-10-18 00:59:22 +11:00
Ignacio R. Morelle
6e5633929b gui2/ttext_: Disable blinking cursor
There's an issue with textboxes across separate window instances (e.g.
when firing up the New Folder dialog in the file dialog) each getting a
blinking cursor simultaneously displayed on the screen due to timer
events persisting even when a GUI2 window isn't running. This may cause
repaint issues since the whole textbox may need to be redrawn each time
the timer fires, so it's best to disable it until I figure out a better
way to implement a unique global blinking cursor.
2016-10-14 03:33:45 -03:00
Charles Dang
918e8e4102 Preferences: small tooltip grammar correction 2016-10-13 00:06:01 +11:00
Ignacio R. Morelle
007a76d72f gui2/tfile_dialog: Add support for user-defined bookmarks
Users can add and remove bookmarks from the end of the bookmarks list.
These correspond to the currently viewed directory and have its name as
their label. It's not possible to remove hardcoded bookmarks. A bookmark
may only be removed after selecting it.

In order to ensure that users will be able to remove their own bookmarks
if they match predefined paths, the bookmarks bar now matches items from
bottom to top instead of the other way around.
2016-10-12 03:11:01 -03:00
Ignacio R. Morelle
eb3bc1f0ce gui2/tfile_dialog: Rearrange some elements
The path label above the fileview now stands on its own without the
"Location:" label since it's self-explanatory for anyone who's managed
to get this far and install Wesnoth. The Delete and New Folder buttons
have had their order reversed so that destructive actions are on the
side opposite to the dialog's control buttons (OK/Cancel), the "Places"
heading no longer has a colon.
2016-10-12 03:11:01 -03:00
Ignacio R. Morelle
d1951b40b9 gui2/tfile_dialog: Add a bookmarks bar
The bookmarks bar holds predefined bookmarks (as in the stuff
src/desktop/paths.hpp exposes) and allows users to easily browse to them
in a single click. It will eventually be possible for the user to add or
remove custom bookmarks as well.

I might add a method to disable specific irrelevant bookmarks later, not
sure (e.g. nobody cares about the preferences dir when trying to find
wesnothd).
2016-10-12 03:11:01 -03:00
Ignacio R. Morelle
7630651ea0 gui2/ttext_box: Improved color scheme for the text box borders
Like in commit 7531e7ef2e, text boxes now
use the same border color scheme as buttons and sliders.
2016-10-12 02:00:42 -03:00
Ignacio R. Morelle
f1d89ba4a3 gui2/ttext_: Add a blinking cursor to textbox widgets
This is used by all widgets that inherit from the textbox abstract
class, ttext_. The cursor is updated every 750 ms by toggling the
cursor alpha every time. When the cursor position is set by a method
(e.g. in reaction to a keyboard event), the cursor is reset to full
alpha, and the blink timer restarted.
2016-10-12 02:00:42 -03:00
Ignacio R. Morelle
b3cf75196c gui2/canvas: Allow overriding color alpha in [line] with a formula
The color attribute specifically doesn't support formulas. Adding
support for formulas to it would present us with the issue that commas
are already part of the formula language, so we'd need to update all
existing instances accordingly. So, instead, there's this short hack
used for a very particular piece of functionality coming in the next
commit.
2016-10-12 02:00:42 -03:00
Charles Dang
0ac4c0fcfa Removed some unnecessary minimum size forcing
Using grow factors properly removes the need for these as long as the chatboxes are set to a minimum size
2016-10-12 15:41:38 +11:00
Charles Dang
cea34e70bd MP Lobby: made gamelist expand to max available height
For some reason, I swapped these grow factors in the past since the chatbox was growing... not sure why.
It works fine like this, and plus, the chatbox is now equal in height those in Staging and Join.
2016-10-12 15:38:13 +11:00
Ignacio R. Morelle
7531e7ef2e gui2/tslider: Improved color scheme for slider grooves
This makes it so the "selected" segment of the groove (towards the
slider origin) is drawn with a brighter color than the "empty" segment
(opposite from the origin). Since this obviously wouldn't work with
RGB #FFFFFF, and the color is too distracting anyway (it was pretty much
the only widget using the general *text* color), we now use the standard
UI border colors to match buttons, checkboxes and so on. This should
hopefully help with harmonizing Wesnoth's UI color scheme across the
board.

For this purpose we also introduce a macro for a darker/shaded disabled
text color, used for the unselected segment of disabled sliders.
2016-10-11 23:43:52 -03:00
Charles Dang
860325d3df Supposed to be with f1d2488529 2016-10-12 13:42:23 +11:00
Charles Dang
262188c82e MP Join Game: converted dialog to team-based tree view like MP Staging 2016-10-12 12:58:10 +11:00
Charles Dang
3197db5bf6 MP Staging: small UI tweaks 2016-10-11 19:41:33 +11:00
Ignacio R. Morelle
abc9a599b6 gui2/tgame_cache_options: Relabel OK as Close 2016-10-11 01:12:05 -03:00
Ignacio R. Morelle
c458e3e180 gui2: Make dialogs with fs browse buttons use the new browse icon 2016-10-11 01:09:22 -03:00
Charles Dang
1f1855300d GUI2/Stacked Widget: removed [stack] wrapper around [layer] and use the latter directly
All dialog WML changes in this commit consist of removing [stack] tags and reducing subsequent subtag indent
by one layer.
2016-10-10 18:55:52 +11:00
Charles Dang
25eb58abb6 New Browse button definition and images
Edited version of the Editor Load icon, sans the arrow
2016-10-10 18:23:36 +11:00
Charles Dang
b662e03dad Tooltips: fixed a tiny shading inconsistency 2016-10-10 14:36:51 +11:00
Charles Dang
aabc655c6c MP Staging: redesigned dialog to group sides by team 2016-10-09 21:57:37 +11:00
Charles Dang
628c0ac784 Unit Preview Pane: display race name next to icon instead of in tooltip 2016-10-07 22:24:21 +11:00
Charles Dang
da72c43c3b MP Connect: tweak Host Networked Game tooltip
There's no need to confuse new players with the 'wesnothd' terminology
2016-10-07 18:37:00 +11:00
Charles Dang
77ea3b274d Tooltips: enable markup 2016-10-07 18:30:02 +11:00
Charles Dang
6a28eff9db Tooltips: subtle blue tint 2016-10-07 16:49:35 +11:00
Charles Dang
726100e9c2 Few further tweaks and cleanup for e76db219ac 2016-10-07 10:49:18 +11:00
Charles Dang
e76db219ac Tooltips: improved design yet again 2016-10-07 10:11:02 +11:00
Charles Dang
87f1f05677 MP Staging, MP Join Game: made side numbers really big 2016-10-06 21:22:19 +11:00
Charles Dang
147caf83cc GUI2: some formula formatting cleanups 2016-10-05 19:34:28 +11:00
Charles Dang
f7100f2315 File Dialog: more sensible size 2016-10-05 18:22:42 +11:00
Charles Dang
bf1c038882 File Dialog: used fixed-size window instead of dynamic 2016-10-05 17:47:57 +11:00
Ignacio R. Morelle
0f83718965 gui2/tfile_dialog: Set maximum dialog height 2016-10-05 03:06:43 -03:00
Ignacio R. Morelle
409b61f5be gui2/tfile_dialog: We can delete folders too 2016-10-05 03:06:43 -03:00
Ignacio R. Morelle
6e1f6bb686 gui2/tfile_dialog: Initial port of the filechooser dialog to GUI2
This provides, as far as I can tell, all the filechooser functionality
that is actually in use in Open File mode except for the "type-ahead"
option that is used to set filename extension hints.

There's some newly-introduced border cases courtesy of Boost.Filesystem
that I really feel we shouldn't worry about for now:

 * // is handled weirdly thanks to BFS honoring the POSIX provision for
   implementation-defined behavior regarding it.
 * UNCs on Windows are not supported. Just like in mostly everywhere
   else in Wesnoth. Same applies to \\.\, \\?\ and \??\.
 * Non-directory path components on Windows are not handled very
   gracefully (particularly obvious with volumes mounted as NTFS
   junction points, or symbolic links for the Documents folder on
   Wine) due to quirks in BFS's path::canonical() method and how it
   relies on dereferencing individual path components to resolve dot
   entries.

Haven't tested all callers yet, they are still using the original
filechooser entry points for now. I need to remove those and make
everyone use gui2::tfile_dialog directly before this can be merged to
master.
2016-10-05 03:06:43 -03:00
Charles Dang
7ad4ba4083 Tooltips: some small tweaks to visuals 2016-10-05 10:52:29 +11:00
Charles Dang
e25aa4ac2c MP Create Game: use tooltips for mod descriptions 2016-10-04 19:36:29 +11:00