Commit graph

24919 commits

Author SHA1 Message Date
Charles Dang
ecab22e6aa Help: replaced custom <bold> and <italic> formatting tags with Pango equivalents
[ci skip]
2018-03-26 15:00:04 +11:00
Charles Dang
c198be1fa8 Removed the SDL_TTF and GUI1 font rendering API and associated functions
This removes all functions related to:
* GUI1 font formatting
* GUI1 font rendering
* Manual text surface size calculations
* The font description interface. While it wasn't exclusive to the TTF rendering system,
  it was unused by Pango/Cairo rendering.

A huge chunk of the help browser code was commented out since we don't have font::line_width anymore.
Likewise, a hack was added to the GUI2 text box since we don't have have get_max_height anymore.

font::is_cjk_char was retained (as well as some related helpers) since they might be useful
later.

I'll leave it to someone else to update the CMake/Scons files to remove TTF as a build
dependency.
2018-03-26 14:08:45 +11:00
Charles Dang
b32ccb05dd Help Browser: increased window height
[ci skip]
2018-03-26 12:21:24 +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
2b9c7b1abd GUI2/Canvas: allow formula values for [text] font_size= 2018-03-26 12:03:46 +11:00
Celtic Minstrel
229d2f0483 Allow percentages in [random_placement]num_items= 2018-03-25 20:56:11 -04:00
Celtic Minstrel
e4a2c14177 Allow WFL for [random_placement]num_items= 2018-03-25 20:51:03 -04:00
Celtic Minstrel
4427ee1936
Fix typo in 1dd411a84e 2018-03-25 19:52:22 -04:00
Charles Dang
ebec4d6ce8 MP Login: removed Password Reminder functionality
Resolves #2748.

Essentially, all this did was tell users to go use the forum, so it wasn't worth
it to keep it and solve the infinite loading screen issues it was causing.

The server backend still needs to be cleaned up.

Also removed a dead reference to some "Change Username" button in the Login dialog's
code.
2018-03-26 02:15:53 +11:00
Iris Morelle
3c6bb665c6 Update credits
[ci skip]
2018-03-25 05:35:40 -03:00
Celtic Minstrel
1dd411a84e Support to_location in [move_unit] 2018-03-24 18:32:10 -04:00
Celtic Minstrel
4e52d62963 Support formula= in [variable] ConditionalWML 2018-03-24 18:09:04 -04:00
Charles Dang
bad574f7c8 EI: fixed another Lua syntax error from 3783693cbe
[ci skip]

I misread the intent of that line in the original. It was supposed to clear the
var, not set it.
2018-03-25 06:28:11 +11:00
gfgtdf
83007d4825 remove a [on_redo]
since it was removed in 10561d3e53 this will cause errors. Please make sure it is not used in mainline before you remove something.
2018-03-25 04:20:40 +11:00
pentarctagon
3b5cbc3e3c Add the updated Dunefolk race description.
See: https://forums.wesnoth.org/viewtopic.php?f=32&t=47721&start=375#p624668
[ci skip]
2018-03-23 18:42:11 -05:00
pentarctagon
994e6efa79 Remove deprecated Khalifate references. 2018-03-23 18:42:11 -05:00
Charles Dang
8d1ec6216b Added two missing textdomain headers
[ci skip]

Should fix two of the issues mentioned in 2709.
2018-03-22 22:08:38 +11:00
Lari Nieminen
4d86af796c
EI: Fix Lua syntax error from 3783693cbe
[ci skip]
2018-03-22 09:51:37 +02:00
ln-zookeeper
3be2ff5187 EI S03: Changed Mal-Kallat back to male
He was changed to female in f4d67031a4 even though he's addressed as "brother" in dialogue. Reported on the forums.
2018-03-21 11:25:28 +02:00
Iris Morelle
39b05dd0db wam: Update description and name for Modifications
They are no longer just for multiplayer mode (see issue #1475, commit
a09e2bb858).

[ci skip]
2018-03-21 00:14:41 -03:00
Charles Dang
075a9bac34 Get the GUI2 in-game UI at least appearing
I decided to go with a modular approach, where both in-game and editor UI dialogs inherit
from a single base class, a pointer of which is owned by the display class. That can be
used for common functionality that needs be shared by all in-game dialogs.

