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,
|
||||
callback, nullptr);
|
||||
ImGui::SameLine();
|
||||
if((!_unsafeMode && _mbManager->gameState() != GameState::NotRunning) ||
|
||||
!(len >= 6 && len <= 32) || !(name_view[0] != ' ' && name_view[len - 1] != ' '))
|
||||
GameState game_state = _mbManager->gameState();
|
||||
if((!_unsafeMode && game_state != GameState::NotRunning) ||
|
||||
!(len >= 6 && len <= 32) ||
|
||||
!(name_view[0] != ' ' && name_view[len - 1] != ' '))
|
||||
{
|
||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.5f);
|
||||
|
@ -173,8 +175,9 @@ auto SaveTool::drawRenamePopup(Containers::ArrayView<char> name_view) -> bool {
|
|||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
|
||||
if((!_unsafeMode && _mbManager->gameState() != GameState::NotRunning) ||
|
||||
!(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::PopItemFlag();
|
||||
ImGui::PopStyleVar();
|
||||
|
|
Loading…
Reference in a new issue