mirror of https://github.com/WerWolv/ImHex.git
impr: Upper case pattern data export options
This commit is contained in:
parent
da11c47693
commit
3fe6cd057b
|
@ -1057,11 +1057,16 @@ namespace hex::plugin::builtin::ui {
|
|||
ImGui::SetNextWindowPos(ImGui::GetWindowPos() + ImVec2(startPos.x, ImGui::GetCursorPosY()));
|
||||
if (ImGui::BeginPopup("ExportPatterns")) {
|
||||
for (const auto &formatter : this->m_formatters) {
|
||||
const auto &name = formatter->getName();
|
||||
const auto name = [&]{
|
||||
auto name = formatter->getName();
|
||||
std::transform(name.begin(), name.end(), name.begin(), [](char c){ return char(std::toupper(c)); });
|
||||
|
||||
return name;
|
||||
}();
|
||||
|
||||
const auto &extension = formatter->getFileExtension();
|
||||
|
||||
if (ImGui::MenuItem(name.c_str())) {
|
||||
|
||||
fs::openFileBrowser(fs::DialogMode::Save, { { name.c_str(), extension.c_str() } }, [&](const std::fs::path &path) {
|
||||
auto result = formatter->format(*runtime);
|
||||
|
||||
|
|
Loading…
Reference in New Issue