63974 Commits

Author SHA1 Message Date
Charles Dang
a8e5036c24 editor: No panel background for top bar status areas 2016-03-16 05:14:05 +11:00
Charles Dang
a4c4f18a7c Don't show any images for buttons in menu bar 2016-03-16 05:01:26 +11:00
Charles Dang
8e8b4a3835 Added empty images for an imageless menu button
This is a huge hack, but it's how GUI1 was set up and it's not worth
trying to refactor it any differently.
2016-03-16 05:00:58 +11:00
Charles Dang
33a68d33fd Remove background from theme status boxes and tweak position slightly 2016-03-16 00:13:53 +11:00
Charles Dang
4f106b4d1f GUI2: gave windows procedurally-drawn minimal borders 2016-03-15 21:57:53 +11:00
Charles Dang
06788955c4 GUI2: added macro for border color 2016-03-15 21:35:49 +11:00
Charles Dang
53af40b2f3 ttip: improved look of floating tooltips further
This makes the whole thing procedurally drawn
2016-03-15 21:35:13 +11:00
Charles Dang
fe4623e152 Fixup canvas background drawing again
When fixing it up the previous time, I didn't include border size, meaning
rectangles with both borders and fill_color drew over the borders.
2016-03-15 21:31:08 +11:00
ln-zookeeper
30bd1c1324 Cleaned up stray pixels and fixed alignment of reef4 2016-03-15 01:52:49 +02:00
Charles Dang
f92936125b ttip: few more tweaks to floating tooltip look 2016-03-15 09:05:20 +11:00
Charles Dang
4ebf8a258b GUI2: use floating tooltips (almost) everywhere 2016-03-15 07:53:33 +11:00
Charles Dang
75c3446c77 ttip: tweaked layout of floating tooltips 2016-03-15 07:53:32 +11:00
Charles Dang
2fdc08d92e ttip: added a separate window definition for floating tooltips
The design is based on the 'menu' style window, with a tint applied.
2016-03-15 07:53:31 +11:00
Charles Dang
b311135482 tsynced_choice_wait: removed a CVideo argument from pre_show missed in 11b941ab58f1 2016-03-15 04:55:45 +11:00
Celtic Minstrel
0f39cc3fe0 Fix function case 2016-03-14 13:15:33 -04:00
Celtic Minstrel
7d9a0d90b9 Allow array attribute values in Lua config syntax
These are converted to a comma-separated string.
It does NOT insert parentheses if an element contains a comma.
2016-03-14 13:15:33 -04:00
Celtic Minstrel
ecb3dc6c46 Error if looping tags lack [do] 2016-03-14 13:15:04 -04:00
Celtic Minstrel
c1b6060e4b Fix cleanup of [foreach] scope 2016-03-14 13:15:03 -04:00
Charles Dang
3f582310c9 GUI2: removed CVideo argument from tdialog::post_build
Like with pre_show, any uses of this parameter could be replaced by twindow::video().
2016-03-15 02:24:49 +11:00
Charles Dang
11b941ab58 GUI2: removed CVideo argument from tdialog::preshow
In all but three cases, this argument was unused. In those remaining cases,
the argument could be replaced by twindow::video().
2016-03-15 02:15:28 +11:00
gfgtdf
b2fff5afd9 removed wesnoth.put_unit() warning
this warning triggered also when using u:to_map(x,y) which is clearly
not intended.
2016-03-14 14:42:28 +01:00
gfgtdf
7a8957e918 use std::vector to store starting locations 2016-03-14 14:42:24 +01:00
gfgtdf
f1052b0c27 remove map::operator[](int)
this operator was confusing because usingn map[i][j] would mean that the
border_size is added to x but not to y, It is better to use
operator[](map_location) or to use tiles_[x][y] directly so that this
issue doesn't appear.
2016-03-14 14:42:20 +01:00
gfgtdf
bf2ec4df82 improve map::overlay()
we now read the config into objects at the start of that method, this means
that we don't have to do those lookups inside that loop anymore.

This also allows us to change that parameter of that function from config to
std::vector<overlay_rule> later when we want to use that
function from non-wml code.
2016-03-14 14:42:17 +01:00
gfgtdf
e89abbeb91 cleanup unit_creator 2016-03-14 14:42:12 +01:00
gfgtdf
310ba26704 remove unused queued_event parameter from WML_HANDLER_FUNCTION 2016-03-14 14:42:09 +01:00
gfgtdf
986550c040 move [teleport] actionwml to lua. 2016-03-14 14:42:05 +01:00
gfgtdf
ff5a37a064 lock unit_map while running filter or applying effects
This specially prevents lua form removing the unit that is currently
filtered or that currently gets effects, which would cause crashes
otherwise.
2016-03-14 14:42:01 +01:00
gfgtdf
43275cd9ba don't copy units when recruiting/recalling
units are rather big objects so we don't want to copy them unless
needed.
2016-03-14 14:41:57 +01:00
gfgtdf
a91cb9ad0b add limit=n parameter to standard unit filters
and specially to wesnoth.get_units
2016-03-14 14:41:53 +01:00
gfgtdf
413d8cf3d2 implement wesnoth.get_unit(string) directly
this is sure faster than applying a filter to all units on the map which
is what the previous implementation did.
2016-03-14 14:41:49 +01:00
gfgtdf
50a9a25ae7 move [unstore_unit] definition to lua
This also adds a 'color' parameter to wesnoth.float_label. It was already
previously possible to set a labels color using pango markup, but to
implement [unstore_unit] i need to support the color= syntax as given
by [unstore_unit]

