comparison mlk-client/main.cpp @ 193:209bdaa13a49

Tests: rename directories to match targets
author David Demelier <markand@malikania.fr>
date Sat, 27 Oct 2018 07:16:28 +0200
parents client/main.cpp@bfc6b9c9081a
children 0a285d62ace7
comparison
equal deleted inserted replaced
192:74afc5a41c83 193:209bdaa13a49
1 /*
2 * main.cpp -- main client file
3 *
4 * Copyright (c) 2013-2018 David Demelier <markand@malikania.fr>
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 #include <iostream>
20 #include <chrono>
21 #include <thread>
22
23 #include <malikania/client/color.hpp>
24 #include <malikania/client/button.hpp>
25 #include <malikania/client/window.hpp>
26
27 using namespace mlk;
28 using namespace mlk::client;
29
30 int main()
31 {
32 window w;
33
34 //SDL_RenderSetScale(w.get_renderer(), 2, 2);
35 button b("click me");
36
37 b.set_position({50, 50});
38 b.set_size({100, 20});
39
40 w.set_drawing_color(color::from_name("white"));
41 w.clear();
42 b.draw(w);
43 w.present();
44 std::this_thread::sleep_for(std::chrono::seconds(10));
45
46
47 #if 0
48 boost::asio::io_service service;
49
50 mlk::client::connection conn(service);
51 mlk::client::window w;
52 mlk::client::client clt(service, conn, w);
53
54 clt.set_state(std::make_unique<mlk::client::login_state>(clt));
55 clt.run();
56 #endif
57 }