Commit graph

158 commits

Author SHA1 Message Date
Celtic Minstrel
348d2e1bb2 Some cleanup of GUI2 formulas
This is mainly about shifting WML macro inclusions into a where clause,
especially when they appear multiple times in a specific formula.
2017-04-08 00:58:39 -04:00
Charles Dang
3a3e6fe725 Fixup 03c7b3d
* Cleaner variable set method
* Fix variable name
2017-04-08 15:19:05 +11:00
Charles Dang
03c7b3debd Story Viewer: hide title if there's no title to show, and display text panel borders appropriately
NOTE: not sure what the FIXME seems not to be an issue now. Perhaps due to the grid relayout happening as a result of
`set_vertical_alignment`.
2017-04-08 15:06:10 +11:00
Charles Dang
5fbd4a727b Story Viewer: deployed new alignment set API
The set_origin method worked, but not in every circumstance. For example, if the story box were not aligned to the bottom of the
screen in the initial part, it would not be correctly place. If you resized the screen while the box was not at the bottom, it
would return there. This was due to set_origin being purely temporary - ie, the layout engine did not record the new position,
and when invalidate_layout was called, the default (per the dialog WML) position of 'bottom' was restored.

This new method fixes the above issues. It also fixes an issue the old GUI2 screen had where a top-aligned box would also obscure
any available title.
2017-04-08 14:39:50 +11:00
Charles Dang
3b24361f1a Story Viewer: added proper nav button definitions 2017-04-07 12:19:40 +11:00
Charles Dang
a0ff2a5e96 GUI2: made GUI_CENTERED_IMAGE more robust and deployed it for buttons instead of a custom macro 2017-04-07 12:11:09 +11:00
Charles Dang
a5b795c57a Story Viewer: implemented correct display of panel borders based on story text position 2017-04-07 11:29:47 +11:00
Charles Dang
6bb7bd1017 Use standard color macros for button code
Since we can now specify alpha in the standard ones, there's no need for the duplicates.
2017-03-28 01:07:51 +11:00
Charles Dang
aa57974500 Reduced size of large addon manager action buttons based on feedback
[ci skip]
2017-03-23 11:01:19 +11:00
Charles Dang
adb5ef90ad Demote can_shrink key from global widget scope to label-only
It was causing problems being enabled for all labels (ie, some labels being shrunken when it wasn't desirable),
and it didn't make much sense for all widgets anyway.
2017-03-17 06:21:13 +11:00
Charles Dang
500e087d53 GUI2: deployed fancy toggle panels in a few places
[ci_skip]
2017-03-13 23:11:23 +11:00
Charles Dang
441b0f7691 GUI2: made new toggle panel selection style a separate definition (needs deployment)
The new style isn't appropriate in every context. This temporarily makes the old style default again.
2017-03-13 05:27:49 +11:00
Charles Dang
7ed68f2e42 GUI2: experimental new design for toggle panel selected/focused states 2017-03-12 12:17:31 +11:00
Charles Dang
93eb07ad8b Addon Manager/Addon List: center addon icon in available space 2017-03-10 18:07:39 +11:00
Charles Dang
637642f510 Added definitions for Addon Manager publish/delete buttons 2017-03-09 17:24:00 +11:00
Charles Dang
097867429b Addons Manager: allow installing addons on list row double click (bug #25547) 2017-03-01 09:13:54 +11:00
Charles Dang
f52d6499dc Unit Preview Pane: fixup e2065867a. We only want the default dimensions for the default definition 2017-03-01 08:09:26 +11:00
Charles Dang
22eebc6983 GUI2: allow labels to shrink to avoid scrollbars
This adds a new can_shrink key to widgets that allows the 'no label' codepath of styled_widget::request_reduce_width to be called.
In this case, it allows labels to shrink without forcing window scrollbars.
2017-02-25 07:52:00 +11:00
Charles Dang
afd0fe7efd Scroll Label: add small buffer between the text and scrollbars 2017-02-24 18:17:23 +11:00
Charles Dang
e2065867a6 Unit Preview Pane: set default widget dimensions
This gives the pane some extra height by default so that an initially shown unit will few attacks doesn't
cause a scrollbar to be shown for others with more.
2017-02-24 17:31:23 +11:00
Charles Dang
92a2baa38a GUI2: use more semi-transparent backgrounds for scrollbars 2017-02-24 17:13:15 +11:00
Charles Dang
d46d8c3cb8 Addons List: removed border around containing listbox
Widgets usually leave it up to the dialogs to provide a border. Since this entire widget is wrapped in
a listbox, there's no need to adjust any internal borders.
2017-02-20 13:53:51 +11:00
Charles Dang
f307582334 Addons Manager: layout tweaks 2017-02-10 11:32:57 +11:00
Jyrki Vesterinen
973edcc33a Add-on list: inject the required linked groups
This way it's no longer necessary for the containing window to define the
groups, eliminating possibility for an easy mistake if a developer wants to
create a new window that contains an add-on list.
2017-01-28 18:04:28 +02:00
Jyrki Vesterinen
dc71d9d671 WIP: make the add-on list a widget
The purpose of this change is ability to create more dialogs which present
a list of add-ons, such as a GUI2 version of the "Install Dependencies"
dialog.

This change is still highly incomplete. First of all, I disabled inline
install buttons and ability to sort the add-on list. In addition, a lot of
functionality that belongs in the add-on list widget is still in the GUI2
add-on manager instead. It is also notable that the widget relies on
several linked groups being defined in the window.

I plan to finish the transition to the add-on list widget, and address the
problems in the previous paragraph, in the future. The linked group issue
is going to require a lot of work in particular: I plan to either make
linked groups grid-specific instead of window-specific (like they are now)
or allow widgets to inject linked groups to the containing window. Either
way, I'm going to change the operation of GUI2 fairly deeply.
2017-01-21 22:57:51 +02:00
Charles Dang
320e85d907 GUI2: renamed text size macros
[ci skip]
2016-12-17 00:45:01 +11:00
Charles Dang
0fc5ab92a3 GUI2: added a background for filter text boxes instead of using a 'Filter' label
[ci skip]
2016-12-17 00:45:00 +11:00
gfgtdf
28df71d13a add unit preview pane hp xp mp tooltips (#897) 2016-12-08 18:25:54 +01:00
Celtic Minstrel
8041a0964e Fix missing GUI2 label link colour
Someone decided to specify it in Pango format, which the WML parser
interprets as a comment, resulting in an empty string.

[ci skip]
2016-11-27 17:38:51 -05:00
Jyrki Vesterinen
8f40462116 Size lock widget, the WML part 2016-11-15 22:41:48 +02: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
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
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
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
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
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
7ad4ba4083 Tooltips: some small tweaks to visuals 2016-10-05 10:52:29 +11:00
Ignacio R. Morelle
5375ad838f gui2/ttext_box: Move selection highlight to the right place 2016-10-03 20:06:30 -03:00
Ignacio R. Morelle
b1fe37b90b gui2/ttext_box: Restore selection highlight lost in version 1.13.3
It was unexplainedly dropped by commit
67cf95a5af.
2016-10-03 20:01:31 -03:00
Charles Dang
30d7df8094 Fix blurring not being displayed for box_display panels (such as in the titlescreen) 2016-10-02 13:49:04 +11:00
Charles Dang
9721910d98 Initial implementation of GUI2 MP Staging dialog (Connect + Wait) 2016-09-20 05:34:31 +11:00
Charles Dang
8609955b74 Refactored square/minimal button definition code
* Reduced used of macro arguments slightly
* Made overlay images centered instead of stretched to size
2016-09-20 03:42:07 +11:00