SaveTool: improve readability.
This commit is contained in:
parent
ed25f7f5fa
commit
476eb2b1e6
1 changed files with 7 additions and 4 deletions
|
@ -161,8 +161,10 @@ auto SaveTool::drawRenamePopup(Containers::ArrayView<char> name_view) -> bool {
|
||||||
ImGuiInputTextFlags_CallbackCharFilter,
|
ImGuiInputTextFlags_CallbackCharFilter,
|
||||||
callback, nullptr);
|
callback, nullptr);
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if((!_unsafeMode && _mbManager->gameState() != GameState::NotRunning) ||
|
GameState game_state = _mbManager->gameState();
|
||||||
!(len >= 6 && len <= 32) || !(name_view[0] != ' ' && name_view[len - 1] != ' '))
|
if((!_unsafeMode && game_state != GameState::NotRunning) ||
|
||||||
|
!(len >= 6 && len <= 32) ||
|
||||||
|
!(name_view[0] != ' ' && name_view[len - 1] != ' '))
|
||||||
{
|
{
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.5f);
|
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.5f);
|
||||||
|
@ -173,8 +175,9 @@ auto SaveTool::drawRenamePopup(Containers::ArrayView<char> name_view) -> bool {
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
if((!_unsafeMode && _mbManager->gameState() != GameState::NotRunning) ||
|
if((!_unsafeMode && game_state != GameState::NotRunning) ||
|
||||||
!(len >= 6 && len <= 32) || !(name_view[0] != ' ' && name_view[len - 1] != ' '))
|
!(len >= 6 && len <= 32) ||
|
||||||
|
!(name_view[0] != ' ' && name_view[len - 1] != ' '))
|
||||||
{
|
{
|
||||||
ImGui::PopItemFlag();
|
ImGui::PopItemFlag();
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
|
|
Loading…
Reference in a new issue