This also adds a 'fire_event' parameter to wesnoth.put_unit to specify
whether the 'unit_placed' event is fired, this is needed to implement
fire_events=yes/no in [unstore_unit] but its also generally useful
for the same reason why [unstore_unit] has this parameter.
2016-03-14 14:41:45 +01:00
Charles Dang
e13cf1e591 Procedurally draw combobox borders
This avoids issues with the borders looking bad when scaled
2016-03-14 22:27:37 +11:00
Charles Dang
b512ad2143 Make [message] use wesnoth.highlight_hex() 2016-03-14 09:42:04 +11:00
Charles Dang
497aee86ab Undeprecate wesnoth.highlight_hex()
wesnoth.select_hex has problems with simply highlighting units without displaying
their movement range. If you set its third argument to false, the unit gets
selected, but no hex cursors appears around it. Using this allows us to simply
highlight a location with the hex cursor, independent of unit presence (select_hex
works funny if no unit is present).
2016-03-14 09:41:12 +11:00
Charles Dang
2ffa1ffa85 tunit_preview_pane: use unicode multip sign instead of em dash for attack/strike label 2016-03-14 03:20:28 +11:00
Charles Dang
02993cbaeb Removed empty resize_lock struct and resize_monitor class
Once again, SDL1.2 functionality that does nothing in SDL2.
2016-03-14 02:07:29 +11:00
Charles Dang
e656751938 Refactor out display class from storyscreen functions 2016-03-14 01:46:47 +11:00
Charles Dang
c486e4b040 trectangle: fix draw rects sometimes being inaccurate (fixup a30a62787387)
Apparently, the manual rect calculations sometimes (eg, with the Progress Bar widget)
resulted in incorrectly placed rectangles being drawn. Using the bare dimension
values fixes this problem.
2016-03-14 00:49:01 +11:00
Charles Dang
c37e9c4a7f Removed display_format_alpha() function
This function's contents were SDL1.2 only, and in SDL2 only return NULL. This
resulted in create_optimized_surface() always returning the passed surface and
get_surface_portion() to potentially return NULL erroneously (if optimize_format
was true, which doesn't seem to be the case anywhere).

However, there haven't been any discernible bugs that resulted from either of these
behaviors, so it should be investigates whether create_optimized_surface() is still
necessary, since it's been operating for a while now simply returning its passed
surface.
2016-03-13 23:45:02 +11:00
Charles Dang
4435b25523 Remove calls to empty update_whole_screen() function
The function's contents were SDL1.2 only, and it now does nothing in
SDL2.
2016-03-13 22:17:36 +11:00
Charles Dang
5010f54e11 Fix [message][option] being black on hover (bug #24478) 2016-03-13 21:15:52 +11:00
Charles Dang
1fcf7ed993 Render titlebox over storyscreen background (bug #24510) 2016-03-13 21:05:16 +11:00
Charles Dang
8abb0cf3a5 GUI2: set restore flag on a few more dialogs 2016-03-13 20:41:46 +11:00
Charles Dang
40ffa6ba88 Merge pull request #451 from aginor/todofix
Fix TODO by removing workaround for a resolved SDL issue.
2016-03-13 19:56:57 +11:00
Andreas Löf
064944fce6 Update release notes and changelog RE SDL 1.2 removal 2016-03-13 21:49:38 +13:00
Charles Dang
a30a627873 trectangle: fill entire rectangle at once instead of doing line-by-line drawing 2016-03-13 16:51:44 +11:00
Charles Dang
5d9c6b13b1 tpreferences: allow composite slider labels to grow to fill space
Instead of using a scroll label.
2016-03-13 14:40:07 +11:00
Andreas
8da954b4a0 Merge pull request #627 from aginor/remove_sdl_1.2
Remove SDL 1.2 support from Wesnoth
2016-03-13 12:36:39 +13:00
Andreas Löf
1d56fbb384 Remove superfluous keyboard files
These files were used to provide a compatability layer between SDL1.2
and SDL2 for the hotkeys implementation. As SDL1.2 was taken out,
these files were now empty and superfluous.
2016-03-13 11:34:39 +13:00