Frame And Rectangle work
This commit is contained in:
@@ -143,6 +143,7 @@
|
|||||||
<ClInclude Include="glerror.h" />
|
<ClInclude Include="glerror.h" />
|
||||||
<ClInclude Include="MenuFrame.h" />
|
<ClInclude Include="MenuFrame.h" />
|
||||||
<ClInclude Include="Model.h" />
|
<ClInclude Include="Model.h" />
|
||||||
|
<ClInclude Include="Rectangle.h" />
|
||||||
<ClInclude Include="Renderer.h" />
|
<ClInclude Include="Renderer.h" />
|
||||||
<ClInclude Include="ShaderProgram.h" />
|
<ClInclude Include="ShaderProgram.h" />
|
||||||
<ClInclude Include="Systems\InputSystem.h" />
|
<ClInclude Include="Systems\InputSystem.h" />
|
||||||
|
|||||||
@@ -140,6 +140,7 @@
|
|||||||
<Filter>GUI</Filter>
|
<Filter>GUI</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="GameWorld.h" />
|
<ClInclude Include="GameWorld.h" />
|
||||||
|
<ClInclude Include="Rectangle.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Shaders\Fragment.glsl">
|
<None Include="Shaders\Fragment.glsl">
|
||||||
|
|||||||
@@ -0,0 +1,92 @@
|
|||||||
|
/*#include "Frame.h"
|
||||||
|
|
||||||
|
GUI::Frame::Frame()
|
||||||
|
{
|
||||||
|
rectangle = new Rectangle();
|
||||||
|
}
|
||||||
|
|
||||||
|
int GUI::Frame::GetWidth()
|
||||||
|
{
|
||||||
|
return rectangle;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GUI::Frame::GetHeight()
|
||||||
|
{
|
||||||
|
return rectangle.Height();
|
||||||
|
}
|
||||||
|
|
||||||
|
int GUI::Frame::GetX()
|
||||||
|
{
|
||||||
|
return rectangle;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GUI::Frame::GetY()
|
||||||
|
{
|
||||||
|
return rectangle.Y();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUI::Frame::SetWidth(int wid)
|
||||||
|
{
|
||||||
|
rectangle.width(wid);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUI::Frame::SetHeight(int hei)
|
||||||
|
{
|
||||||
|
rectangle.height(hei);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUI::Frame::SetX(int xcord)
|
||||||
|
{
|
||||||
|
rectangle.X(xcord)
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUI::Frame::SetY(int ycord)
|
||||||
|
{
|
||||||
|
rectangle.Y(ycord)
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle GUI::Frame::AbsouluteRectangle()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GUI::Frame::Visible()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int GUI::Frame::LayerSum()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int GUI::Frame::UID()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUI::Frame::AddChild(Frame childFrame)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUI::Frame::RemoveChild(Frame childFrame)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUI::Frame::Initialize()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUI::Frame::Update(double dt)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GUI::Frame::Draw()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/*#ifndef Frame_h__
|
||||||
|
#define Frame_h__
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include "Renderer.h"
|
||||||
|
#include "Rectangle.h"
|
||||||
|
#include "GUIManager.h"
|
||||||
|
#include "Texture.h"
|
||||||
|
#include "Color.h"
|
||||||
|
//#include "Camera.h"
|
||||||
|
|
||||||
|
namespace GUI
|
||||||
|
{
|
||||||
|
|
||||||
|
class Frame
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Frame();
|
||||||
|
GUIManager Manager;
|
||||||
|
std::string Name;
|
||||||
|
int GetWidth();
|
||||||
|
int GetHeight();
|
||||||
|
int GetX();
|
||||||
|
int GetY();
|
||||||
|
void SetWidth(int wid);
|
||||||
|
void SetHeight(int hei);
|
||||||
|
void SetX( int xcord);
|
||||||
|
void SetY(int ycord);
|
||||||
|
Rectangle *rectangle;
|
||||||
|
Rectangle AbsouluteRectangle();
|
||||||
|
Texture texture;
|
||||||
|
Color color;
|
||||||
|
bool _Visible;
|
||||||
|
bool Visible();
|
||||||
|
int layer;
|
||||||
|
int layerSum;
|
||||||
|
int LayerSum();
|
||||||
|
int UID();
|
||||||
|
Frame *Parent;
|
||||||
|
std::map<std::string, void*> Properties = new std::map<std::string, void*>();
|
||||||
|
void AddChild(Frame childFrame);
|
||||||
|
void RemoveChild(Frame childFrame);
|
||||||
|
void Update(double dt);
|
||||||
|
void Draw();
|
||||||
|
protected:
|
||||||
|
virtual void Initialize();
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif*/
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/*#include "GUIManager.h"
|
||||||
|
|
||||||
|
int GUI::GUIManager::Add(Frame frame)
|
||||||
|
{
|
||||||
|
//Frame.Add(frame);
|
||||||
|
//return CreateUID();
|
||||||
|
}
|
||||||
|
*/
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/*#ifndef GUIManager_h__
|
||||||
|
#define GUIManager_h__
|
||||||
|
|
||||||
|
#include "Frame.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace GUI
|
||||||
|
{
|
||||||
|
class GUIManager
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
int Add(Frame frame);
|
||||||
|
void Remove(Frame frame);
|
||||||
|
int CreateUID();
|
||||||
|
void Update(double dt);
|
||||||
|
void Draw();
|
||||||
|
private:
|
||||||
|
static int uidIndex;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "GameFrame.h"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "MenuFrame.h"
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#ifndef Rectangle_h__
|
||||||
|
#define Rectangle_h__
|
||||||
|
|
||||||
|
class Rectangle
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
int height;
|
||||||
|
int width;
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Rectangle();
|
||||||
|
int Height() const { return height; }
|
||||||
|
void Height(float val) { height = val; }
|
||||||
|
|
||||||
|
int Width() const { return width; }
|
||||||
|
void Width(float val) { width = val; }
|
||||||
|
|
||||||
|
int X() const { return x; }
|
||||||
|
void X(int val) { x = val; }
|
||||||
|
|
||||||
|
int Y() const { return y; }
|
||||||
|
void Y(int val) { y = val; }
|
||||||
|
};
|
||||||
|
|
||||||
|
Rectangle::Rectangle()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "TextFrame.h"
|
||||||
Reference in New Issue
Block a user