diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3cf1ef6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "deps/SFML"] + path = deps/SFML + url = https://github.com/SFML/SFML.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 78b1ffe..40bcf90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,11 +3,7 @@ project(SFTK LANGUAGES CXX) set(CXX_STANDARD_REQUIRED 23) -include(FetchContent) -FetchContent_Declare(SFML - GIT_REPOSITORY https://github.com/SFML/SFML.git - GIT_TAG 2.6.x) -FetchContent_MakeAvailable(SFML) +add_subdirectory(./deps/SFML) set(ROOT src/) set(CONTAINER src/containers) diff --git a/demo/SarasaUiSC-Regular.ttf b/demo/SarasaUiSC-Regular.ttf new file mode 100644 index 0000000..f0f9ca7 Binary files /dev/null and b/demo/SarasaUiSC-Regular.ttf differ diff --git a/demo/demo1.cpp b/demo/demo1.cpp index 60fdecc..21f14cb 100644 --- a/demo/demo1.cpp +++ b/demo/demo1.cpp @@ -5,8 +5,9 @@ int main() { auto &window = sftk::Window::create(800, 600, L"demo1"); - auto &label = sftk::Label::create(L"hello SFTK.", sftk::Font("SarasaUiSC-Regular.ttf", "", 18)); - label.setColor(sf::Color::White); + window.setBackgroudColor(sf::Color::White); + auto &label = sftk::Label::create(L"hello SFTK.", sftk::Font("../demo/SarasaUiSC-Regular.ttf", "", 18)); + label.setColor(sf::Color::Black); label.setPosition(vec(100.f, 100.f)); window.exec(); } diff --git a/deps/SFML b/deps/SFML new file mode 160000 index 0000000..69ea0cd --- /dev/null +++ b/deps/SFML @@ -0,0 +1 @@ +Subproject commit 69ea0cd863aed1d4092b970b676924a716ff718b