Celtic Minstrel
57efa5cf47
Ad f_color to GUIVariable wiki page
2017-04-09 02:07:24 -04:00
Celtic Minstrel
d536d6ab76
Implement a destructor subscription system for formula_callable
...
This allows the variant_callable to store a shared_ptr to its callable while ensuring that
callables that were allocated on the stack or as part of a larger structure are not
double-freed.
2017-04-08 19:17:48 -04:00
Celtic Minstrel
508a493736
GUI2 Canvas: Draw rectangle fill before border
2017-04-08 18:29:17 -04:00
Celtic Minstrel
f016ed96f4
GUI2 Canvas: Enable filled rounded rectangles
2017-04-08 18:28:26 -04:00
Celtic Minstrel
2dbdc7ec66
GUI2 Canvas: Enable drawing filled circles
2017-04-08 18:04:07 -04:00
Charles Dang
0d9806df59
GUI2/Canvas: fixed comment formatting causing a compiler warning
2017-04-09 04:59:57 +11:00
Celtic Minstrel
76dcfcb32f
GUI2 Canvas: Implement rounded rectangle shape
...
Currently it's outline only.
2017-04-08 08:30:00 -04:00
Charles Dang
0fe6c32951
Small fixup to 5efc6a807f
...
Forgot that using a static lambda w/ name capture wouldn't work since 'name' is different every draw.
2017-04-06 09:43:39 +11:00
Charles Dang
5efc6a807f
GUI2/Canvas: cleaned up some formatting
2017-04-06 09:36:13 +11:00
Charles Dang
8b14059e8b
GUI2/Canvas: added override specifiers
2017-04-06 09:04:39 +11:00
Charles Dang
c8ac77da42
GUI2/Canvas: implement WFL action context
...
Right now this is only for the image shape, but it can be expanded later.
2017-04-06 09:04:21 +11:00
Charles Dang
8bf345cb4f
GUI2/Canvas: use emplace_back when constructing shapes
2017-04-04 17:51:18 +11:00
Celtic Minstrel
e6045b17c6
Rename game_logic namespace to wfl and move variant class into it
2017-04-03 04:31:38 -04:00
Charles Dang
1878095cbb
GUI2/Canvas: use tile_surface for tile scaling instead of custom implementation
...
Should hopefully be more efficient than manually constructing the surface with multiple blit_surface calls.
2017-03-28 18:24:42 +11:00
Charles Dang
b8ce26a0f9
GUI2/Canvas: pass canvas variables to shape members as ref instead of const ref
...
This will allow a shape to insert a variable into the global context.
2017-03-28 13:24:30 +11:00
Charles Dang
1a231c7fdc
GUI2/Canvas: add flag for immutable shapes
...
Immutable shapes aren't removed when the canvas shapes are set.
2017-03-24 17:45:37 +11:00
Charles Dang
1de4b375f6
GUI2: allowed appending data to canvas
2017-03-21 15:16:40 +11:00
Celtic Minstrel
b4dc11ce36
Belated 2017 copyright update
2017-03-19 10:05:38 -04:00
Jyrki Vesterinen
09d9054e4a
Stop calling adjust_surface_alpha() with SDL_ALPHA_OPAQUE
...
The function doesn't do anything if that value is passed, except if
adjust_surface_alpha() has been called for the same surface before with a
different value.
The only case that remains is floating_label.cpp line 123, since in that
case the alpha *is* changed few lines earlier.
2017-02-28 23:29:40 +02:00
Charles Dang
f70f1b37e4
Avoid surface copying when rendering text
...
This was a small proposed change as part of PR #844 . While that PR is rather outdated at this point, this seemed like
a simple, useful change.
2017-02-17 05:39:22 +11:00
Celtic Minstrel
3f0485aaa4
Store link colour as color_t
...
Currently, formulas treat a colour as an array of components.
This could be improved.
2016-12-11 00:01:25 -05:00
Charles Dang
0c18c9cb20
CVideo: removed get_screen_surface in favor of getSurface
...
They do the same thing, and the latter was more widely used.
2016-12-07 00:27:10 +11:00
GregoryLundberg
5667fa26ac
Fix C4456 scope_logging_object hides previous local declaration
2016-12-03 14:09:55 -06:00
Celtic Minstrel
b61f8411b6
color_t: Rename empty() to something more appropriate
...
Also plus_clipped -> blend_add
2016-11-30 11:27:28 -05:00
Charles Dang
a8517a234d
Made pango font rendering use color_t
2016-11-30 16:58:34 +11:00
Charles Dang
cd90652bec
GUI2/Canvas: made use of color_t::empty
2016-11-30 15:42:11 +11:00
Charles Dang
d0dc711403
GUI2: deploy color_t
2016-11-30 06:39:25 +11:00
Charles Dang
3203a8de10
GUI2: convert internal color handling to use SDL_Color
2016-11-23 19:39:12 +11:00
Celtic Minstrel
67ea79d86f
Rename some GUI2 files to match the contained class
2016-11-19 17:16:10 -05:00
Celtic Minstrel
3c0470ad93
Rename GUI2 auxiliary types to avoid t- prefix
2016-11-09 01:27:30 -05:00
Celtic Minstrel
8c929585aa
Rename core GUI2 types to drop t- prefix
2016-11-09 01:24:25 -05:00
Celtic Minstrel
749f68716d
Rename GUI2 canvas classes to avoid t- prefix
2016-11-09 01:17:14 -05:00
Celtic Minstrel
77cace19db
Rename ttext class to avoid t- prefix
2016-11-09 01:17:14 -05:00
Charles Dang
188231cd03
Refactored SDL_TTF constants out of ttext
...
Do note that for some reason using the default_bold label definition with this change made an underline
appear. I changed the style checks to use == instead of & (bitwise AND) and that fixed the problem. If
that's wrong, someone feel free to fix that.
2016-10-17 20:53:48 +11:00
Gregory A Lundberg
86adfc47f8
GCC complains about float/double and useless cast
2016-10-16 10:55:09 -05:00
Chris Beck
1336306884
move font_options, text.?pp to font folder
...
also fix indentation in previous commit
2016-10-15 06:32:37 -04:00
Ignacio R. Morelle
b3cf75196c
gui2/canvas: Allow overriding color alpha in [line] with a formula
...
The color attribute specifically doesn't support formulas. Adding
support for formulas to it would present us with the issue that commas
are already part of the formula language, so we'd need to update all
existing instances accordingly. So, instead, there's this short hack
used for a very particular piece of functionality coming in the next
commit.
2016-10-12 02:00:42 -03:00
Jyrki Vesterinen
af733360a8
Fix a bunch of MSVC2015 compiler warnings about hiding declarations
...
This commit still doesn't fix all of them. I decided to leave alone
cases where variables with the same name are assigned in multiple
conditions of the same if...else if...else statement, and cases where a
scope logging macro is used multiple times in the same scope. In any
case, this commit greatly reduces the warning count on MSVC2015 and makes
new warnings much easier to spot.
2016-10-06 00:11:56 +03:00
Ignacio R. Morelle
7fa70375e1
gui2/canvas: Fix zero-width rectangles being painted 1 px-wide
...
This fixes the selection highlight for textboxes glitching into view as
a 1 px-wide highlight on the left end when there isn't an active
selection.
2016-10-04 01:43:40 -03:00
Charles Dang
9c239d1fab
Prevent copy of top border drawing when mousing over widgets with blurred parent widget backgrounds
...
I have no idea why this works
2016-09-11 13:42:12 +11:00
Charles Dang
6758ef48d3
Some fixes and optimizations to the GUI2 canvas
2016-09-10 17:13:25 +11:00
Charles Dang
e993e2820b
Refactored GUI2 canvas to use an SDL_Renderer context
2016-09-10 13:46:25 +11:00
Charles Dang
6130c668c4
Use cleaner format for formatter() when possible
2016-08-05 11:58:42 +11:00
Charles Dang
563947e1b3
Refactored GUI2's uses of boost::intrusive_ptr
2016-07-25 09:28:43 +11:00
Celtic Minstrel
982394fe3a
Remove custom FOREACH macro in favour of range-for
2016-04-01 12:08:05 -04:00
Celtic Minstrel
3ac7f8d970
NULL -> nullptr
...
A few cases of NULL were missed, since changing them led to errors
(Mainly instances where it was passed to a boost::function)
2016-03-31 00:42:38 -04:00
Celtic Minstrel
6307b9459c
Move most of gui/auxiliary to gui/core to reflect its true nature
2016-03-20 23:18:48 -04:00