Right now the new UI is just static. It works with most stuff, but not key presses. Working
on that...
2018-03-20 04:47:42 +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
5193c7e7bf Help Browser: removed help topic padding 2018-03-19 10:48:06 +11:00
Charles Dang
75639bafd1 Help Browser: fixup topic title layout 2018-03-19 10:48:04 +11:00
Celtic Minstrel
854ade5d5c Help Browser: Show topic title 2018-03-19 10:45:09 +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
231a8ccbf2 Help Browser: implemented viewing of sub-sections/topics 2018-03-19 10:44:01 +11:00
Charles Dang
19eee7e806 Help Browser: improved layout stability and added next/back buttons (non-functional, of course) 2018-03-19 10:43:38 +11:00
Celtic Minstrel
fbd42a7378 Help Browser: Actually show the correct topics with the correct icons
This also fixes the lag when opening help and makes the topic text appear.
(The topic text is not parsed at the moment, though.)
2018-03-19 10:43:25 +11:00
Celtic Minstrel
9902a2df31 Add the advanced prefs entry for the deprecation setting 2018-03-18 16:55:03 -04:00
Charles Dang
ed27b67f1e Port floating textbox/command console to GUI2
The old floating textbox was extremely entwined with the controller_base, play_controller, and menu_handler
classes. controller_base::have_keyboard_focus essentially controlled whether some events were executed based
on whether the floating textbox was open or not. Additionally, those events weren't even reached if a UI dialog
was open at all.

The new design features a singleton console class that can be called from anywhere, not just the game. I've also
decoupled the execution object from play_controller. The relevant functions in menu_handler are now passed to
the console as callbacks.

To work around map events such as clicking not being available if the console was open, I removed the exclusionary
is-in-dialog check from controller_base::handle_event and instead exit early out certain types of events using
controller_base::have_keyboard_focus. As mentioned in the accompanying comment, this isn't the best solution, but
it will do for now.

The new console also isn't fully feature-comparable with the old GUI1 one. The following are still missing:
* The checkbox, for use when sending messages.
* Tab completion.
* A crash occurs when existing the app if a game was exited with the console open.

I'm leaving the old floating_textbox code around for now for reference.
2018-03-19 01:22:18 +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
e30a2aa520 Added static prototype for GUI2 in-game theme 2018-03-19 01:14:00 +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
ln-zookeeper
3cea4790b8 UtBS: Corrected Sun Singer movetype from float to foot 2018-03-18 14:30:02 +02:00
Iris Morelle
0b3f14d63e campaignd: Set port allocation for version 1.14 2018-03-18 17:25:23 +11:00
Charles Dang
a43623ff2d Screenshot Notification: cleaned up and tweaked a few things
* Added textdomain closure missing from 267510ea07
* Avoid use of invalidate_layout by having an em dash in the size field prior to
  saving. That's needed since GUI2 doesn't expand the label's canvas if its text
  is initially empty.
* Use a better button definition for the View button.
* Grouped Save and Close buttons together
2018-03-18 17:01:26 +11:00
Charles Dang
a18522acb8 File Dialog: removed label keys with empty values
[ci skip]

This doesn't do anything.
2018-03-18 17:01:24 +11:00
Celtic Minstrel
5008c72a22
Fixup wml.all_variables 2018-03-18 01:38:39 -04:00
doofus-01
f2cf0f1e5a
defense animation for Quenoth Warrior (will add Champion later) (#2595)
I'm going to merge this, possibly for git-illiteracy reasons, but if this causes problems, it doesn't have to permanently taint the stable branch.  We can fix it later.
2018-03-17 19:06:16 -07:00
Celtic Minstrel
7fcc813438 One more dunefolk tweak
Revert the change to Marauder blade resistance and instead raise Raider blade resistance
2018-03-17 18:52:31 -04:00
Celtic Minstrel
8d74b72031 fixup! Fix missing return in on_event() 2018-03-17 17:21:20 -04:00
Celtic Minstrel
a314876bf2 Use new persistent tags interface for [object] [objectives] [item] 2018-03-17 17:16:23 -04:00
Celtic Minstrel
c266b35528 Fix rabbits AI being broken by save-load 2018-03-17 17:16:22 -04:00
Celtic Minstrel
ddcbb4cb50 Add a more convenient way of registering custom saved game data 2018-03-17 17:16:22 -04:00
Celtic Minstrel
68d545c3be Add a couple more WML utility functions 2018-03-17 16:48:06 -04:00
Celtic Minstrel
d4e08359dd Fix missing return in on_event() 2018-03-17 16:48:04 -04:00
Celtic Minstrel
e776635023 Clear up redundancies in helper compatibility and deprecate the array functions 2018-03-17 16:48:03 -04:00
Celtic Minstrel
4b08a40181 Deprecate wesnoth.set_music 2018-03-17 16:48:02 -04:00
Celtic Minstrel
6e4d09d2a5 Bump up a couple of deprecation levels at @vultraz's request 2018-03-17 16:48:01 -04:00