Now have a simple color palette system.
This commit is contained in:
parent
0272ba8540
commit
48a7f72411
6 changed files with 93 additions and 2 deletions
20
tests/palette.cpp
Normal file
20
tests/palette.cpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <fmt/core.h>
|
||||
#include <string>
|
||||
#include "palette.hpp"
|
||||
|
||||
using namespace fmt;
|
||||
|
||||
TEST_CASE("color palette test", "[color-palette]") {
|
||||
palette::init();
|
||||
sf::Color expect{10, 10, 10, 255};
|
||||
|
||||
auto gui_text = palette::get("gui/text:dark");
|
||||
REQUIRE(gui_text == expect);
|
||||
|
||||
gui_text = palette::get("gui/text:mid");
|
||||
REQUIRE(gui_text != expect);
|
||||
|
||||
expect = {100, 100, 100, 255};
|
||||
REQUIRE(gui_text == expect);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue