GL - Fixed some warnings.

This commit is contained in:
Pontus Fransson 2014-02-14 09:44:21 +01:00
parent 2dee9dd084
commit 06ae4d29dd
5 changed files with 25 additions and 14 deletions

View File

@ -21,16 +21,20 @@ namespace DanBias
ButtonEllipse() ButtonEllipse()
: EventButtonGUI(), radius(0) : EventButtonGUI(), radius(0)
{} {}
ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButtonGUI(textureName, buttonText, textColor, owner, pos, size, resize) : EventButtonGUI(textureName, buttonText, textColor, owner, pos, size, resize)
{} {}
ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButtonGUI(textureName, buttonText, textColor, func, pos, size, resize) : EventButtonGUI(textureName, buttonText, textColor, func, pos, size, resize)
{} {}
ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButtonGUI(textureName, buttonText, textColor, func, owner, pos, size, resize) : EventButtonGUI(textureName, buttonText, textColor, func, owner, pos, size, resize)
{} {}
ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, void* userData, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) ButtonEllipse(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, void* userData, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButtonGUI(textureName, buttonText, textColor, func, owner, userData, pos, size, resize) : EventButtonGUI(textureName, buttonText, textColor, func, owner, userData, pos, size, resize)
{} {}
virtual ~ButtonEllipse() virtual ~ButtonEllipse()

View File

@ -21,16 +21,20 @@ namespace DanBias
ButtonRectangle() ButtonRectangle()
: EventButtonGUI(), width(0), height(0) : EventButtonGUI(), width(0), height(0)
{} {}
ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButtonGUI(textureName, buttonText, textColor, owner, pos, size, resize) : EventButtonGUI(textureName, buttonText, textColor, owner, pos, size, resize)
{} {}
ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButtonGUI(textureName, buttonText, textColor, func, pos, size, resize) : EventButtonGUI(textureName, buttonText, textColor, func, pos, size, resize)
{} {}
ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButtonGUI(textureName, buttonText, textColor, func, owner, pos, size, resize) : EventButtonGUI(textureName, buttonText, textColor, func, owner, pos, size, resize)
{} {}
ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, void* userData, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) ButtonRectangle(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, void* userData, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButtonGUI(textureName, buttonText, textColor, func, owner, userData, pos, size, resize) : EventButtonGUI(textureName, buttonText, textColor, func, owner, userData, pos, size, resize)
{} {}
virtual ~ButtonRectangle() virtual ~ButtonRectangle()

View File

@ -35,19 +35,22 @@ namespace DanBias
EventButtonGUI() EventButtonGUI()
: EventButton(), pos(0, 0), size(0, 0), texture(NULL), buttonText(""), textColor(0, 0, 0) : EventButton(), pos(0, 0), size(0, 0), texture(NULL), buttonText(""), textColor(0, 0, 0)
{} {}
EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, Owner owner, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButton(owner), pos(pos), size(size), texture(NULL), buttonText(buttonText), textColor(textColor) : EventButton(owner), pos(pos), size(size), texture(NULL), buttonText(buttonText), textColor(textColor)
{ {
CreateTexture(textureName); CreateTexture(textureName);
if(resize != ResizeAspectRatio_None) ResizeWithAspectRatio(resize); if(resize != ResizeAspectRatio_None) ResizeWithAspectRatio(resize);
} }
EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButton(func), pos(pos), size(size), texture(NULL), buttonText(buttonText), textColor(textColor) : EventButton(func), pos(pos), size(size), texture(NULL), buttonText(buttonText), textColor(textColor)
{ {
CreateTexture(textureName); CreateTexture(textureName);
if(resize != ResizeAspectRatio_None) ResizeWithAspectRatio(resize); if(resize != ResizeAspectRatio_None) ResizeWithAspectRatio(resize);
} }
EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos, Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height) EventButtonGUI(std::wstring textureName, std::wstring buttonText, Oyster::Math::Float3 textColor, EventFunc func, Owner owner, Oyster::Math::Float3 pos,
Oyster::Math::Float2 size, ResizeAspectRatio resize = ResizeAspectRatio_Height)
: EventButton(func, owner), pos(pos), size(size), texture(NULL), buttonText(buttonText), textColor(textColor) : EventButton(func, owner), pos(pos), size(size), texture(NULL), buttonText(buttonText), textColor(textColor)
{ {
CreateTexture(textureName); CreateTexture(textureName);

View File

@ -15,7 +15,7 @@ EventButtonCollection::EventButtonCollection(EventCollectionState state)
EventButtonCollection::~EventButtonCollection() EventButtonCollection::~EventButtonCollection()
{ {
for(int i = 0; i < EventHandler::Instance().collections.size(); i++) for(int i = 0; i < (int)EventHandler::Instance().collections.size(); i++)
{ {
if(EventHandler::Instance().collections.at(i) == this) if(EventHandler::Instance().collections.at(i) == this)
{ {

View File

@ -53,7 +53,7 @@ void EventHandler::RenderText()
void EventHandler::AddCollection(EventButtonCollection* collection) void EventHandler::AddCollection(EventButtonCollection* collection)
{ {
for(int i = 0; i < collections.size(); i++) for(int i = 0; i < (int)collections.size(); i++)
{ {
//Do not add the collection if it's already in the list. //Do not add the collection if it's already in the list.
if(collections.at(i) == collection) if(collections.at(i) == collection)
@ -64,7 +64,7 @@ void EventHandler::AddCollection(EventButtonCollection* collection)
void EventHandler::ReleaseCollection(EventButtonCollection* collection) void EventHandler::ReleaseCollection(EventButtonCollection* collection)
{ {
for(int i = 0; i < collections.size(); i++) for(int i = 0; i < (int)collections.size(); i++)
{ {
if(collections.at(i) == collection) if(collections.at(i) == collection)
{ {