use certain methods from std namespace

This commit is contained in:
Erwin Coumans
2019-03-23 12:45:59 -07:00
parent 3768bbcae3
commit 0409478152
6 changed files with 43 additions and 37 deletions

View File

@@ -11,6 +11,7 @@
#include "Gwen/Platform.h"
#include <math.h>
#include <cmath>
using namespace Gwen;
using namespace Gwen::Controls;
@@ -89,9 +90,10 @@ void TextBox::Render(Skin::Base* skin)
}
// Draw caret
if (fmod(Gwen::Platform::GetTimeInSeconds() - m_fLastInputTime, 1.0f) > 0.5f)
skin->GetRender()->SetDrawColor(Gwen::Color(255, 255, 255, 255));
else
if (std::fmod(Gwen::Platform::GetTimeInSeconds() - m_fLastInputTime,
1.0f) > 0.5f)
skin->GetRender()->SetDrawColor(Gwen::Color(255, 255, 255, 255));
else
skin->GetRender()->SetDrawColor(Gwen::Color(0, 0, 0, 255));
skin->GetRender()->DrawFilledRect(m_rectCaretBounds);