use certain methods from std namespace
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
*/
|
||||
|
||||
#include "Gwen/Anim.h"
|
||||
#include "Gwen/Utility.h"
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "Gwen/Utility.h"
|
||||
|
||||
using namespace Gwen;
|
||||
|
||||
@@ -123,13 +124,12 @@ void Gwen::Anim::TimedAnimation::Think()
|
||||
if (fDelta < 0.0f) fDelta = 0.0f;
|
||||
if (fDelta > 1.0f) fDelta = 1.0f;
|
||||
|
||||
Run(pow(fDelta, m_fEase));
|
||||
Run(std::pow(fDelta, m_fEase));
|
||||
|
||||
if (fDelta == 1.0f)
|
||||
{
|
||||
m_bFinished = true;
|
||||
OnFinish();
|
||||
}
|
||||
if (fDelta == 1.0f) {
|
||||
m_bFinished = true;
|
||||
OnFinish();
|
||||
}
|
||||
}
|
||||
|
||||
bool Gwen::Anim::TimedAnimation::Finished()
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user