2018-12-23 07:17:08 -05:00
|
|
|
#pragma once
|
|
|
|
#include "window.hpp"
|
2018-12-23 12:25:22 -05:00
|
|
|
#include "image.hpp"
|
2018-12-23 07:17:08 -05:00
|
|
|
|
2018-12-23 12:25:22 -05:00
|
|
|
class launcher final
|
2018-12-23 07:17:08 -05:00
|
|
|
{
|
|
|
|
public:
|
2018-12-23 12:25:22 -05:00
|
|
|
enum mode
|
|
|
|
{
|
2018-12-26 10:28:16 -05:00
|
|
|
none,
|
|
|
|
singleplayer,
|
|
|
|
multiplayer,
|
|
|
|
server,
|
2018-12-23 12:25:22 -05:00
|
|
|
};
|
|
|
|
|
2018-12-23 07:17:08 -05:00
|
|
|
launcher();
|
|
|
|
|
2018-12-23 12:25:22 -05:00
|
|
|
mode run() const;
|
2018-12-23 07:17:08 -05:00
|
|
|
|
|
|
|
private:
|
2018-12-26 10:28:16 -05:00
|
|
|
mode mode_ = none;
|
2018-12-23 12:25:22 -05:00
|
|
|
|
2018-12-23 07:17:08 -05:00
|
|
|
window window_;
|
2018-12-23 12:25:22 -05:00
|
|
|
|
|
|
|
image image_sp_;
|
|
|
|
image image_mp_;
|
|
|
|
|
|
|
|
POINT mouse_{};
|
|
|
|
|
|
|
|
LRESULT handler(const UINT message, const WPARAM w_param, const LPARAM l_param);
|
|
|
|
|
|
|
|
void select_mode(mode mode);
|
|
|
|
|
|
|
|
static void draw_text(const HDC hdc);
|
|
|
|
void paint() const;
|
|
|
|
void mouse_move(LPARAM l_param);
|
2018-12-23 07:17:08 -05:00
|
|
|
};
|