diff --git a/plugins/builtin/romfs/lang/en_US.json b/plugins/builtin/romfs/lang/en_US.json index be7b97259..1fd4104fb 100644 --- a/plugins/builtin/romfs/lang/en_US.json +++ b/plugins/builtin/romfs/lang/en_US.json @@ -465,7 +465,8 @@ "hex.builtin.tools.format.scientific": "Scientific", "hex.builtin.tools.format.standard": "Standard", "hex.builtin.tools.history": "History", - "hex.builtin.tools.ieee754": "IEEE 754 Floating Point Tester", + "hex.builtin.tools.ieee754": "IEEE 754 Floating Point Decoder", + "hex.builtin.tools.ieee754.description": "IEEE754 is a standard for representing floating point numbers which is used by most modern CPUs.\n\nThis tool visualizes the internal representation of a floating point number and allows decoding of numbers with a non-standard number of mantissa or exponent bits.", "hex.builtin.tools.ieee754.double_precision": "Double Precision", "hex.builtin.tools.ieee754.exponent": "Exponent", "hex.builtin.tools.ieee754.exponent_size": "Exponent Size", diff --git a/plugins/builtin/source/content/tools_entries.cpp b/plugins/builtin/source/content/tools_entries.cpp index aa0c456c0..1bb2e3fab 100644 --- a/plugins/builtin/source/content/tools_entries.cpp +++ b/plugins/builtin/source/content/tools_entries.cpp @@ -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); } }