feat: Added a description to the IEEE754 decoder tool

This commit is contained in:
WerWolv
2023-01-19 17:01:19 +01:00
parent b54e6ea531
commit 17b0f2ae77
2 changed files with 7 additions and 3 deletions

View File

@@ -1113,7 +1113,7 @@ namespace hex::plugin::builtin {
}
}
void drawIEEE754Helper() {
void drawIEEE754Decoder() {
static u128 value = 0x00;
static int exponentBitCount = 8, mantissaBitCount = 23;
@@ -1147,6 +1147,9 @@ namespace hex::plugin::builtin {
const auto exponentBits = ExtractBits(exponentBitPosition, exponentBitCount);
const auto mantissaBits = ExtractBits(mantissaBitPosition, mantissaBitCount);
ImGui::TextFormattedWrapped("{}", "hex.builtin.tools.ieee754.description"_lang);
ImGui::NewLine();
if (ImGui::BeginTable("##outer", 4, ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_NoKeepColumnsVisible | ImGuiTableFlags_ScrollX, ImVec2(0, ImGui::GetTextLineHeightWithSpacing() * 4))) {
ImGui::TableSetupColumn("hex.builtin.tools.ieee754.sign"_lang);
ImGui::TableSetupColumn("hex.builtin.tools.ieee754.exponent"_lang);
@@ -1326,7 +1329,7 @@ namespace hex::plugin::builtin {
ContentRegistry::Tools::add("hex.builtin.tools.file_uploader", drawFileUploader);
ContentRegistry::Tools::add("hex.builtin.tools.wiki_explain", drawWikiExplainer);
ContentRegistry::Tools::add("hex.builtin.tools.file_tools", drawFileTools);
ContentRegistry::Tools::add("hex.builtin.tools.ieee754", drawIEEE754Helper);
ContentRegistry::Tools::add("hex.builtin.tools.ieee754", drawIEEE754Decoder);
}
}