Commit graph

736 commits

Author SHA1 Message Date
Charles Dang
01d4c6a03b Experimental Lobby: fixed some broken image paths 2015-12-07 02:29:16 +11:00
Ignacio R. Morelle
dab5668e4d gui2/tmp_cmd_wrapper: Regroup mod options into a grid that's hidden by default
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.
2015-06-01 23:04:03 -03:00
Mark de Wever
e74fb902e3 Set the minimum width for a listbox cell.
Backported from master 02b761b24e, fixes bug #22046.

Thanks to shadowm for reminding me to backport this patch.
2014-07-15 20:34:11 +02:00
Ignacio R. Morelle
eee57afbd2 gui2/tchat_log: Use a separate proper label for the page number text
This replaces the page number slider with a "minimal" variant slider and
an adjacent label widget whose text we enter manually.

The label format is "<PAGE>/<COUNT>" and it's untranslatable. Hopefully
this shouldn't cause any localization issues since it's all numbers and
we currently can't use alternative numeral systems anyway.

I'm leaving the page slider's maximum_value_label attribute intact just
in case this needs to be reverted later, since it's going into the 1.12
branch too.
2014-06-19 02:34:00 -04:00
Ignacio R. Morelle
2ffdcb7e45 gui2/tslider: Add minimal variant without a text label
The default variant's text label is both inflexible in content (can't
customize the format for non-edge values) and layout (reserves way more
space than it needs at a time for its text label, often resulting in
huge horizontal gaps between a slider and an adjacent widget). This
makes it unsuitable for use in gui2::tchat_log.

This new minimal variant will be wired into gui2::tchat_log next.
2014-06-19 02:33:56 -04:00
Ignacio R. Morelle
799e09d94a gui2/tchat_log: Add a button to copy the filtered page contents to clipboard
This copies the current contents of the dialog to clipboard. The button
currently lacks a tooltip because the tooltip has the potential to cause
map labels to glitch through the dialog when displayed (see commit
eab3e6fb64 and bug #22176).

(The tooltip should also remain commented-out because this is a backport
to 1.12.)
2014-06-14 23:44:52 -04:00
Ignacio R. Morelle
474f30c759 gui2/taddon_filter_options: Make SP/MP campaigns checkbox use Sentence case
For consistency with all other non-menu/listbox checkboxes.

pofix rule included and applied.
2014-06-14 23:26:39 -04:00
Ignacio R. Morelle
6a56da5f0f gui2/tgamestate_inspector: Add a button to copy contents to clipboard
This copies the contents of the main display area to clipboard. The
button currently lacks a tooltip because the tooltip causes map labels
to glitch through the dialog when displayed (noticeable in e.g. the test
scenario). I'll file a bug for this issue later using a (commented-out)
line introduced by this commit as a test case.
2014-06-10 23:05:33 -04:00
Mark de Wever
06b7144e1a Set the minimum size for a listbox cell.
The images drawn for a selected cell require a minimum size.

The change is part 2/2 of the fix for bug #22144.
2014-06-09 19:11:56 +02:00
Chris Beck
0958a31890 Purge "human_ai" controller type
This is a fixup of bugfix #18829 (which was commit
736ceaa6c7)
2014-03-19 17:23:04 -04:00
Ignacio R. Morelle
d36fbdc578 gui2/ttransient_message: Add missing standard padding around image cell 2014-03-13 01:10:05 -03:00
Ignacio R. Morelle
1346264734 gui2/tmessage: Add missing standard padding around image cell 2014-03-13 01:09:39 -03:00
Ignacio R. Morelle
220f86036e gui2/tgamestate_inspector: Reindent 2014-03-02 05:14:35 -03:00
Ignacio R. Morelle
47ffd9ea2d gui2/tscreenshot_notification: New GUI2 dialog shown when taking screenshots
It includes the following features:

 * A cleaner and more structured message display
 * Buttons to copy the screenshot file path to clipboard or open it with
   an external application defined by the platform
 * An additional button to browse to the screenshots folder using an
   external file manager defined by the platform

It also breaks the scons build. This will be addressed by the next
commit.
2014-02-21 02:32:21 -03:00
Ignacio R. Morelle
a9298e1d6d gui2/ttext_box: Add a 'transparent' backgroundless variant for WML [message] 2014-02-21 00:35:38 -03:00
Ignacio R. Morelle
f28e74c0bd gui2/ttext_box: Workaround text AA issue with transparent background
... by making it not transparent.

For some reason, on Linux the antialiasing of the textbox text contents
looks slightly off when the background is a transparent (a != 255)
color. This does not happen when a solid color (a == 255) is used
instead.

Since Cairo AA is broken horribly with ClearType on Windows atm I'm not
really sure this specific bug also happens there.

