diff client/main.cpp @ 142:473e1eb96363

Client: add simple splashscreen_state, #712
author David Demelier <markand@malikania.fr>
date Thu, 28 Sep 2017 12:36:15 +0200
parents b80d37e71b87
children 43a26de57fe7
line wrap: on
line diff
--- a/client/main.cpp	Thu Sep 28 06:40:09 2017 +0200
+++ b/client/main.cpp	Thu Sep 28 12:36:15 2017 +0200
@@ -20,8 +20,19 @@
 
 #include <malikania/client/client.hpp>
 #include <malikania/client/connection.hpp>
+#include <malikania/client/state/splashscreen_state.hpp>
 #include <malikania/client/window.hpp>
 
+namespace res {
+
+namespace {
+
+#include <kingthings_spike.hpp>
+
+} // !namespace
+
+} // !res
+
 int main()
 {
     boost::asio::io_service service;
@@ -29,6 +40,8 @@
     mlk::client::connection conn(service);
     mlk::client::window w;
     mlk::client::client clt(service, conn, w);
+    mlk::client::font f(std::string(res::kingthings_spike, sizeof (res::kingthings_spike)), 64);
 
+    clt.set_state(std::make_unique<mlk::client::splashscreen_state>(std::move(f), "Malikania Kingdom"));
     clt.run();
 }