51364 Commits

Author SHA1 Message Date
Simon Forsyth
cd9bc8e64f Validate moves from previous evaluations before executing them 2012-12-29 12:32:17 +00:00
Matthias Schoeck
bf7c8b9662 Use new syntax to include default (RCA) AI components 2012-12-29 05:28:32 +00:00
Ignacio R. Morelle
08e60f36e2 gui1: Forward keyboard-based selection or cursor manipulation events...
...from non-editable textboxes

This effectively removes the selection/cursor manipulation part of
2012-12-23T06:10:31Z!shadowm@wesnoth.org. Without obvious visual cues as to what textbox has the current
focus it is only good for confusing users. Additionally, at least two
existing GUI-based IRC programs seem to do without selection/cursor
manipulation on the channel/query view box.
2012-12-29 03:26:11 +00:00
Ignacio R. Morelle
d8d4ce1654 gui1: Rework textbox event forwarding to eliminate duplicate...
...(actually quadruplicate) events.  Changed from 2012-12-23T06:10:46Z!shadowm@wesnoth.org.

Due to the way focusing works, the focus switch in the middle of the
forwarding action would create a duplicate event for the origin textbox,
resulting in a duplicate event for the target (a total of four events to
process).

Instead, make the implementation of gui::textbox::handle_event()
forwarding-aware, and provide a wrapper for the events engine
implementation to use by default.
2012-12-29 03:25:05 +00:00
Ignacio R. Morelle
fccd55815b gui1: Make the content of disabled textboxes look like it
More specifically, blit with 30% opacity, and omit the highlight
background whenever there's a selection.
2012-12-29 03:24:47 +00:00
Ignacio R. Morelle
dd30163027 mp: Toggle the Filter textbox's enabledness, not its editability
Solves various focus-stealing issues introduced by 2012-12-23T06:10:31Z!shadowm@wesnoth.org.
2012-12-29 03:24:33 +00:00
Ignacio R. Morelle
b1171cb3a1 gui1: Make disabled textboxes look and behave like...
...non-editable textboxes used to do

This should solve various focus-stealing issues related to the Filter
textbox in the old-lobby since non-editable textboxes gained the
ability to have focus in 2012-12-23T06:10:31Z!shadowm@wesnoth.org.
2012-12-29 03:24:05 +00:00
Matthias Schoeck
7eb57b40dd Update AI helper library files...
...and adjust experimental multiplayer AI code accordingly
2012-12-29 00:36:54 +00:00
Fabian Müller
80f617b044 Fixed the spelling in a comment. 2012-12-28 23:55:07 +00:00
Simon Forsyth
0f15ff94db Bugfixes and improvements for experimental multiplayer AI.
Avoid crash near end of games with turn limits.

Properly identify poison immune units.

Better timing for keep switching.

Handle more weapon specials involving damage.
2012-12-28 21:49:35 +00:00
Simon Forsyth
3673f79c8a Update changelog 2012-12-28 21:36:52 +00:00
Simon Forsyth
c854a14aa8 Avoid infinite loop if fewer than two ships are alive. Fixes bug #20389 2012-12-28 20:24:50 +00:00
J. Tyne
55ea21ac78 Add support for the undo stack tracking when shroud updates are delayed. 2012-12-28 02:00:08 +00:00
J. Tyne
9fb4d91b48 Have [effect] apply_to=defense modify absolute values...
...if not replacing the old values.

