sys: Final cleanup to get rid of everything builtin in the main application

This commit is contained in:
WerWolv
2022-02-02 00:36:09 +01:00
parent f76e65a58d
commit 876dbe8179
24 changed files with 818 additions and 783 deletions

View File

@@ -304,7 +304,7 @@ namespace hex::plugin::builtin::prv {
ImGui::TextUnformatted("0x");
ImGui::SameLine();
ImGui::InputScalar("hex.common.size"_lang, ImGuiDataType_U64, &this->m_size, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::InputScalar("hex.builtin.common.size"_lang, ImGuiDataType_U64, &this->m_size, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal);
if (this->m_port < 0)
this->m_port = 0;

View File

@@ -590,7 +590,7 @@ namespace hex::plugin::builtin {
});
}
} else {
if (ImGui::Button("hex.common.cancel"_lang)) {
if (ImGui::Button("hex.builtin.common.cancel"_lang)) {
net.cancel();
}
}
@@ -603,9 +603,9 @@ namespace hex::plugin::builtin {
if (ImGui::BeginTable("##links", 3, ImGuiTableFlags_ScrollY | ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_RowBg, ImVec2(0, 200))) {
ImGui::TableSetupScrollFreeze(0, 1);
ImGui::TableSetupColumn("hex.common.file"_lang);
ImGui::TableSetupColumn("hex.common.link"_lang);
ImGui::TableSetupColumn("hex.common.size"_lang);
ImGui::TableSetupColumn("hex.builtin.common.file"_lang);
ImGui::TableSetupColumn("hex.builtin.common.link"_lang);
ImGui::TableSetupColumn("hex.builtin.common.size"_lang);
ImGui::TableHeadersRow();
ImGuiListClipper clipper;

View File

@@ -82,27 +82,27 @@ namespace hex::plugin::builtin {
ImGui::Separator();
ImGui::NewLine();
if (ImGui::RadioButton("hex.common.little_endian"_lang, this->m_endian == std::endian::little)) {
if (ImGui::RadioButton("hex.builtin.common.little_endian"_lang, this->m_endian == std::endian::little)) {
this->m_endian = std::endian::little;
this->m_shouldInvalidate = true;
}
ImGui::SameLine();
if (ImGui::RadioButton("hex.common.big_endian"_lang, this->m_endian == std::endian::big)) {
if (ImGui::RadioButton("hex.builtin.common.big_endian"_lang, this->m_endian == std::endian::big)) {
this->m_endian = std::endian::big;
this->m_shouldInvalidate = true;
}
if (ImGui::RadioButton("hex.common.decimal"_lang, this->m_numberDisplayStyle == NumberDisplayStyle::Decimal)) {
if (ImGui::RadioButton("hex.builtin.common.decimal"_lang, this->m_numberDisplayStyle == NumberDisplayStyle::Decimal)) {
this->m_numberDisplayStyle = NumberDisplayStyle::Decimal;
this->m_shouldInvalidate = true;
}
ImGui::SameLine();
if (ImGui::RadioButton("hex.common.hexadecimal"_lang, this->m_numberDisplayStyle == NumberDisplayStyle::Hexadecimal)) {
if (ImGui::RadioButton("hex.builtin.common.hexadecimal"_lang, this->m_numberDisplayStyle == NumberDisplayStyle::Hexadecimal)) {
this->m_numberDisplayStyle = NumberDisplayStyle::Hexadecimal;
this->m_shouldInvalidate = true;
}
ImGui::SameLine();
if (ImGui::RadioButton("hex.common.octal"_lang, this->m_numberDisplayStyle == NumberDisplayStyle::Octal)) {
if (ImGui::RadioButton("hex.builtin.common.octal"_lang, this->m_numberDisplayStyle == NumberDisplayStyle::Octal)) {
this->m_numberDisplayStyle = NumberDisplayStyle::Octal;
this->m_shouldInvalidate = true;
}

View File

@@ -264,7 +264,7 @@ namespace hex::plugin::builtin {
int nodeId;
if (ImNodes::IsNodeHovered(&nodeId) && this->m_currNodeError.has_value() && this->m_currNodeError->first->getId() == nodeId) {
ImGui::BeginTooltip();
ImGui::TextUnformatted("hex.common.error"_lang);
ImGui::TextUnformatted("hex.builtin.common.error"_lang);
ImGui::Separator();
ImGui::TextUnformatted(this->m_currNodeError->second.c_str());
ImGui::EndTooltip();

View File

@@ -112,7 +112,7 @@ namespace hex::plugin::builtin {
ImGui::InputScalar("hex.builtin.view.disassembler.base"_lang, ImGuiDataType_U64, &this->m_baseAddress, nullptr, nullptr, "%08llX", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::InputScalarN("hex.builtin.view.disassembler.region"_lang, ImGuiDataType_U64, this->m_codeRegion, 2, nullptr, nullptr, "%08llX", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::Checkbox("hex.common.match_selection"_lang, &this->m_shouldMatchSelection);
ImGui::Checkbox("hex.builtin.common.match_selection"_lang, &this->m_shouldMatchSelection);
if (ImGui::IsItemEdited()) {
// Force execution of Region Selection Event
EventManager::post<RequestSelectionChange>(Region { 0, 0 });
@@ -129,9 +129,9 @@ namespace hex::plugin::builtin {
if (ImGui::BeginChild("modes", ImVec2(0, ImGui::GetTextLineHeightWithSpacing() * 6), true, ImGuiWindowFlags_AlwaysAutoResize)) {
static int littleEndian = true;
ImGui::RadioButton("hex.common.little_endian"_lang, &littleEndian, true);
ImGui::RadioButton("hex.builtin.common.little_endian"_lang, &littleEndian, true);
ImGui::SameLine();
ImGui::RadioButton("hex.common.big_endian"_lang, &littleEndian, false);
ImGui::RadioButton("hex.builtin.common.big_endian"_lang, &littleEndian, false);
ImGui::NewLine();

View File

@@ -46,13 +46,13 @@ namespace hex::plugin::builtin {
auto provider = ImHexApi::Provider::get();
if (ImHexApi::Provider::isValid() && provider->isAvailable()) {
ImGui::TextUnformatted("hex.common.region"_lang);
ImGui::TextUnformatted("hex.builtin.common.region"_lang);
ImGui::Separator();
ImGui::InputScalarN("##nolabel", ImGuiDataType_U64, this->m_hashRegion, 2, nullptr, nullptr, "%08X", ImGuiInputTextFlags_CharsHexadecimal);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
ImGui::Checkbox("hex.common.match_selection"_lang, &this->m_shouldMatchSelection);
ImGui::Checkbox("hex.builtin.common.match_selection"_lang, &this->m_shouldMatchSelection);
if (ImGui::IsItemEdited()) {
// Force execution of Region Selection Event
EventManager::post<RequestSelectionChange>(Region { 0, 0 });
@@ -92,10 +92,10 @@ namespace hex::plugin::builtin {
ImGui::InputInt("hex.builtin.view.hashes.xorout"_lang, &xorout, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
ImGui::Checkbox("hex.common.reflectIn"_lang, &reflectIn);
ImGui::Checkbox("hex.builtin.common.reflectIn"_lang, &reflectIn);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
ImGui::Checkbox("hex.common.reflectOut"_lang, &reflectOut);
ImGui::Checkbox("hex.builtin.common.reflectOut"_lang, &reflectOut);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
ImGui::InputInt("hex.builtin.view.hashes.poly"_lang, &polynomial, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);
@@ -127,10 +127,10 @@ namespace hex::plugin::builtin {
ImGui::InputInt("hex.builtin.view.hashes.xorout"_lang, &xorout, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
ImGui::Checkbox("hex.common.reflectIn"_lang, &reflectIn);
ImGui::Checkbox("hex.builtin.common.reflectIn"_lang, &reflectIn);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
ImGui::Checkbox("hex.common.reflectOut"_lang, &reflectOut);
ImGui::Checkbox("hex.builtin.common.reflectOut"_lang, &reflectOut);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
ImGui::InputInt("hex.builtin.view.hashes.poly"_lang, &polynomial, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);
@@ -163,10 +163,10 @@ namespace hex::plugin::builtin {
ImGui::InputInt("hex.builtin.view.hashes.xorout"_lang, &xorout, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
ImGui::Checkbox("hex.common.reflectIn"_lang, &reflectIn);
ImGui::Checkbox("hex.builtin.common.reflectIn"_lang, &reflectIn);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
ImGui::Checkbox("hex.common.reflectOut"_lang, &reflectOut);
ImGui::Checkbox("hex.builtin.common.reflectOut"_lang, &reflectOut);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
ImGui::InputInt("hex.builtin.view.hashes.poly"_lang, &polynomial, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);

View File

@@ -251,7 +251,7 @@ namespace hex::plugin::builtin {
ImGui::NewLine();
confirmButtons(
"hex.common.yes"_lang, "hex.common.no"_lang, [] { ImHexApi::Common::closeImHex(true); }, [] { ImGui::CloseCurrentPopup(); });
"hex.builtin.common.yes"_lang, "hex.builtin.common.no"_lang, [] { ImHexApi::Common::closeImHex(true); }, [] { ImGui::CloseCurrentPopup(); });
if (ImGui::IsKeyDown(ImGui::GetKeyIndex(ImGuiKey_Escape)))
ImGui::CloseCurrentPopup();
@@ -287,7 +287,7 @@ namespace hex::plugin::builtin {
ImGui::NewLine();
confirmButtons(
"hex.common.load"_lang, "hex.common.cancel"_lang, [this, &provider] {
"hex.builtin.common.load"_lang, "hex.builtin.common.cancel"_lang, [this, &provider] {
if (!this->m_loaderScriptScriptPath.empty() && !this->m_loaderScriptFilePath.empty()) {
EventManager::post<RequestOpenFile>(this->m_loaderScriptFilePath);
LoaderScript::setFilePath(this->m_loaderScriptFilePath);
@@ -300,11 +300,11 @@ namespace hex::plugin::builtin {
}
if (ImGui::BeginPopupModal("hex.builtin.view.hexeditor.menu.edit.set_base"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::InputText("hex.common.address"_lang, this->m_baseAddressBuffer, 16, ImGuiInputTextFlags_CharsHexadecimal);
ImGui::InputText("hex.builtin.common.address"_lang, this->m_baseAddressBuffer, 16, ImGuiInputTextFlags_CharsHexadecimal);
ImGui::NewLine();
confirmButtons(
"hex.common.set"_lang, "hex.common.cancel"_lang, [this, &provider] {
"hex.builtin.common.set"_lang, "hex.builtin.common.cancel"_lang, [this, &provider] {
provider->setBaseAddress(strtoull(this->m_baseAddressBuffer, nullptr, 16));
ImGui::CloseCurrentPopup(); }, [] { ImGui::CloseCurrentPopup(); });
@@ -317,11 +317,11 @@ namespace hex::plugin::builtin {
if (ImGui::BeginPopupModal("hex.builtin.view.hexeditor.menu.edit.resize"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::TextUnformatted("0x");
ImGui::SameLine();
ImGui::InputScalar("hex.common.size"_lang, ImGuiDataType_U64, &this->m_resizeSize, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::InputScalar("hex.builtin.common.size"_lang, ImGuiDataType_U64, &this->m_resizeSize, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::NewLine();
confirmButtons(
"hex.common.set"_lang, "hex.common.cancel"_lang, [this, &provider] {
"hex.builtin.common.set"_lang, "hex.builtin.common.cancel"_lang, [this, &provider] {
provider->resize(this->m_resizeSize);
ImGui::CloseCurrentPopup(); }, [] { ImGui::CloseCurrentPopup(); });
@@ -334,11 +334,11 @@ namespace hex::plugin::builtin {
if (ImGui::BeginPopupModal("hex.builtin.view.hexeditor.menu.edit.insert"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::TextUnformatted("0x");
ImGui::SameLine();
ImGui::InputScalar("hex.common.size"_lang, ImGuiDataType_U64, &this->m_resizeSize, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::InputScalar("hex.builtin.common.size"_lang, ImGuiDataType_U64, &this->m_resizeSize, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::NewLine();
confirmButtons(
"hex.common.set"_lang, "hex.common.cancel"_lang, [this, &provider] {
"hex.builtin.common.set"_lang, "hex.builtin.common.cancel"_lang, [this, &provider] {
provider->insert(std::min(this->m_memoryEditor.DataPreviewAddr, this->m_memoryEditor.DataPreviewAddrEnd), this->m_resizeSize);
ImGui::CloseCurrentPopup(); }, [] { ImGui::CloseCurrentPopup(); });

View File

@@ -323,7 +323,7 @@ namespace hex::plugin::builtin {
ImGui::NewLine();
View::confirmButtons(
"hex.common.yes"_lang, "hex.common.no"_lang, [] {
"hex.builtin.common.yes"_lang, "hex.builtin.common.no"_lang, [] {
ImHexApi::Provider::get()->getPatternLanguageRuntime().allowDangerousFunctions(true);
ImGui::CloseCurrentPopup(); }, [] {
ImHexApi::Provider::get()->getPatternLanguageRuntime().allowDangerousFunctions(false);
@@ -552,7 +552,7 @@ namespace hex::plugin::builtin {
ImGui::TextUnformatted("hex.builtin.view.pattern_editor.accept_pattern.question"_lang);
confirmButtons(
"hex.common.yes"_lang, "hex.common.no"_lang, [this] {
"hex.builtin.common.yes"_lang, "hex.builtin.common.no"_lang, [this] {
this->loadPatternFile(this->m_possiblePatternFiles[this->m_selectedPatternFile].string());
ImGui::CloseCurrentPopup(); }, [] { ImGui::CloseCurrentPopup(); });

View File

@@ -35,14 +35,14 @@ namespace hex::plugin::builtin {
ImGui::NewLine();
ImGui::Separator();
if (ImGui::Button("hex.common.open"_lang)) {
if (ImGui::Button("hex.builtin.common.open"_lang)) {
if (provider->open())
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("hex.common.cancel"_lang)) {
if (ImGui::Button("hex.builtin.common.cancel"_lang)) {
ImHexApi::Provider::remove(provider);
ImGui::CloseCurrentPopup();
}

View File

@@ -86,8 +86,8 @@ namespace hex::plugin::builtin {
ImGui::TableSetupScrollFreeze(0, 1);
ImGui::TableSetupColumn("hex.builtin.view.yara.matches.identifier"_lang);
ImGui::TableSetupColumn("hex.builtin.view.yara.matches.variable"_lang);
ImGui::TableSetupColumn("hex.common.address"_lang);
ImGui::TableSetupColumn("hex.common.size"_lang);
ImGui::TableSetupColumn("hex.builtin.common.address"_lang);
ImGui::TableSetupColumn("hex.builtin.common.size"_lang);
ImGui::TableHeadersRow();

View File

@@ -54,20 +54,20 @@ namespace hex::plugin::builtin {
static void drawPopups() {
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_Appearing, ImVec2(0.5F, 0.5F));
ImGui::SetNextWindowSize(ImGui::GetMainViewport()->Size / 3, ImGuiCond_Appearing);
if (ImGui::BeginPopup("hex.welcome.tip_of_the_day"_lang)) {
ImGui::Header("hex.welcome.tip_of_the_day"_lang, true);
if (ImGui::BeginPopup("hex.builtin.welcome.tip_of_the_day"_lang)) {
ImGui::Header("hex.builtin.welcome.tip_of_the_day"_lang, true);
ImGui::TextFormattedWrapped("{}", s_tipOfTheDay.c_str());
ImGui::NewLine();
static bool dontShowAgain = false;
if (ImGui::Checkbox("hex.common.dont_show_again"_lang, &dontShowAgain)) {
if (ImGui::Checkbox("hex.builtin.common.dont_show_again"_lang, &dontShowAgain)) {
ContentRegistry::Settings::write("hex.builtin.setting.general", "hex.builtin.setting.general.show_tips", !dontShowAgain);
}
ImGui::SameLine((ImGui::GetMainViewport()->Size / 3 - ImGui::CalcTextSize("hex.common.close"_lang) - ImGui::GetStyle().FramePadding).x);
ImGui::SameLine((ImGui::GetMainViewport()->Size / 3 - ImGui::CalcTextSize("hex.builtin.common.close"_lang) - ImGui::GetStyle().FramePadding).x);
if (ImGui::Button("hex.common.close"_lang))
if (ImGui::Button("hex.builtin.common.close"_lang))
ImGui::CloseCurrentPopup();
ImGui::EndPopup();
@@ -76,13 +76,13 @@ namespace hex::plugin::builtin {
// Popup for if there is a safety backup present because ImHex crashed
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_Appearing, ImVec2(0.5F, 0.5F));
if (ImGui::BeginPopupModal("hex.safety_backup.title"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMove)) {
ImGui::TextUnformatted("hex.safety_backup.desc"_lang);
if (ImGui::BeginPopupModal("hex.builtin.welcome.safety_backup.title"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMove)) {
ImGui::TextUnformatted("hex.builtin.welcome.safety_backup.desc"_lang);
ImGui::NewLine();
auto width = ImGui::GetWindowWidth();
ImGui::SetCursorPosX(width / 9);
if (ImGui::Button("hex.safety_backup.restore"_lang, ImVec2(width / 3, 0))) {
if (ImGui::Button("hex.builtin.welcome.safety_backup.restore"_lang, ImVec2(width / 3, 0))) {
ProjectFile::load(s_safetyBackupPath.string());
ProjectFile::markDirty();
@@ -93,7 +93,7 @@ namespace hex::plugin::builtin {
}
ImGui::SameLine();
ImGui::SetCursorPosX(width / 9 * 5);
if (ImGui::Button("hex.safety_backup.delete"_lang, ImVec2(width / 3, 0))) {
if (ImGui::Button("hex.builtin.welcome.safety_backup.delete"_lang, ImVec2(width / 3, 0))) {
fs::remove(s_safetyBackupPath);
ImGui::CloseCurrentPopup();
@@ -120,21 +120,21 @@ namespace hex::plugin::builtin {
ImGui::TableNextColumn();
ImGui::UnderlinedText("hex.welcome.header.start"_lang);
ImGui::UnderlinedText("hex.builtin.welcome.header.start"_lang);
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5_scaled);
{
if (ImGui::IconHyperlink(ICON_VS_NEW_FILE, "hex.welcome.start.create_file"_lang))
if (ImGui::IconHyperlink(ICON_VS_NEW_FILE, "hex.builtin.welcome.start.create_file"_lang))
EventManager::post<RequestOpenWindow>("Create File");
if (ImGui::IconHyperlink(ICON_VS_GO_TO_FILE, "hex.welcome.start.open_file"_lang))
if (ImGui::IconHyperlink(ICON_VS_GO_TO_FILE, "hex.builtin.welcome.start.open_file"_lang))
EventManager::post<RequestOpenWindow>("Open File");
if (ImGui::IconHyperlink(ICON_VS_NOTEBOOK, "hex.welcome.start.open_project"_lang))
if (ImGui::IconHyperlink(ICON_VS_NOTEBOOK, "hex.builtin.welcome.start.open_project"_lang))
EventManager::post<RequestOpenWindow>("Open Project");
if (ImGui::IconHyperlink(ICON_VS_TELESCOPE, "hex.welcome.start.open_other"_lang))
ImGui::OpenPopup("hex.welcome.start.popup.open_other"_lang);
if (ImGui::IconHyperlink(ICON_VS_TELESCOPE, "hex.builtin.welcome.start.open_other"_lang))
ImGui::OpenPopup("hex.builtin.welcome.start.popup.open_other"_lang);
}
ImGui::SetNextWindowPos(ImGui::GetWindowPos() + ImGui::GetCursorPos());
if (ImGui::BeginPopup("hex.welcome.start.popup.open_other"_lang)) {
if (ImGui::BeginPopup("hex.builtin.welcome.start.popup.open_other"_lang)) {
for (const auto &unlocalizedProviderName : ContentRegistry::Provider::getEntries()) {
if (ImGui::Hyperlink(LangEntry(unlocalizedProviderName))) {
@@ -148,7 +148,7 @@ namespace hex::plugin::builtin {
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 9);
ImGui::TableNextColumn();
ImGui::UnderlinedText("hex.welcome.start.recent"_lang);
ImGui::UnderlinedText("hex.builtin.welcome.start.recent"_lang);
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5_scaled);
{
for (auto &path : s_recentFilePaths) {
@@ -162,35 +162,35 @@ namespace hex::plugin::builtin {
if (ImHexApi::System::getInitArguments().contains("update-available")) {
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 5);
ImGui::TableNextColumn();
ImGui::UnderlinedText("hex.welcome.header.update"_lang);
ImGui::UnderlinedText("hex.builtin.welcome.header.update"_lang);
{
if (ImGui::DescriptionButton("hex.welcome.update.title"_lang, hex::format("hex.welcome.update.desc"_lang, ImHexApi::System::getInitArguments()["update-available"]).c_str(), ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0)))
hex::openWebpage("hex.welcome.update.link"_lang);
if (ImGui::DescriptionButton("hex.builtin.welcome.update.title"_lang, hex::format("hex.builtin.welcome.update.desc"_lang, ImHexApi::System::getInitArguments()["update-available"]).c_str(), ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0)))
hex::openWebpage("hex.builtin.welcome.update.link"_lang);
}
}
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 6);
ImGui::TableNextColumn();
ImGui::UnderlinedText("hex.welcome.header.help"_lang);
ImGui::UnderlinedText("hex.builtin.welcome.header.help"_lang);
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5_scaled);
{
if (ImGui::IconHyperlink(ICON_VS_GITHUB, "hex.welcome.help.repo"_lang)) hex::openWebpage("hex.welcome.help.repo.link"_lang);
if (ImGui::IconHyperlink(ICON_VS_ORGANIZATION, "hex.welcome.help.gethelp"_lang)) hex::openWebpage("hex.welcome.help.gethelp.link"_lang);
if (ImGui::IconHyperlink(ICON_VS_COMMENT_DISCUSSION, "hex.welcome.help.discord"_lang)) hex::openWebpage("hex.welcome.help.discord.link"_lang);
if (ImGui::IconHyperlink(ICON_VS_GITHUB, "hex.builtin.welcome.help.repo"_lang)) hex::openWebpage("hex.builtin.welcome.help.repo.link"_lang);
if (ImGui::IconHyperlink(ICON_VS_ORGANIZATION, "hex.builtin.welcome.help.gethelp"_lang)) hex::openWebpage("hex.builtin.welcome.help.gethelp.link"_lang);
if (ImGui::IconHyperlink(ICON_VS_COMMENT_DISCUSSION, "hex.builtin.welcome.help.discord"_lang)) hex::openWebpage("hex.builtin.welcome.help.discord.link"_lang);
}
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 5);
ImGui::TableNextColumn();
ImGui::UnderlinedText("hex.welcome.header.plugins"_lang);
ImGui::UnderlinedText("hex.builtin.welcome.header.plugins"_lang);
{
const auto &plugins = PluginManager::getPlugins();
if (!plugins.empty()) {
if (ImGui::BeginTable("plugins", 4, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY | ImGuiTableFlags_SizingFixedFit, ImVec2((ImGui::GetContentRegionAvail().x * 5) / 6, ImGui::GetTextLineHeightWithSpacing() * 5))) {
ImGui::TableSetupScrollFreeze(0, 1);
ImGui::TableSetupColumn("hex.welcome.plugins.plugin"_lang, ImGuiTableColumnFlags_WidthStretch, 0.2);
ImGui::TableSetupColumn("hex.welcome.plugins.author"_lang, ImGuiTableColumnFlags_WidthStretch, 0.2);
ImGui::TableSetupColumn("hex.welcome.plugins.desc"_lang, ImGuiTableColumnFlags_WidthStretch, 0.6);
ImGui::TableSetupColumn("hex.builtin.welcome.plugins.plugin"_lang, ImGuiTableColumnFlags_WidthStretch, 0.2);
ImGui::TableSetupColumn("hex.builtin.welcome.plugins.author"_lang, ImGuiTableColumnFlags_WidthStretch, 0.2);
ImGui::TableSetupColumn("hex.builtin.welcome.plugins.desc"_lang, ImGuiTableColumnFlags_WidthStretch, 0.6);
ImGui::TableSetupColumn("##loaded", ImGuiTableColumnFlags_WidthFixed, ImGui::GetTextLineHeight());
ImGui::TableHeadersRow();
@@ -227,28 +227,28 @@ namespace hex::plugin::builtin {
if (ImGui::BeginTable("Welcome Right", 1, ImGuiTableFlags_NoBordersInBody, ImVec2(availableSpace.x / 2, 0))) {
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 5);
ImGui::TableNextColumn();
ImGui::UnderlinedText("hex.welcome.header.customize"_lang);
ImGui::UnderlinedText("hex.builtin.welcome.header.customize"_lang);
{
if (ImGui::DescriptionButton("hex.welcome.customize.settings.title"_lang, "hex.welcome.customize.settings.desc"_lang, ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0)))
if (ImGui::DescriptionButton("hex.builtin.welcome.customize.settings.title"_lang, "hex.builtin.welcome.customize.settings.desc"_lang, ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0)))
EventManager::post<RequestOpenWindow>("Settings");
}
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 5);
ImGui::TableNextColumn();
ImGui::UnderlinedText("hex.welcome.header.learn"_lang);
ImGui::UnderlinedText("hex.builtin.welcome.header.learn"_lang);
{
if (ImGui::DescriptionButton("hex.welcome.learn.latest.title"_lang, "hex.welcome.learn.latest.desc"_lang, ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0)))
hex::openWebpage("hex.welcome.learn.latest.link"_lang);
if (ImGui::DescriptionButton("hex.welcome.learn.pattern.title"_lang, "hex.welcome.learn.pattern.desc"_lang, ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0)))
hex::openWebpage("hex.welcome.learn.pattern.link"_lang);
if (ImGui::DescriptionButton("hex.welcome.learn.plugins.title"_lang, "hex.welcome.learn.plugins.desc"_lang, ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0)))
hex::openWebpage("hex.welcome.learn.plugins.link"_lang);
if (ImGui::DescriptionButton("hex.builtin.welcome.learn.latest.title"_lang, "hex.builtin.welcome.learn.latest.desc"_lang, ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0)))
hex::openWebpage("hex.builtin.welcome.learn.latest.link"_lang);
if (ImGui::DescriptionButton("hex.builtin.welcome.learn.pattern.title"_lang, "hex.builtin.welcome.learn.pattern.desc"_lang, ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0)))
hex::openWebpage("hex.builtin.welcome.learn.pattern.link"_lang);
if (ImGui::DescriptionButton("hex.builtin.welcome.learn.plugins.title"_lang, "hex.builtin.welcome.learn.plugins.desc"_lang, ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0)))
hex::openWebpage("hex.builtin.welcome.learn.plugins.link"_lang);
}
auto extraWelcomeScreenEntries = ContentRegistry::Interface::getWelcomeScreenEntries();
if (!extraWelcomeScreenEntries.empty()) {
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 5);
ImGui::TableNextColumn();
ImGui::UnderlinedText("hex.welcome.header.various"_lang);
ImGui::UnderlinedText("hex.builtin.welcome.header.various"_lang);
{
for (const auto &callback : extraWelcomeScreenEntries)
callback();
@@ -450,7 +450,7 @@ namespace hex::plugin::builtin {
for (const auto &path : hex::getPath(ImHexPath::Config)) {
if (auto filePath = fs::path(path) / CrashBackupFileName; fs::exists(filePath)) {
s_safetyBackupPath = filePath;
ImHexApi::Tasks::doLater([] { ImGui::OpenPopup("hex.safety_backup.title"_lang); });
ImHexApi::Tasks::doLater([] { ImGui::OpenPopup("hex.builtin.welcome.safety_backup.title"_lang); });
}
}
@@ -462,7 +462,7 @@ namespace hex::plugin::builtin {
bool showTipOfTheDay = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.show_tips", 1);
if (showTipOfTheDay)
ImHexApi::Tasks::doLater([] { ImGui::OpenPopup("hex.welcome.tip_of_the_day"_lang); });
ImHexApi::Tasks::doLater([] { ImGui::OpenPopup("hex.builtin.welcome.tip_of_the_day"_lang); });
}
}

View File

@@ -7,85 +7,79 @@ namespace hex::plugin::builtin {
ContentRegistry::Language::registerLanguage("German", "de-DE");
ContentRegistry::Language::addLocalizations("de-DE", {
/* ImHex default functionality */
{ "hex.menu.feedback", "Feedback hinterlassen" },
{ "hex.menu.debug_build", "Debug build"},
{ "hex.builtin.welcome.header.main", "Wilkommen zu ImHex" },
{ "hex.builtin.welcome.header.start", "Start" },
{ "hex.builtin.welcome.start.create_file", "Neue Datei Erstellen" },
{ "hex.builtin.welcome.start.open_file", "Datei Öffnen" },
{ "hex.builtin.welcome.start.open_project", "Projekt Öffnen" },
{ "hex.builtin.welcome.start.recent", "Kürzlich geöffnet" },
{ "hex.builtin.welcome.start.open_other", "Andere Provider" },
{ "hex.builtin.welcome.header.help", "Hilfe" },
{ "hex.builtin.welcome.help.repo", "GitHub Repository" },
{ "hex.builtin.welcome.help.repo.link", "https://imhex.werwolv.net/git" },
{ "hex.builtin.welcome.help.gethelp", "Hilfe erhalten" },
{ "hex.builtin.welcome.help.gethelp.link", "https://github.com/WerWolv/ImHex/discussions/categories/get-help" },
{ "hex.builtin.welcome.help.discord", "Discord Server" },
{ "hex.builtin.welcome.help.discord.link", "https://imhex.werwolv.net/discord" },
{ "hex.builtin.welcome.header.plugins", "Geladene Plugins" },
{ "hex.builtin.welcome.plugins.plugin", "Plugin" },
{ "hex.builtin.welcome.plugins.author", "Autor" },
{ "hex.builtin.welcome.plugins.desc", "Beschreibung" },
{ "hex.builtin.welcome.header.customize", "Anpassen" },
{ "hex.builtin.welcome.customize.settings.title", "Einstellungen" },
{ "hex.builtin.welcome.customize.settings.desc", "Ändere ImHex's Einstellungen" },
{ "hex.builtin.welcome.header.update", "Updates" },
{ "hex.builtin.welcome.update.title", "Neues Update verfügbar!" },
{ "hex.builtin.welcome.update.desc", "ImHex {0} wurde gerade released! Downloade die neue version hier" },
{ "hex.builtin.welcome.update.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.builtin.welcome.header.learn", "Lernen" },
{ "hex.builtin.welcome.learn.latest.title", "Neuster Release" },
{ "hex.builtin.welcome.learn.latest.desc", "Lies den momentanen ImHex Changelog" },
{ "hex.builtin.welcome.learn.latest.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.builtin.welcome.learn.pattern.title", "Pattern Language Dokumentation" },
{ "hex.builtin.welcome.learn.pattern.desc", "Lern ImHex Patterns zu schreiben mit unserer umfangreichen Dokumentation" },
{ "hex.builtin.welcome.learn.pattern.link", "https://imhex.werwolv.net/docs/pattern_language/pattern_language.html" },
{ "hex.builtin.welcome.learn.plugins.title", "Plugins API" },
{ "hex.builtin.welcome.learn.plugins.desc", "Erweitere ImHex mit neuen Funktionen mit Plugins" },
{ "hex.builtin.welcome.learn.plugins.link", "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide" },
{ "hex.builtin.welcome.header.various", "Verschiedenes" },
{ "hex.builtin.welcome.tip_of_the_day", "Tipp des Tages" },
{ "hex.welcome.header.main", "Wilkommen zu ImHex" },
{ "hex.welcome.header.start", "Start" },
{ "hex.welcome.start.create_file", "Neue Datei Erstellen" },
{ "hex.welcome.start.open_file", "Datei Öffnen" },
{ "hex.welcome.start.open_project", "Projekt Öffnen" },
{ "hex.welcome.start.recent", "Kürzlich geöffnet" },
{ "hex.welcome.start.open_other", "Andere Provider" },
{ "hex.welcome.header.help", "Hilfe" },
{ "hex.welcome.help.repo", "GitHub Repository" },
{ "hex.welcome.help.repo.link", "https://imhex.werwolv.net/git" },
{ "hex.welcome.help.gethelp", "Hilfe erhalten" },
{ "hex.welcome.help.gethelp.link", "https://github.com/WerWolv/ImHex/discussions/categories/get-help" },
{ "hex.welcome.help.discord", "Discord Server" },
{ "hex.welcome.help.discord.link", "https://imhex.werwolv.net/discord" },
{ "hex.welcome.header.plugins", "Geladene Plugins" },
{ "hex.welcome.plugins.plugin", "Plugin" },
{ "hex.welcome.plugins.author", "Autor" },
{ "hex.welcome.plugins.desc", "Beschreibung" },
{ "hex.welcome.header.customize", "Anpassen" },
{ "hex.welcome.customize.settings.title", "Einstellungen" },
{ "hex.welcome.customize.settings.desc", "Ändere ImHex's Einstellungen" },
{ "hex.welcome.header.update", "Updates" },
{ "hex.welcome.update.title", "Neues Update verfügbar!" },
{ "hex.welcome.update.desc", "ImHex {0} wurde gerade released! Downloade die neue version hier" },
{ "hex.welcome.update.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.welcome.header.learn", "Lernen" },
{ "hex.welcome.learn.latest.title", "Neuster Release" },
{ "hex.welcome.learn.latest.desc", "Lies den momentanen ImHex Changelog" },
{ "hex.welcome.learn.latest.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.welcome.learn.pattern.title", "Pattern Language Dokumentation" },
{ "hex.welcome.learn.pattern.desc", "Lern ImHex Patterns zu schreiben mit unserer umfangreichen Dokumentation" },
{ "hex.welcome.learn.pattern.link", "https://imhex.werwolv.net/docs/pattern_language/pattern_language.html" },
{ "hex.welcome.learn.plugins.title", "Plugins API" },
{ "hex.welcome.learn.plugins.desc", "Erweitere ImHex mit neuen Funktionen mit Plugins" },
{ "hex.welcome.learn.plugins.link", "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide" },
{ "hex.welcome.header.various", "Verschiedenes" },
{ "hex.welcome.tip_of_the_day", "Tipp des Tages" },
{ "hex.safety_backup.title", "Verlorene Daten wiederherstellen" },
{ "hex.safety_backup.desc", "Oh nein, ImHex ist letztes mal abgestürtzt.\nWillst du das verherige Projekt wiederherstellen?"},
{ "hex.safety_backup.restore", "Ja, Wiederherstellen" },
{ "hex.safety_backup.delete", "Nein, Entfernen" },
{ "hex.builtin.welcome.safety_backup.title", "Verlorene Daten wiederherstellen" },
{ "hex.builtin.welcome.safety_backup.desc", "Oh nein, ImHex ist letztes mal abgestürtzt.\nWillst du das verherige Projekt wiederherstellen?"},
{ "hex.builtin.welcome.safety_backup.restore", "Ja, Wiederherstellen" },
{ "hex.builtin.welcome.safety_backup.delete", "Nein, Entfernen" },
{ "hex.common.little_endian", "Little Endian" },
{ "hex.common.big_endian", "Big Endian" },
{ "hex.common.decimal", "Dezimal" },
{ "hex.common.hexadecimal", "Hexadezimal" },
{ "hex.common.octal", "Oktal" },
{ "hex.common.info", "Information" },
{ "hex.common.error", "Fehler" },
{ "hex.common.fatal", "Fataler Fehler" },
{ "hex.common.address", "Adresse" },
{ "hex.common.size", "Länge" },
{ "hex.common.region", "Region" },
{ "hex.common.match_selection", "Arbeitsbereich synchronisieren" },
{ "hex.common.yes", "Ja" },
{ "hex.common.no", "Nein" },
{ "hex.common.okay", "Okay" },
{ "hex.common.load", "Laden" },
{ "hex.common.cancel", "Abbrechen" },
{ "hex.common.set", "Setzen" },
{ "hex.common.close", "Schliessen" },
{ "hex.common.dont_show_again", "Nicht mehr anzeigen" },
{ "hex.common.link", "Link" },
{ "hex.common.file", "Datei" },
{ "hex.common.open", "Öffnen" },
{ "hex.common.browse", "Druchsuchen..." },
{ "hex.common.choose_file", "Datei auswählen" },
{ "hex.builtin.common.little_endian", "Little Endian" },
{ "hex.builtin.common.big_endian", "Big Endian" },
{ "hex.builtin.common.decimal", "Dezimal" },
{ "hex.builtin.common.hexadecimal", "Hexadezimal" },
{ "hex.builtin.common.octal", "Oktal" },
{ "hex.builtin.common.info", "Information" },
{ "hex.builtin.common.error", "Fehler" },
{ "hex.builtin.common.fatal", "Fataler Fehler" },
{ "hex.builtin.common.address", "Adresse" },
{ "hex.builtin.common.size", "Länge" },
{ "hex.builtin.common.region", "Region" },
{ "hex.builtin.common.match_selection", "Arbeitsbereich synchronisieren" },
{ "hex.builtin.common.yes", "Ja" },
{ "hex.builtin.common.no", "Nein" },
{ "hex.builtin.common.okay", "Okay" },
{ "hex.builtin.common.load", "Laden" },
{ "hex.builtin.common.cancel", "Abbrechen" },
{ "hex.builtin.common.set", "Setzen" },
{ "hex.builtin.common.close", "Schliessen" },
{ "hex.builtin.common.dont_show_again", "Nicht mehr anzeigen" },
{ "hex.builtin.common.link", "Link" },
{ "hex.builtin.common.file", "Datei" },
{ "hex.builtin.common.open", "Öffnen" },
{ "hex.builtin.common.browse", "Druchsuchen..." },
{ "hex.builtin.common.choose_file", "Datei auswählen" },
{ "hex.message.file_handler_failed", "Datei konnte nicht mit registriertem Dateihandler geöffnet werden." },
{ "hex.builtin.message.file_handler_failed", "Datei konnte nicht mit registriertem Dateihandler geöffnet werden." },
/* Builtin plugin features */
{ "hex.builtin.menu.file", "Datei" },
{ "hex.builtin.menu.edit", "Bearbeiten" },
{ "hex.builtin.menu.view", "Ansicht" },

View File

@@ -8,83 +8,77 @@ namespace hex::plugin::builtin {
LangEntry::setFallbackLanguage("en-US");
ContentRegistry::Language::addLocalizations("en-US", {
/* ImHex default functionality */
{ "hex.menu.feedback", "Leave Feedback" },
{ "hex.menu.debug_build", "Debug build"},
{ "hex.builtin.welcome.header.main", "Welcome to ImHex" },
{ "hex.builtin.welcome.header.start", "Start" },
{ "hex.builtin.welcome.start.create_file", "Create New File" },
{ "hex.builtin.welcome.start.open_file", "Open File" },
{ "hex.builtin.welcome.start.open_project", "Open Project" },
{ "hex.builtin.welcome.start.recent", "Recent Files" },
{ "hex.builtin.welcome.start.open_other", "Other Providers" },
{ "hex.builtin.welcome.header.help", "Help" },
{ "hex.builtin.welcome.help.repo", "GitHub Repository" },
{ "hex.builtin.welcome.help.repo.link", "https://imhex.werwolv.net/git" },
{ "hex.builtin.welcome.help.gethelp", "Get Help" },
{ "hex.builtin.welcome.help.gethelp.link", "https://github.com/WerWolv/ImHex/discussions/categories/get-help" },
{ "hex.builtin.welcome.help.discord", "Discord Server" },
{ "hex.builtin.welcome.help.discord.link", "https://imhex.werwolv.net/discord" },
{ "hex.builtin.welcome.header.plugins", "Loaded Plugins" },
{ "hex.builtin.welcome.plugins.plugin", "Plugin" },
{ "hex.builtin.welcome.plugins.author", "Author" },
{ "hex.builtin.welcome.plugins.desc", "Description" },
{ "hex.builtin.welcome.header.customize", "Customize" },
{ "hex.builtin.welcome.customize.settings.title", "Settings" },
{ "hex.builtin.welcome.customize.settings.desc", "Change preferences of ImHex" },
{ "hex.builtin.welcome.header.update", "Updates" },
{ "hex.builtin.welcome.update.title", "New Update available!" },
{ "hex.builtin.welcome.update.desc", "ImHex {0} just released! Download it here." },
{ "hex.builtin.welcome.update.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.builtin.welcome.header.learn", "Learn" },
{ "hex.builtin.welcome.learn.latest.title", "Latest Release" },
{ "hex.builtin.welcome.learn.latest.desc", "Read ImHex's current changelog" },
{ "hex.builtin.welcome.learn.latest.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.builtin.welcome.learn.pattern.title", "Pattern Language Documentation" },
{ "hex.builtin.welcome.learn.pattern.desc", "Learn how to write ImHex patterns with our extensive documentation" },
{ "hex.builtin.welcome.learn.pattern.link", "https://imhex.werwolv.net/docs/pattern_language/pattern_language.html" },
{ "hex.builtin.welcome.learn.plugins.title", "Plugins API" },
{ "hex.builtin.welcome.learn.plugins.desc", "Extend ImHex with additional features using plugins" },
{ "hex.builtin.welcome.learn.plugins.link", "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide" },
{ "hex.builtin.welcome.header.various", "Various" },
{ "hex.builtin.welcome.tip_of_the_day", "Tip of the Day" },
{ "hex.welcome.header.main", "Welcome to ImHex" },
{ "hex.welcome.header.start", "Start" },
{ "hex.welcome.start.create_file", "Create New File" },
{ "hex.welcome.start.open_file", "Open File" },
{ "hex.welcome.start.open_project", "Open Project" },
{ "hex.welcome.start.recent", "Recent Files" },
{ "hex.welcome.start.open_other", "Other Providers" },
{ "hex.welcome.header.help", "Help" },
{ "hex.welcome.help.repo", "GitHub Repository" },
{ "hex.welcome.help.repo.link", "https://imhex.werwolv.net/git" },
{ "hex.welcome.help.gethelp", "Get Help" },
{ "hex.welcome.help.gethelp.link", "https://github.com/WerWolv/ImHex/discussions/categories/get-help" },
{ "hex.welcome.help.discord", "Discord Server" },
{ "hex.welcome.help.discord.link", "https://imhex.werwolv.net/discord" },
{ "hex.welcome.header.plugins", "Loaded Plugins" },
{ "hex.welcome.plugins.plugin", "Plugin" },
{ "hex.welcome.plugins.author", "Author" },
{ "hex.welcome.plugins.desc", "Description" },
{ "hex.welcome.header.customize", "Customize" },
{ "hex.welcome.customize.settings.title", "Settings" },
{ "hex.welcome.customize.settings.desc", "Change preferences of ImHex" },
{ "hex.welcome.header.update", "Updates" },
{ "hex.welcome.update.title", "New Update available!" },
{ "hex.welcome.update.desc", "ImHex {0} just released! Download it here." },
{ "hex.welcome.update.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.welcome.header.learn", "Learn" },
{ "hex.welcome.learn.latest.title", "Latest Release" },
{ "hex.welcome.learn.latest.desc", "Read ImHex's current changelog" },
{ "hex.welcome.learn.latest.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.welcome.learn.pattern.title", "Pattern Language Documentation" },
{ "hex.welcome.learn.pattern.desc", "Learn how to write ImHex patterns with our extensive documentation" },
{ "hex.welcome.learn.pattern.link", "https://imhex.werwolv.net/docs/pattern_language/pattern_language.html" },
{ "hex.welcome.learn.plugins.title", "Plugins API" },
{ "hex.welcome.learn.plugins.desc", "Extend ImHex with additional features using plugins" },
{ "hex.welcome.learn.plugins.link", "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide" },
{ "hex.welcome.header.various", "Various" },
{ "hex.welcome.tip_of_the_day", "Tip of the Day" },
{ "hex.safety_backup.title", "Restore lost data" },
{ "hex.safety_backup.desc", "Oh no, ImHex crashed last time.\nDo you want to restore your past work?"},
{ "hex.safety_backup.restore", "Yes, Restore" },
{ "hex.safety_backup.delete", "No, Delete" },
{ "hex.builtin.welcome.safety_backup.title", "Restore lost data" },
{ "hex.builtin.welcome.safety_backup.desc", "Oh no, ImHex crashed last time.\nDo you want to restore your past work?"},
{ "hex.builtin.welcome.safety_backup.restore", "Yes, Restore" },
{ "hex.builtin.welcome.safety_backup.delete", "No, Delete" },
{ "hex.common.little_endian", "Little Endian" },
{ "hex.common.big_endian", "Big Endian" },
{ "hex.common.decimal", "Decimal" },
{ "hex.common.hexadecimal", "Hexadecimal" },
{ "hex.common.octal", "Octal" },
{ "hex.common.info", "Information" },
{ "hex.common.error", "Error" },
{ "hex.common.fatal", "Fatal Error" },
{ "hex.common.address", "Address" },
{ "hex.common.size", "Size" },
{ "hex.common.region", "Region" },
{ "hex.common.match_selection", "Match Selection" },
{ "hex.common.yes", "Yes" },
{ "hex.common.no", "No" },
{ "hex.common.okay", "Okay" },
{ "hex.common.load", "Load" },
{ "hex.common.cancel", "Cancel" },
{ "hex.common.set", "Set" },
{ "hex.common.close", "Close" },
{ "hex.common.dont_show_again", "Don't show again" },
{ "hex.common.link", "Link" },
{ "hex.common.file", "File" },
{ "hex.common.open", "Open" },
{ "hex.common.browse", "Browse..." },
{ "hex.common.choose_file", "Choose file" },
{ "hex.builtin.common.little_endian", "Little Endian" },
{ "hex.builtin.common.big_endian", "Big Endian" },
{ "hex.builtin.common.decimal", "Decimal" },
{ "hex.builtin.common.hexadecimal", "Hexadecimal" },
{ "hex.builtin.common.octal", "Octal" },
{ "hex.builtin.common.info", "Information" },
{ "hex.builtin.common.error", "Error" },
{ "hex.builtin.common.fatal", "Fatal Error" },
{ "hex.builtin.common.address", "Address" },
{ "hex.builtin.common.size", "Size" },
{ "hex.builtin.common.region", "Region" },
{ "hex.builtin.common.match_selection", "Match Selection" },
{ "hex.builtin.common.yes", "Yes" },
{ "hex.builtin.common.no", "No" },
{ "hex.builtin.common.okay", "Okay" },
{ "hex.builtin.common.load", "Load" },
{ "hex.builtin.common.cancel", "Cancel" },
{ "hex.builtin.common.set", "Set" },
{ "hex.builtin.common.close", "Close" },
{ "hex.builtin.common.dont_show_again", "Don't show again" },
{ "hex.builtin.common.link", "Link" },
{ "hex.builtin.common.file", "File" },
{ "hex.builtin.common.open", "Open" },
{ "hex.builtin.common.browse", "Browse..." },
{ "hex.builtin.common.choose_file", "Choose file" },
{ "hex.message.file_handler_failed", "Failed to open file with registered file handler." },
/* Builtin plugin features */
{ "hex.builtin.message.file_handler_failed", "Failed to open file with registered file handler." },
{ "hex.builtin.menu.file", "File" },
{ "hex.builtin.menu.edit", "Edit" },
@@ -192,8 +186,8 @@ namespace hex::plugin::builtin {
{ "hex.builtin.view.hashes.function", "Hash function" },
{ "hex.builtin.view.hashes.iv", "Initial value" },
{ "hex.builtin.view.hashes.xorout", "Final XOR value" },
{ "hex.common.reflectIn", "Reflect input" },
{ "hex.common.reflectOut", "Reflect output" },
{ "hex.builtin.common.reflectIn", "Reflect input" },
{ "hex.builtin.common.reflectOut", "Reflect output" },
{ "hex.builtin.view.hashes.poly", "Polynomial" },
{ "hex.builtin.view.hashes.result", "Result" },

View File

@@ -7,82 +7,76 @@ namespace hex::plugin::builtin {
ContentRegistry::Language::registerLanguage("Italian", "it-IT");
ContentRegistry::Language::addLocalizations("it-IT", {
/* ImHex default functionality */
{ "hex.menu.feedback", "Lascia una Recensione" },
{ "hex.menu.debug_build", "Build di Debug"},
{ "hex.builtin.welcome.header.main", "Benvenuto in ImHex" },
{ "hex.builtin.welcome.header.start", "Inizia" },
{ "hex.builtin.welcome.start.create_file", "Crea un nuovo File" },
{ "hex.builtin.welcome.start.open_file", "Apri un File" },
{ "hex.builtin.welcome.start.open_project", "Apri un Progetto" },
{ "hex.builtin.welcome.start.recent", "File recenti" },
//{ "hex.builtin.welcome.start.open_other", "Other Providers" },
{ "hex.builtin.welcome.header.help", "Aiuto" },
{ "hex.builtin.welcome.help.repo", "Repo GitHub" },
{ "hex.builtin.welcome.help.repo.link", "https://imhex.werwolv.net/git" },
{ "hex.builtin.welcome.help.gethelp", "Chiedi aiuto" },
{ "hex.builtin.welcome.help.gethelp.link", "https://github.com/WerWolv/ImHex/discussions/categories/get-help" },
{ "hex.builtin.welcome.help.discord", "Server Discord" },
{ "hex.builtin.welcome.help.discord.link", "https://imhex.werwolv.net/discord" },
{ "hex.builtin.welcome.header.plugins", "Plugins caricati" },
{ "hex.builtin.welcome.plugins.plugin", "Plugin" },
{ "hex.builtin.welcome.plugins.author", "Autore" },
{ "hex.builtin.welcome.plugins.desc", "Descrizione" },
{ "hex.builtin.welcome.header.customize", "Personalizza" },
{ "hex.builtin.welcome.customize.settings.title", "Impostazioni" },
{ "hex.builtin.welcome.customize.settings.desc", "Cambia le preferenze di ImHex" },
{ "hex.builtin.welcome.header.update", "Aggiornamenti" },
{ "hex.builtin.welcome.update.title", "Nuovo aggiornamento disponibile!" },
{ "hex.builtin.welcome.update.desc", "ImHex {0} è appena stato rilasciato! Scaricalo qua" },
{ "hex.builtin.welcome.update.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.builtin.welcome.header.learn", "Scopri" },
{ "hex.builtin.welcome.learn.latest.title", "Ultima Versione" },
{ "hex.builtin.welcome.learn.latest.desc", "Leggi il nuovo changelog di ImHex'" },
{ "hex.builtin.welcome.learn.latest.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.builtin.welcome.learn.pattern.title", "Documentazione dei Pattern" },
{ "hex.builtin.welcome.learn.pattern.desc", "Scopri come scrivere pattern per ImHex con la nostra dettagliata documentazione" },
{ "hex.builtin.welcome.learn.pattern.link", "https://imhex.werwolv.net/docs/pattern_language/pattern_language.html" },
{ "hex.builtin.welcome.learn.plugins.title", "Plugins API" },
{ "hex.builtin.welcome.learn.plugins.desc", "Espandi l'utilizzo di ImHex con i Plugin" },
{ "hex.builtin.welcome.learn.plugins.link", "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide" },
{ "hex.builtin.welcome.header.various", "Varie" },
{ "hex.builtin.welcome.tip_of_the_day", "Consiglio del giorno" },
{ "hex.welcome.header.main", "Benvenuto in ImHex" },
{ "hex.welcome.header.start", "Inizia" },
{ "hex.welcome.start.create_file", "Crea un nuovo File" },
{ "hex.welcome.start.open_file", "Apri un File" },
{ "hex.welcome.start.open_project", "Apri un Progetto" },
{ "hex.welcome.start.recent", "File recenti" },
//{ "hex.welcome.start.open_other", "Other Providers" },
{ "hex.welcome.header.help", "Aiuto" },
{ "hex.welcome.help.repo", "Repo GitHub" },
{ "hex.welcome.help.repo.link", "https://imhex.werwolv.net/git" },
{ "hex.welcome.help.gethelp", "Chiedi aiuto" },
{ "hex.welcome.help.gethelp.link", "https://github.com/WerWolv/ImHex/discussions/categories/get-help" },
{ "hex.welcome.help.discord", "Server Discord" },
{ "hex.welcome.help.discord.link", "https://imhex.werwolv.net/discord" },
{ "hex.welcome.header.plugins", "Plugins caricati" },
{ "hex.welcome.plugins.plugin", "Plugin" },
{ "hex.welcome.plugins.author", "Autore" },
{ "hex.welcome.plugins.desc", "Descrizione" },
{ "hex.welcome.header.customize", "Personalizza" },
{ "hex.welcome.customize.settings.title", "Impostazioni" },
{ "hex.welcome.customize.settings.desc", "Cambia le preferenze di ImHex" },
{ "hex.welcome.header.update", "Aggiornamenti" },
{ "hex.welcome.update.title", "Nuovo aggiornamento disponibile!" },
{ "hex.welcome.update.desc", "ImHex {0} è appena stato rilasciato! Scaricalo qua" },
{ "hex.welcome.update.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.welcome.header.learn", "Scopri" },
{ "hex.welcome.learn.latest.title", "Ultima Versione" },
{ "hex.welcome.learn.latest.desc", "Leggi il nuovo changelog di ImHex'" },
{ "hex.welcome.learn.latest.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.welcome.learn.pattern.title", "Documentazione dei Pattern" },
{ "hex.welcome.learn.pattern.desc", "Scopri come scrivere pattern per ImHex con la nostra dettagliata documentazione" },
{ "hex.welcome.learn.pattern.link", "https://imhex.werwolv.net/docs/pattern_language/pattern_language.html" },
{ "hex.welcome.learn.plugins.title", "Plugins API" },
{ "hex.welcome.learn.plugins.desc", "Espandi l'utilizzo di ImHex con i Plugin" },
{ "hex.welcome.learn.plugins.link", "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide" },
{ "hex.welcome.header.various", "Varie" },
{ "hex.welcome.tip_of_the_day", "Consiglio del giorno" },
{ "hex.builtin.welcome.safety_backup.title", "Ripristina i dati persi" },
{ "hex.builtin.welcome.safety_backup.desc", "Oh no, l'ultima volta ImHex è crashato.\nVuoi ripristinare il tuo lavoro?"},
{ "hex.builtin.welcome.safety_backup.restore", "Sì, Ripristina" },
{ "hex.builtin.welcome.safety_backup.delete", "No, Elimina" },
{ "hex.safety_backup.title", "Ripristina i dati persi" },
{ "hex.safety_backup.desc", "Oh no, l'ultima volta ImHex è crashato.\nVuoi ripristinare il tuo lavoro?"},
{ "hex.safety_backup.restore", "Sì, Ripristina" },
{ "hex.safety_backup.delete", "No, Elimina" },
{ "hex.builtin.common.little_endian", "Little Endian" },
{ "hex.builtin.common.big_endian", "Big Endian" },
{ "hex.builtin.common.decimal", "Decimale" },
{ "hex.builtin.common.hexadecimal", "Esadecimale" },
{ "hex.builtin.common.octal", "Ottale" },
{ "hex.builtin.common.info", "Informazioni" },
{ "hex.builtin.common.error", "Errore" },
{ "hex.builtin.common.fatal", "Errore Fatale" },
{ "hex.builtin.common.address", "Indirizzo" },
{ "hex.builtin.common.size", "Dimensione" },
{ "hex.builtin.common.region", "Regione" },
{ "hex.builtin.common.match_selection", "Seleziona abbinamento" },
{ "hex.builtin.common.yes", "" },
{ "hex.builtin.common.no", "No" },
{ "hex.builtin.common.okay", "Okay" },
{ "hex.builtin.common.load", "Carica" },
{ "hex.builtin.common.cancel", "Cancella" },
{ "hex.builtin.common.set", "Imposta" },
{ "hex.builtin.common.close", "Chiudi" },
{ "hex.builtin.common.dont_show_again", "Non mostrare di nuovo" },
{ "hex.builtin.common.link", "Link" },
{ "hex.builtin.common.file", "File" },
{ "hex.builtin.common.open", "Apri" },
{ "hex.builtin.common.browse", "Esplora..." },
{ "hex.builtin.common.choose_file", "Scegli file" },
{ "hex.common.little_endian", "Little Endian" },
{ "hex.common.big_endian", "Big Endian" },
{ "hex.common.decimal", "Decimale" },
{ "hex.common.hexadecimal", "Esadecimale" },
{ "hex.common.octal", "Ottale" },
{ "hex.common.info", "Informazioni" },
{ "hex.common.error", "Errore" },
{ "hex.common.fatal", "Errore Fatale" },
{ "hex.common.address", "Indirizzo" },
{ "hex.common.size", "Dimensione" },
{ "hex.common.region", "Regione" },
{ "hex.common.match_selection", "Seleziona abbinamento" },
{ "hex.common.yes", "" },
{ "hex.common.no", "No" },
{ "hex.common.okay", "Okay" },
{ "hex.common.load", "Carica" },
{ "hex.common.cancel", "Cancella" },
{ "hex.common.set", "Imposta" },
{ "hex.common.close", "Chiudi" },
{ "hex.common.dont_show_again", "Non mostrare di nuovo" },
{ "hex.common.link", "Link" },
{ "hex.common.file", "File" },
{ "hex.common.open", "Apri" },
{ "hex.common.browse", "Esplora..." },
{ "hex.common.choose_file", "Scegli file" },
{ "hex.message.file_handler_failed", "Impossibile aprire il file con il gestore di file registrato." },
/* Builtin plugin features */
{ "hex.builtin.message.file_handler_failed", "Impossibile aprire il file con il gestore di file registrato." },
{ "hex.builtin.menu.file", "File" },
{ "hex.builtin.menu.edit", "Modifica" },
@@ -118,7 +112,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.view.data_processor.menu.file.load_processor", "Caricare processore di dati..." },
{ "hex.builtin.view.data_processor.menu.file.save_processor", "Salva processore di dati..." },
{ "hex.builtin.view.disassembler.name", "Disassembla" },
{ "hex.builtin.view.disassembler.name", "Disassembla" },
{ "hex.builtin.view.disassembler.position", "Posiziona" },
{ "hex.builtin.view.disassembler.base", "Indirizzo di base" },
{ "hex.builtin.view.disassembler.region", "Regione del Codice" },

View File

@@ -7,83 +7,77 @@ namespace hex::plugin::builtin {
ContentRegistry::Language::registerLanguage("Chinese (Simplified)", "zh-CN");
ContentRegistry::Language::addLocalizations("zh-CN", {
/* ImHex default functionality */
{ "hex.menu.feedback", "反馈" },
{ "hex.menu.debug_build", "调试构建"},
{ "hex.builtin.welcome.header.main", "欢迎来到ImHex" },
{ "hex.builtin.welcome.header.start", "开始" },
{ "hex.builtin.welcome.start.create_file", "创建新文件" },
{ "hex.builtin.welcome.start.open_file", "打开文件" },
{ "hex.builtin.welcome.start.open_project", "打开工程" },
{ "hex.builtin.welcome.start.recent", "最近文件" },
{ "hex.builtin.welcome.start.open_other", "其他提供者" },
{ "hex.builtin.welcome.header.help", "帮助" },
{ "hex.builtin.welcome.help.repo", "GitHub仓库" },
{ "hex.builtin.welcome.help.repo.link", "https://imhex.werwolv.net/git" },
{ "hex.builtin.welcome.help.gethelp", "获得帮助" },
{ "hex.builtin.welcome.help.gethelp.link", "https://github.com/WerWolv/ImHex/discussions/categories/get-help" },
{ "hex.builtin.welcome.help.discord", "Discord服务器" },
{ "hex.builtin.welcome.help.discord.link", "https://imhex.werwolv.net/discord" },
{ "hex.builtin.welcome.header.plugins", "已加载插件" },
{ "hex.builtin.welcome.plugins.plugin", "插件" },
{ "hex.builtin.welcome.plugins.author", "作者" },
{ "hex.builtin.welcome.plugins.desc", "描述" },
{ "hex.builtin.welcome.header.customize", "自定义" },
{ "hex.builtin.welcome.customize.settings.title", "设置" },
{ "hex.builtin.welcome.customize.settings.desc", "更改ImHex的设置" },
{ "hex.builtin.welcome.header.update", "更新" },
{ "hex.builtin.welcome.update.title", "新的更新可用!" },
{ "hex.builtin.welcome.update.desc", "ImHex {0} 已发布!在这里下载。" },
{ "hex.builtin.welcome.update.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.builtin.welcome.header.learn", "学习" },
{ "hex.builtin.welcome.learn.latest.title", "最新版本" },
{ "hex.builtin.welcome.learn.latest.desc", "阅读ImHex最新版本的更改日志" },
{ "hex.builtin.welcome.learn.latest.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.builtin.welcome.learn.pattern.title", "模式文档" },
{ "hex.builtin.welcome.learn.pattern.desc", "如何基于我们完善的文档编写ImHex模式" },
{ "hex.builtin.welcome.learn.pattern.link", "https://imhex.werwolv.net/docs/pattern_language/pattern_language.html" },
{ "hex.builtin.welcome.learn.plugins.title", "插件API" },
{ "hex.builtin.welcome.learn.plugins.desc", "通过插件扩展ImHex获得更多功能" },
{ "hex.builtin.welcome.learn.plugins.link", "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide" },
{ "hex.builtin.welcome.header.various", "杂项" },
{ "hex.builtin.welcome.tip_of_the_day", "小提示" },
{ "hex.welcome.header.main", "欢迎来到ImHex" },
{ "hex.welcome.header.start", "开始" },
{ "hex.welcome.start.create_file", "创建新文件" },
{ "hex.welcome.start.open_file", "打开文件" },
{ "hex.welcome.start.open_project", "打开工程" },
{ "hex.welcome.start.recent", "最近文件" },
{ "hex.welcome.start.open_other", "其他提供者" },
{ "hex.welcome.header.help", "帮助" },
{ "hex.welcome.help.repo", "GitHub仓库" },
{ "hex.welcome.help.repo.link", "https://imhex.werwolv.net/git" },
{ "hex.welcome.help.gethelp", "获得帮助" },
{ "hex.welcome.help.gethelp.link", "https://github.com/WerWolv/ImHex/discussions/categories/get-help" },
{ "hex.welcome.help.discord", "Discord服务器" },
{ "hex.welcome.help.discord.link", "https://imhex.werwolv.net/discord" },
{ "hex.welcome.header.plugins", "已加载插件" },
{ "hex.welcome.plugins.plugin", "插件" },
{ "hex.welcome.plugins.author", "作者" },
{ "hex.welcome.plugins.desc", "描述" },
{ "hex.welcome.header.customize", "自定义" },
{ "hex.welcome.customize.settings.title", "设置" },
{ "hex.welcome.customize.settings.desc", "更改ImHex的设置" },
{ "hex.welcome.header.update", "更新" },
{ "hex.welcome.update.title", "新的更新可用!" },
{ "hex.welcome.update.desc", "ImHex {0} 已发布!在这里下载。" },
{ "hex.welcome.update.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.welcome.header.learn", "学习" },
{ "hex.welcome.learn.latest.title", "最新版本" },
{ "hex.welcome.learn.latest.desc", "阅读ImHex最新版本的更改日志" },
{ "hex.welcome.learn.latest.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.welcome.learn.pattern.title", "模式文档" },
{ "hex.welcome.learn.pattern.desc", "如何基于我们完善的文档编写ImHex模式" },
{ "hex.welcome.learn.pattern.link", "https://imhex.werwolv.net/docs/pattern_language/pattern_language.html" },
{ "hex.welcome.learn.plugins.title", "插件API" },
{ "hex.welcome.learn.plugins.desc", "通过插件扩展ImHex获得更多功能" },
{ "hex.welcome.learn.plugins.link", "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide" },
{ "hex.welcome.header.various", "杂项" },
{ "hex.welcome.tip_of_the_day", "小提示" },
{ "hex.safety_backup.title", "恢复丢失数据" },
{ "hex.safety_backup.desc", "ImHex上次崩溃了\n你想恢复你之前的工作吗?"},
{ "hex.safety_backup.restore", "恢复" },
{ "hex.safety_backup.delete", "删除" },
{ "hex.builtin.welcome.safety_backup.title", "恢复丢失数据" },
{ "hex.builtin.welcome.safety_backup.desc", "ImHex上次崩溃了\n你想恢复你之前的工作吗?"},
{ "hex.builtin.welcome.safety_backup.restore", "恢复" },
{ "hex.builtin.welcome.safety_backup.delete", "删除" },
{ "hex.common.little_endian", "小端序" },
{ "hex.common.big_endian", "大端序" },
{ "hex.common.decimal", "十进制" },
{ "hex.common.hexadecimal", "十六进制" },
{ "hex.common.octal", "八进制" },
{ "hex.common.info", "信息" },
{ "hex.common.error", "错误" },
{ "hex.common.fatal", "致命错误" },
{ "hex.common.address", "地址" },
{ "hex.common.size", "大小" },
{ "hex.common.region", "区域" },
{ "hex.common.match_selection", "匹配选择" },
{ "hex.common.yes", "" },
{ "hex.common.no", "" },
{ "hex.common.okay", "好的" },
{ "hex.common.load", "加载" },
{ "hex.common.cancel", "取消" },
{ "hex.common.set", "设置" },
{ "hex.common.close", "关闭文件" },
{ "hex.common.dont_show_again", "不要再次显示" },
{ "hex.common.link", "链接" },
{ "hex.common.file", "文件" },
{ "hex.common.open", "打开" },
{ "hex.common.browse", "浏览..." },
{ "hex.common.choose_file", "选择文件" },
{ "hex.builtin.common.little_endian", "小端序" },
{ "hex.builtin.common.big_endian", "大端序" },
{ "hex.builtin.common.decimal", "十进制" },
{ "hex.builtin.common.hexadecimal", "十六进制" },
{ "hex.builtin.common.octal", "八进制" },
{ "hex.builtin.common.info", "信息" },
{ "hex.builtin.common.error", "错误" },
{ "hex.builtin.common.fatal", "致命错误" },
{ "hex.builtin.common.address", "地址" },
{ "hex.builtin.common.size", "大小" },
{ "hex.builtin.common.region", "区域" },
{ "hex.builtin.common.match_selection", "匹配选择" },
{ "hex.builtin.common.yes", "" },
{ "hex.builtin.common.no", "" },
{ "hex.builtin.common.okay", "好的" },
{ "hex.builtin.common.load", "加载" },
{ "hex.builtin.common.cancel", "取消" },
{ "hex.builtin.common.set", "设置" },
{ "hex.builtin.common.close", "关闭文件" },
{ "hex.builtin.common.dont_show_again", "不要再次显示" },
{ "hex.builtin.common.link", "链接" },
{ "hex.builtin.common.file", "文件" },
{ "hex.builtin.common.open", "打开" },
{ "hex.builtin.common.browse", "浏览..." },
{ "hex.builtin.common.choose_file", "选择文件" },
{ "hex.message.file_handler_failed", "通过注册的文件处理器打开文件失败。" },
/* Builtin plugin features */
{ "hex.builtin.message.file_handler_failed", "通过注册的文件处理器打开文件失败。" },
{ "hex.builtin.menu.file", "文件" },
{ "hex.builtin.menu.edit", "编辑" },

View File

@@ -8,7 +8,9 @@
#include <imgui.h>
#include <hex/ui/imgui_imhex_extensions.h>
#include <fontawesome_font.h>
#include <codicons_font.h>
namespace hex::plugin::windows {
@@ -24,6 +26,29 @@ namespace hex::plugin::windows {
return a.QuadPart - b.QuadPart;
}
void addTitleBarButtons() {
#if defined(DEBUG)
ContentRegistry::Interface::addTitleBarButton(ICON_VS_DEBUG, "hex.windows.title_bar_button.debug_build", []{
if (ImGui::GetIO().KeyCtrl) {
// Explicitly trigger a segfault by writing to an invalid memory location
// Used for debugging crashes
*reinterpret_cast<u8 *>(0x10) = 0x10;
} else if (ImGui::GetIO().KeyShift) {
// Explicitly trigger an abort by throwing an uncaught exception
// Used for debugging exception errors
throw std::runtime_error("Debug Error");
} else {
hex::openWebpage("https://imhex.werwolv.net/debug");
}
});
#endif
ContentRegistry::Interface::addTitleBarButton(ICON_VS_SMILEY, "hex.windows.title_bar_button.feedback", []{
hex::openWebpage("mailto://hey@werwolv.net");
});
}
void addFooterItems() {
ContentRegistry::Interface::addFooterItem([] {

View File

@@ -5,6 +5,9 @@ namespace hex::plugin::windows {
void registerLanguageEnUS() {
ContentRegistry::Language::addLocalizations("en-US", {
{ "hex.windows.title_bar_button.feedback", "Leave Feedback" },
{ "hex.windows.title_bar_button.debug_build", "Debug build"},
{ "hex.windows.view.tty_console.name", "TTY Console" },
{ "hex.windows.view.tty_console.config", "Configuration"},
{ "hex.windows.view.tty_console.port", "Port" },

View File

@@ -5,6 +5,9 @@ namespace hex::plugin::windows {
void registerLanguageZhCN() {
ContentRegistry::Language::addLocalizations("zh-CN", {
{ "hex.windows.title_bar_button.feedback", "反馈" },
{ "hex.windows.title_bar_button.debug_build", "调试构建"},
{ "hex.windows.view.tty_console.name", "TTY控制台" },
{ "hex.windows.view.tty_console.config", "配置"},
{ "hex.windows.view.tty_console.port", "端口" },

View File

@@ -10,6 +10,7 @@ namespace hex::plugin::windows {
void registerLanguageZhCN();
void addFooterItems();
void addTitleBarButtons();
void registerSettings();
}
@@ -23,5 +24,6 @@ IMHEX_PLUGIN_SETUP("Windows", "WerWolv", "Windows-only features") {
registerLanguageZhCN();
addFooterItems();
addTitleBarButtons();
registerSettings();
}