Commit graph

158 commits

Author SHA1 Message Date
josteph
8481927a5a GUI: Fix the direction of the arrow on a listbox sort column header.
This affects the files list in the the "Load Game" dialog.
2018-06-20 18:47:11 +11:00
Charles Dang
c5d6f695dd GUI2/Chatbox: limit input to 256 characters (fixes #3267)
[ci skip]
2018-06-18 20:28:33 +11:00
Charles Dang
dba3d409fc MP Staging: made the faction select button about as prominent as you can get
[ci skip]

Thanks to grzywacz for pointing out the possible use of the unit icon.
2018-04-09 00:22:42 +11:00
Charles Dang
1903b05ab1 GUI2/Label: tweaked link color
[ci skip]
2018-04-03 15:25:44 +11:00
Charles Dang
db5abb7e63 GUI2/Text Box: refactored hint text interface
Previously, I had implemented the hint text ("Search)" and image (the magnifying glass)
as a custom text box definition. This caused some problems, though. Since the string was
hard-coded as part of a WFL formula, it couldn't be translated (see #2709 and #2732). It
also wasn't expandable to any other usecase.

Instead, I've added two new hint_text= and hint_image= keys to [text_box], wrapped the
"Search" text and magnifying image path in a helper macro, and refactored the default
definition to display the hint text and image when appropriate.

This also fixes a minor issue where selected text wouldn't remain highlighted when the
box wasn't focused when using the filter definition (it did with the default one).

This should fix the untranslatable "Search" text issue mentioned in both issues above.
The new string is in the wesnoth-lib textdomain.
2018-03-26 12:11:34 +11:00
Charles Dang
1167e3e78b Some build fixups to reflect changes since the help commits were originally made 2018-03-19 10:48:48 +11:00
Charles Dang
71a89de7b2 Help Browser: properly implement toggling by clicking the book icons 2018-03-19 10:45:06 +11:00
Charles Dang
8396b535c8 GUI2/Window: draw background image first instead of last
Originally was going to do this as workaround for the background tiling over the borders,
but I fixed the root cause of that instead. Still, this just makes more sense.
2018-03-19 01:22:05 +11:00
Charles Dang
41f921bd38 GUI2/Canvas: refactor surface blitting out of drawing routines
This entirely refactors surface blitting out of the canvas. Instead, each canvas owns a texture. This texture
is completely redrawn any time the canvas if marked dirty, else the result is cached and drawn to the screen
each draw cycle.

All windows are now redrawn every draw cycle. The use of the cached canvas textures means there's no noticeable
performance difference (likely a performance gain, actually) from using surface blitting.

There's still some code to clean up and a few things to fix.
2018-03-19 01:13:23 +11:00
Charles Dang
3a90f86674 Addressed more whitespace issues from #2613
[ci skip]
2018-03-12 03:48:59 +11:00
Charles Dang
471c9e876a Addressed a large chunk of the whitespace issues from #2613
[ci skip]
2018-03-09 11:37:00 +11:00
Charles Dang
894cc6a3cc GUI2/Toggle Panel: switched to procedural border drawing for semi-transparent message variant
[ci skip]

This matches the regular toggle panel now.
2018-02-23 15:45:02 +11:00
Charles Dang
5f1005d5ce GUI2/Chatbox: removed room listbox header
[ci skip]

Headers don't do anything with horizontal listboxes.
2018-02-22 16:19:49 +11:00
Charles Dang
b35663e1bf GUI2/Chatbox: handle main border in including windows
[ci skip]

This is consistent with other widgets.
2018-02-22 15:13:48 +11:00
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
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
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
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
Jyrki Vesterinen
b0c139c16a Chatbox tabs can no longer shrink vertically 2017-11-15 21:03:44 +02: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
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
Charles Dang
67e3c76fca GUI2/Addon List: restrict markup to name and installation status fields
We don't want markup in any of the other fields. I still need to find a slightly better solution for the name
field, though. We don't want users to be able to use markup unnecessairly, but we do need markup to highlight
the names of ready-to-upload addons.

This fixes warnings about unescaped ampersands in the Author field.
2017-07-27 01:08:24 +11:00
Charles Dang
76173a9c72 GUI2/Panel: remove border from small-res box_display_no_blur_no_border definition 2017-07-26 22:02:48 +11:00
gfgtdf
fbc7652a0c fix panel_box_display.cfg window_width,window_height 2017-06-19 20:44:37 +02:00
gfgtdf
1917078900 fixup 96fecea66d
that commit onyl changed the resolution choosing procedure for windows
not for widgets which made that code more complicated. This commit also
addsa  workaround for < 800x600 widgets to the c++ code so that we no
longer have to think about this in the .cfg files
2017-06-16 02:03:33 +02:00
gfgtdf
96fecea66d make [resolution] window_width/height, the minimum required window size 2017-06-13 20:25:47 +02:00
Celtic Minstrel
5d43078ba4 [WIP] Implement IME support for GUI2 textboxes (#1758)
Implement IME support for GUI2 textboxes
2017-06-11 16:47:46 -04:00
Celtic Minstrel
72b98ad7e1 Unit Preview Pane: Remove a relic of an older implementation 2017-05-14 10:09:58 -04:00
Celtic Minstrel
cbc4af1a20 Add blinking text cursor to focused textbox
Unlike the previous implementation, the blinking cursor now only applies
to the focused (frontmost) window.
2017-05-12 15:34:16 -04:00
Celtic Minstrel
e5ff9f9584 (Multi)menu Buttons: Reduce default size at low resolutions
This fixes the scrollbar in MP Staging, but causes the buttons to be
too small in some cases (eg the resolution button in prefs)
2017-04-16 11:07:54 -04:00
Charles Dang
9b326e21db Menu Button/Multimenu Button: re-enable text markup (fixup 1ea440fed) 2017-04-17 01:39:11 +11:00
Celtic Minstrel
65deb19bcc Addon List: Limit width of version column 2017-04-16 10:30:03 -04:00
Charles Dang
4f50559af9 GUI2 WML: consistent styling, don't use strings for bools 2017-04-16 17:19:03 +11:00
Celtic Minstrel
1793133a59 Fix menu_button widget trying to be two things at the same time.
The menu_button is now only a drop-down menu that supports a single selection.
A new multimenu_button widget supports a drop-down menu with multiple selections.
The new multimenu_button widget displays its current selection while not open.
2017-04-16 00:08:50 -04:00
Celtic Minstrel
cb333dbfdf Addons List: Hide some columns on lower resolutions 2017-04-15 21:34:37 -04:00
Charles Dang
1ea440fed3 Menu Button: fix overlap of long text and down arrow (bug #25320) 2017-04-16 07:09:02 +11:00
Charles Dang
120aa0e6ca Story Viewer Label: ensure sufficient top padding for text
[ci skip]
2017-04-16 00:31:32 +11:00
Charles Dang
e0751c1f54 GUI2: implement ability to set label alpha 2017-04-13 04:01:01 +11:00
Jyrki Vesterinen
aa762995e2 Add tooltips to add-on manager buttons 2017-04-11 21:32:53 +03:00
Charles Dang
e369e10eee Story Viewer: disabled title background for now
It's causing placement issues with some titles...
2017-04-11 03:37:18 +11:00
Charles Dang
8ed11e7506 GUI2/Canvas: removed [line] alpha= key in favor of evaluating color as a formula 2017-04-09 22:04:11 +11:00
Celtic Minstrel
753df47137 Story viewer: Use a slightly fuzzy rounded rectangle as the title background 2017-04-08 19:00:36 -04:00
Celtic Minstrel
9b2eac1920 Simplify storyscreen title definition 2017-04-08 07:22:37 -04:00
Celtic Minstrel
e46b10af0e Story viewer: Shrink translucent background behind title to a box 2017-04-08 03:37:41 -04:00
Celtic Minstrel
88420357b0 Story Viewer: add translucent background behind title 2017-04-08 17:56:51 +11:00