tweak(launcher): new ui

This commit is contained in:
Skull 2025-03-20 13:23:21 +03:00
parent 663748383e
commit 5da2f1a579
4 changed files with 57 additions and 12 deletions

View File

@ -3,6 +3,8 @@
#include <utils/nt.hpp>
#include <version.hpp>
launcher::launcher()
{
this->create_main_menu();
@ -43,7 +45,7 @@ void launcher::create_main_menu()
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_.show();
}

File diff suppressed because one or more lines are too long

View File

@ -110,6 +110,22 @@ namespace utils::string
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)
{
if (!in || !out) return;

View File

@ -92,6 +92,8 @@ namespace utils::string
std::string get_clipboard_data();
void set_clipboard_data(const std::string& text);
void strip(const char* in, char* out, int max);
std::string strip(const std::string& string);