|
|
@ -6,14 +6,18 @@ using namespace olc; |
|
|
|
extern FaceBall* game; |
|
|
|
extern FaceBall* game; |
|
|
|
|
|
|
|
|
|
|
|
void Editor::Update(float fElapsedTime){ |
|
|
|
void Editor::Update(float fElapsedTime){ |
|
|
|
if (!game->IsTextEntryEnabled()){ |
|
|
|
LoadLevelHandling(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Editor::LoadLevelHandling() { |
|
|
|
|
|
|
|
if (!game->IsTextEntryEnabled()) { |
|
|
|
if (game->GetKey(F1).bPressed || reEnableTextEntry) { |
|
|
|
if (game->GetKey(F1).bPressed || reEnableTextEntry) { |
|
|
|
game->TextEntryEnable(true); |
|
|
|
game->TextEntryEnable(true); |
|
|
|
reEnableTextEntry = false; |
|
|
|
reEnableTextEntry = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
game->DrawStringDecal({ 0,0 }, "Enter Level (1-30): "+game->TextEntryGetString(), WHITE, {4,4}); |
|
|
|
game->DrawStringDecal({ 0,0 }, "Enter Level (1-30): " + game->TextEntryGetString(), WHITE, { 4,4 }); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|