mirror of https://github.com/WerWolv/ImHex.git
ui: Improved command palette
This commit is contained in:
parent
a67263fa27
commit
2e05845410
|
@ -28,9 +28,9 @@ namespace hex::plugin::builtin {
|
|||
|
||||
|
||||
if (result.has_value())
|
||||
return hex::format("#{0} = %{1}", input.data(), result.value());
|
||||
return hex::format("#{0} = {1}", input.data(), result.value());
|
||||
else
|
||||
return hex::format("#{0} = ???", input.data());
|
||||
return std::string("???");
|
||||
});
|
||||
|
||||
ContentRegistry::CommandPaletteCommands::add(
|
||||
|
|
|
@ -45,6 +45,11 @@ namespace hex {
|
|||
}
|
||||
|
||||
if (this->m_focusInputTextBox) {
|
||||
auto textState = ImGui::GetInputTextState(ImGui::GetID("##command_input"));
|
||||
if (textState != nullptr) {
|
||||
textState->Stb.cursor = strlen(this->m_commandBuffer.data());
|
||||
}
|
||||
|
||||
ImGui::SetKeyboardFocusHere(0);
|
||||
this->m_focusInputTextBox = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue