1
0
mirror of synced 2024-11-12 10:10:53 +01:00

ui: Fixed welcome screen banner and hyperlink rendering

This commit is contained in:
WerWolv 2021-08-16 23:55:06 +02:00
parent f8ed89ee2c
commit 41db0bfafa
3 changed files with 4 additions and 3 deletions

View File

@ -23,7 +23,8 @@ namespace ImGui {
ImGuiContext& g = *GImGui;
const ImGuiStyle& style = g.Style;
const ImGuiID id = window->GetID(label);
const ImVec2 label_size = CalcTextSize(icon, NULL, false) + CalcTextSize(" ", NULL, false) + CalcTextSize(label, NULL, false);
ImVec2 label_size = CalcTextSize(icon, NULL, false);
label_size.x += CalcTextSize(" ", NULL, false).x + CalcTextSize(label, NULL, false).x;
ImVec2 pos = window->DC.CursorPos;
ImVec2 size = CalcItemSize(size_arg, label_size.x, label_size.y);

View File

@ -116,7 +116,7 @@ namespace hex::plugin::builtin {
auto message = AS_TYPE(ASTNodeStringLiteral, params[1])->getString();
if (LITERAL_COMPARE(condition, condition == 0))
ctx.getConsole().log(LogConsole::Level::Warning, hex::format("assert failed \"{0}\"", message.data()));
ctx.getConsole().log(LogConsole::Level::Warning, hex::format("assert failed \"{0}\"", message));
return nullptr;
});

View File

@ -433,7 +433,7 @@ namespace hex {
void Window::drawWelcomeScreen() {
const auto availableSpace = ImGui::GetContentRegionAvail();
ImGui::Image(this->m_bannerTexture, ImVec2(this->m_bannerWidth / 2, this->m_bannerHeight / 2));
ImGui::Image(this->m_bannerTexture, ImVec2(this->m_bannerWidth / (2 * (1.0F / this->m_globalScale)), this->m_bannerHeight / (2 * (1.0F / this->m_globalScale))));
ImGui::Indent();
if (ImGui::BeginTable("Welcome Left", 1, ImGuiTableFlags_NoBordersInBody, ImVec2(availableSpace.x / 2, 0))) {