[Commits] [wesnoth/wesnoth] 08d25b: GUI2: refactor typed_formula to make code cleaner
GitHub
noreply at github.com
Sun Apr 9 13:03:00 UTC 2017
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 08d25b05427e113cfdcf2b5d71137dadac89ffa4
https://github.com/wesnoth/wesnoth/commit/08d25b05427e113cfdcf2b5d71137dadac89ffa4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-04-09 (Sun, 09 Apr 2017)
Changed paths:
M src/gui/auxiliary/typed_formula.hpp
Log Message:
-----------
GUI2: refactor typed_formula to make code cleaner
Essentially, I delegated the call to variant::evaluate to the operator() function and not the execute
specializations, which are now passed he resulting variant instead.
That and a ton of formatting and a bunch of moving stuff around.
Commit: c379b7ccc9c440ca935228fe78241d63a9b841f6
https://github.com/wesnoth/wesnoth/commit/c379b7ccc9c440ca935228fe78241d63a9b841f6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-04-09 (Sun, 09 Apr 2017)
Changed paths:
M src/color.cpp
M src/color.hpp
Log Message:
-----------
Added getter for null color
Commit: 61aa601a6ff63fdcaca3545c1ade4d8851fa6b3f
https://github.com/wesnoth/wesnoth/commit/61aa601a6ff63fdcaca3545c1ade4d8851fa6b3f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-04-10 (Mon, 10 Apr 2017)
Changed paths:
M data/gui/schema.cfg
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: converted other shapes to use formulas for their color handling
For rectangles, color_t::null_color() needs to be specified as the default since typed_formula
utilizes the default type ctor if no default value is provided. In this case, color_t's default
ctor returns opaque white, which doesn't mesh well with GUI2's drawing.
Other shapes don't get this default value, since color is essentially mandatory for them, whereas
in rectangles either fill_color or border_color may be omitted.
Compare: https://github.com/wesnoth/wesnoth/compare/8ed11e750632...61aa601a6ff6
More information about the Commits
mailing list