Thus positive numbers will always make the unit easier to hit, while
negative numbers always make it harder. (bug #20242)

This allows WML authors to not worry about special cases like horsemen
in forests. In addition, should it be decided to change how that case
is defined (currently by setting forest=-70), that change could be
done without changing the WML for effects that add to (or subtract
from) defenses.
2012-12-27 00:20:45 +00:00
J. Tyne
edd9ea0286 Enforce the minimum movement costs and resistances...
...when those are modified by an [effect].
2012-12-26 20:45:17 +00:00
J. Tyne
7178438765 Remove vestiges of the --smallgui command line parameter,
...which was made unnecessary in 1.9.5.
2012-12-26 19:29:38 +00:00
Nils Kneuper
c0b1202aed updated Portuguese (Brazil) translation 2012-12-24 11:07:00 +00:00
Ignacio R. Morelle
17a029275e gui1: Restore focus to the original textbox...
...after resending relevant events to its input target

This effectively fixes bug #5877, *again*. 2012-12-23T06:10:46Z!shadowm@wesnoth.org introduced quite a
regression in the form of switching the focus permanently as soon as the
user presses the modifier key in Shift+<arrow> and Shift+C, requiring
improbable typing skills to get e.g. a Shift+C event _before_ a solitary
left or right Shift event.
2012-12-23 07:54:43 +00:00
Ignacio R. Morelle
65067325c0 Revert "gui1: Ignore solitary (i.e. not as modifiers) left or right Shift...
...events on textboxes"

This reverts commit 2012-12-23T07:29:01Z!shadowm@wesnoth.org.

While ignoring solitary modifier keys is good and all, it may be
potentially counterproductive to do so if SDL's definitions of such ever
change, and this is not the right approach to handling the actual issue.
2012-12-23 07:54:31 +00:00
Ignacio R. Morelle
9c53819899 gui1: Ignore solitary (i.e. not as modifiers) left or right Shift events...
...on textboxes

This allows selection manipulation shortcuts to work on the lobby
backlog textbox as intended by 2012-12-23T06:10:31Z!shadowm@wesnoth.org. This cropped up as a
side-effect of 2012-12-23T06:10:46Z!shadowm@wesnoth.org. Since neither left or right Shift yield
printable characters, it makes no sense to process them when not
acting as key modifiers.
2012-12-23 07:29:01 +00:00
Ignacio R. Morelle
0cc774c6e3 Attaching bug #5877 to the changelog entry for 2012-12-23T06:10:31Z!shadowm@wesnoth.org 2012-12-23 06:19:56 +00:00
Ignacio R. Morelle
855de445e0 mp: Set the lobby chat entry textbox...
...as the edit target for the backlog textbox
2012-12-23 06:10:58 +00:00
Ignacio R. Morelle
f29b5b3758 gui1: Make it possible to define an edit target textbox...
...for a non-editable textbox

Content-altering events on a non-editable textbox are forwarded to the
edit target textbox as long as it is editable itself.
2012-12-23 06:10:46 +00:00
Ignacio R. Morelle
fae847e48e gui1: Allow selection manipulation and copy for non-editable textboxes
In particular, multiline textboxes. And more specifically, the old
(default) lobby backlog textbox. This is a rather revolutionary feature.
Wesnoth is truly this century's greatest pioneer in user interface
design and implementation.

A few caveats:

 * In order for this to not conflict with other textboxes' selections, I
   had to make it possible for non-editable textboxes to get focus. In
   the particular case of the lobby, the result can be visually
   confusing since we don't currently have a way to show that a
   non-editable textbox has focus. This will be addressed by another
   commit later.

 * Moving the mouse for the first time after the old lobby is shown
   causes the filter box to display a black rectangle at the start when
   it is grayed out. This appears to be a side-effect of the way mouse
   events are handled in GUI1 textboxes, and it can actually happen
   without this commit too if one *clicks* on the filter textbox
   instead.

 * Shift+Up, Shift+Down, Shift+PgUp, Shift+PgDown do not do anything
   yet.

 * Shift+Home, Shift+End adjust the selection relative to the start of
   the box's overall contents as opposed to the current line.
2012-12-23 06:10:31 +00:00
Ignacio R. Morelle
55fddd00b3 Fix the presesent in-game command line autocompletion feature...
...so it actually works at all

Because of the questionable console commands handler design, the command
list isn't populated until the handler's dispatch() method is called for
the first time. We can call it with an empty command string to work
around this; the empty command is ignored and we get the command list
populated so we can actually build an autocompletion dictionary with it.
Previously, the autocompletion dictionary would be always empty.
2012-12-23 04:15:40 +00:00
Mark de Wever
987f00a54b Update changelog. 2012-12-22 13:40:33 +00:00
Mark de Wever
8793c0798c Remove an unused function.
Issue found by Clang 3.2.

(The issue is caused by a recent cleanup.)
2012-12-22 13:40:30 +00:00
Mark de Wever
faac8d7e3a Comment out unused private fields.
Issue found by Clang 3.2.
2012-12-22 13:40:28 +00:00
Mark de Wever
3aef1e9626 Comment out an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:40:25 +00:00
Mark de Wever
e66595fa7a Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:40:22 +00:00
Mark de Wever
6c65ef76c2 Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:40:19 +00:00
Mark de Wever
637436dba6 Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:40:15 +00:00
Mark de Wever
b034b4ea92 Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:40:11 +00:00
Mark de Wever
81fbb8dfe3 Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:40:08 +00:00
Mark de Wever
e1a715d42a Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:40:05 +00:00
Mark de Wever
c1faa508bc Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:40:02 +00:00
Mark de Wever
7eea90df59 Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:39:59 +00:00
Mark de Wever
62d2ea0f9e Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:39:56 +00:00
Mark de Wever
f2eb85d641 Remove an unused private field.
Issue found by Clang 3.2.

Also comment out some, due to this change, unused code.
2012-12-22 13:39:54 +00:00
Mark de Wever
349d8e66e1 Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:39:51 +00:00
Mark de Wever
3be772c6c3 Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:39:48 +00:00
Mark de Wever
9a76c51b44 Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:39:45 +00:00
Mark de Wever
e968112838 Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:39:43 +00:00
Mark de Wever
0effb1bb61 Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:39:40 +00:00
Mark de Wever
abe63628be Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:39:37 +00:00
Mark de Wever
3feb7c865e Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:39:35 +00:00
Mark de Wever
8d465edf34 Remove an unused private field.
Issue found by Clang 3.2.

Also renamed the 'height' member to the width is really is.
2012-12-22 13:39:32 +00:00
Mark de Wever
264e822bab Remove an unused private field.
Issue found by Clang 3.2.
2012-12-22 13:39:29 +00:00
Mark de Wever
2f0f2e05e8 Remove a duplicate code path.
Issue found by cppcheck.
2012-12-22 13:39:25 +00:00
Simon Forsyth
5d7c5f6fe6 Improvements to experimental multiplayer AI recruiting 2012-12-22 03:03:48 +00:00