tweak(launcher): new ui
This commit is contained in:
parent
663748383e
commit
5da2f1a579
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include <utils/nt.hpp>
|
#include <utils/nt.hpp>
|
||||||
|
|
||||||
|
#include <version.hpp>
|
||||||
|
|
||||||
launcher::launcher()
|
launcher::launcher()
|
||||||
{
|
{
|
||||||
this->create_main_menu();
|
this->create_main_menu();
|
||||||
@ -43,7 +45,7 @@ void launcher::create_main_menu()
|
|||||||
return DefWindowProcA(*window, message, w_param, l_param);
|
return DefWindowProcA(*window, message, w_param, l_param);
|
||||||
});
|
});
|
||||||
|
|
||||||
this->main_window_.create("S2-Mod", 750, 420);
|
this->main_window_.create("S2-Mod: " VERSION, 750, 350);
|
||||||
this->main_window_.load_html(load_content(MENU_MAIN));
|
this->main_window_.load_html(load_content(MENU_MAIN));
|
||||||
this->main_window_.show();
|
this->main_window_.show();
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -110,6 +110,22 @@ namespace utils::string
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_clipboard_data(const std::string& text)
|
||||||
|
{
|
||||||
|
const auto len = text.size() + 1;
|
||||||
|
const auto mem = GlobalAlloc(GMEM_MOVEABLE, len);
|
||||||
|
|
||||||
|
memcpy(GlobalLock(mem), text.data(), len);
|
||||||
|
GlobalUnlock(mem);
|
||||||
|
|
||||||
|
if (OpenClipboard(nullptr))
|
||||||
|
{
|
||||||
|
EmptyClipboard();
|
||||||
|
SetClipboardData(CF_TEXT, mem);
|
||||||
|
CloseClipboard();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void strip(const char* in, char* out, int max)
|
void strip(const char* in, char* out, int max)
|
||||||
{
|
{
|
||||||
if (!in || !out) return;
|
if (!in || !out) return;
|
||||||
|
@ -92,6 +92,8 @@ namespace utils::string
|
|||||||
|
|
||||||
std::string get_clipboard_data();
|
std::string get_clipboard_data();
|
||||||
|
|
||||||
|
void set_clipboard_data(const std::string& text);
|
||||||
|
|
||||||
void strip(const char* in, char* out, int max);
|
void strip(const char* in, char* out, int max);
|
||||||
std::string strip(const std::string& string);
|
std::string strip(const std::string& string);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user