To keep the intended effect of ebc214ff12,
I took a couple of screenshots of the textbox widget in both its enabled
and disabled states and averaged the background colors with the GIMP to
get an approximation of the result of blending the transparent overlay
from the GUI__BACKGROUND_COLOR_* macros with the standard dialog
background.
2014-02-21 00:12:52 -03:00
Ignacio R. Morelle
87c57ca6c0 gui2/ttheme_list: Replace unwieldy message text 2014-02-19 06:40:56 -03:00
Ignacio R. Morelle
a9c93201c8 theme ui, gui2/ttheme_list: New theme chooser, implement [theme] description
Adds a new 'description' attribute to [theme] and replaces the previous
instance of gui2::tsimple_item_selector used to select themes with a
brand new dialog (that's actually based on it) that allows for
displaying theme descriptions in a nice format.

Because some of the theme names aren't obvious enough to players
("UnitBox" comes to mind), we ought to provide descriptions of each
theme to save people some clicks since it's not possible at the
moment to switch the theme mid-game and see the results immediately.
2014-02-19 06:39:51 -03:00
Ignacio R. Morelle
eadb22f67b gui2/tlabel: Add gold_small variation 2014-02-19 06:39:51 -03:00
Ignacio R. Morelle
9edee42b7e gui2/teditor_edit_side: Let the team id/name input boxes grow horizontally 2014-02-15 22:28:17 -03:00
Ignacio R. Morelle
ebc214ff12 gui2/ttext_box: Use standard GUI__BACKGROUND_COLOR_* background colors
Note that this widget lacked a background before, making it look like
a simple label with a border and caret. In my opinion, the subtle
background is an improvement that highlights the widget's "dynamicness",
and makes it more obvious when it is disabled.
2014-02-15 22:21:42 -03:00
Ignacio R. Morelle
ecf62cdaf2 gui2/ttoggle_button et al: Make GUI__BACKGROUND_COLOR_DISABLED transparent
Affects ttoggle_button "listbox_text" and "listbox_text_with_icon", and
ttoggle_panel.
2014-02-15 22:15:22 -03:00
Ignacio R. Morelle
a4340c9375 gui2/tchat_log: Use GUI_FORCE_WIDGET_MINIMUM_SIZE macro instead of local hack
Turns out there already was a somewhat more elegant solution in use for
the GUI2 lobby and macroified for everyone else. It uses a
stacked_widget with a spacer within instead of the awkward 2x2
{[central widget,spacer],[spacer,spacer]} grid we were using here.
2014-02-15 21:58:04 -03:00
Ignacio R. Morelle
393ebb447c gui2/tprogress_bar: Use same background as listbox (children) widgets
Replaces the solid RGB background with the generic RGBA background
defined in GUI__BACKGROUND_COLOR_ENABLED.
2014-02-15 21:54:36 -03:00
Ignacio R. Morelle
e992f4eb84 gui2/ttoggle_button et al: Use transparent color background to match GUI1
Replace the definition of GUI__BACKGROUND_COLOR_ENABLED (used by the
"listbox_text" and "listbox_text_with_icon" variations of
ttoggle_button, and the default ttoggle_panel variation) so that it
matches the gui::menu::bluebg_style GUI1 menu style definition in
src/widgets/menu_style.cpp:29.

These controls are commonly used with gui2::tlistbox, so this change is
intended to make GUI2 listboxes in general have the same overall
appearance as GUI1 menus after the dialog background graphics were
replaced as part of the UI overhaul in 1.11.x.

The previous background definition for these GUI2 widgets was a solid
color, rgb(21, 19, 19), meaning that they necessarily wouldn't match
the standard bluebg_style GUI1 menu style, which uses rgba(0, 0, 0,
0.35).

Alpha 255 * 0.35 = 89.25, hence the new definition of
GUI__BACKGROUND_COLOR_ENABLED has an alpha channel value of 89 and not a
multiply of 10 or 2 like 90.
2014-02-15 19:38:35 -03:00
Mark de Wever
3c9f91a8af Enables blurring in the title screen.
Shadowm figured out why blurring didn't work properly in the title screen
and created a proof-of-concept patch. This patch is heavily based upon
that patch.
2014-02-15 18:55:13 +01:00
Ignacio R. Morelle
b0950f006c gui2/tchat_log: Hack to set a minimum cell size to 200x250
Because this window many contain a lot of text in both directions,
having it change size dynamically every time the log page is switched or
a new text filter is entered can be extremely annoying for the player.

Setting the scroll_label's parent (now ancestor) cell's minimum size to
something that isn't 0x0 mitigates the issue to some extent. Better than
nothing, I guess.

(Tested with a screen resolution of 800x480.)
2014-02-14 06:13:03 -03:00
Ignacio R. Morelle
1cdc5df63d gui2/tchat_log: Let the log scroll_label grow horizontally 2014-02-14 05:22:10 -03:00
Ignacio R. Morelle
b11bd24711 gui2/tchat_log: Use 'description' scroll_label type for the log 2014-02-14 05:21:52 -03:00
Ignacio R. Morelle
29f08abd6f gui2/taddon_description: Let the description area grow horizontally
Let it grow to fill the space available when it's greater than the
description box's requested size (e.g. for very short descriptions).
2014-02-14 05:07:31 -03:00
Ignacio R. Morelle
cdaf2b14aa Move data/hardwired/tips.cfg to data/tips.cfg
Since the GUI2 titlescreen took over, the path to tips.cfg is not
hard-coded in the engine anymore; in fact, this commit also updates that
path, which is in data/gui/default.cfg.
2014-02-13 22:28:02 -03:00
Ignacio R. Morelle
e4bed0ce96 gui2/twml_error: Add a button to copy the WML error report to clipboard 2014-02-13 06:24:03 -03:00
Ignacio R. Morelle
798c7402f1 gui2/twml_error: Add a post_summary field for advice on reporting add-on errors 2014-02-13 06:24:02 -03:00
Ignacio R. Morelle
9eeab249d1 gui2/twml_error: Limit maximum dialog size to 600x600 for readability 2014-02-13 06:24:02 -03:00
Ignacio R. Morelle
2659dfcb9d gui2/twml_error: Use the description scroll_label variant for the report 2014-02-13 06:24:02 -03:00
Ignacio R. Morelle
458b36d007 gui2/twml_error: Handle an optional list of faulty files separately
This allows us to be more self-contained and require less logic in the
instantiation site for preparing the report for display.

This requires adding a new row and label for displaying the list of
faulty files, which will be hidden when the list is empty or not
provided in the display() static member function.
2014-02-13 06:23:46 -03:00
Ignacio R. Morelle
d5a34a1460 gui2/twml_error: New GUI2 dialog to be used for WML parser/pp errors
This dialog features separate summary and detail sections along with a
small heading for the latter in bold face. More features may be added
later as part of my work on improving WML diagnostics, but for now we
have the bare minimum for better message formatting with a content
structure more or less identical to the current one.
2014-02-12 04:16:57 -03:00
Ignacio R. Morelle
a30c50d567 gui2/tlabel: Add 'default_bold' variant for text in bold 2014-02-12 04:16:56 -03:00
Mark de Wever
5da495122a Add a new GUI2 tooltip.
The placement of tooltip is controlled by the WML of the GUI engine. The
code is not used yet, only available with a proof-of-concept define named
DEBUG_TOOLTIP.
2014-02-08 21:13:08 +01:00
Mark de Wever
8ff55378cc Add reevaluate_best_size_ function for a window.
This function will be used in the tooltip window to evaluate whether the
final window size is proper. It also lets the window really handle
functions.
2014-02-08 21:10:31 +01:00
Ignacio R. Morelle
0f1cbae347 gui2/taddon_description: Display first/last upload dates 2014-02-07 23:17:21 -03:00
Ignacio R. Morelle
46aded67e2 gui2/taddon_description: Allow the URL textbox to become wider as needed 2014-01-04 15:32:43 -03:00
Ignacio R. Morelle
03f1dea50a gui2/teditor_edit_scenario: Unify some grids for a more orderly appearance 2014-01-04 12:30:51 -03:00
Ignacio R. Morelle
39b216cb2e gui2/teditor_edit_scenario: Change XP modifier slider step and minimum values 2014-01-04 12:30:51 -03:00
Ignacio R. Morelle
a5ac4d06c6 gui2/taddon_description: Use a [stacked_widget] so URL controls may be hidden
The URL controls overlay a placeholder "None" label using the
[stacked_widget]. When there's no URL to show, the URL controls are
hidden. When there is a URL to show, the placeholder is hidden instead.
2014-01-04 12:30:51 -03:00
Ignacio R. Morelle
684a9bfe71 gui2/tscroll_label: Undefine local macro before EOF 2014-01-04 11:32:27 -03:00
Ignacio R. Morelle
e555bc63e6 gui2/taddon_description: Align the description grid and box to the left
Fixes the description box and header being centered on the dialog when
the description box and/or its container grid are narrower than the
column containing them.
2014-01-04 10:56:48 -03:00
Ignacio R. Morelle
f176119c90 gui2/taddon_description: Replace url_go button tooltip with a more passive one 2014-01-04 07:59:07 -03:00
Ignacio R. Morelle
5442b2c843 gui2/taddon_description: Add controls to display an add-on's feedback URL
This includes a textbox to display the URL, and two buttons to copy and
visit the URL.
2014-01-04 07:19:41 -03:00
Ignacio R. Morelle
46b9bd3a47 gui2/taddon_description: Completely redesigned dialog layout
The new layout merges some information rows together to increase
available vertical space for displaying additional fields later, and
uses a 'description' scroll_label type for the add-on Description field
to improve its appearance, especially for multi-line descriptions.

This also makes the dialog non-click-dismissable and adds a Close button
on the bottom right corner. Since we're about to add more interactive
controls, there's really not much of a choice about the click-dismiss
option; it gets disabled for such dialogs automatically.
2014-01-04 07:19:41 -03:00