diff --git a/Escape-the-Dawn/Escape-the-Dawn.vcxproj b/Escape-the-Dawn/Escape-the-Dawn.vcxproj index 4fbe3f4..1e118da 100644 --- a/Escape-the-Dawn/Escape-the-Dawn.vcxproj +++ b/Escape-the-Dawn/Escape-the-Dawn.vcxproj @@ -143,6 +143,7 @@ + diff --git a/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters b/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters index ca2171c..3baef62 100644 --- a/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters +++ b/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters @@ -140,6 +140,7 @@ GUI + diff --git a/Escape-the-Dawn/Frame.cpp b/Escape-the-Dawn/Frame.cpp index e69de29..bf996ed 100644 --- a/Escape-the-Dawn/Frame.cpp +++ b/Escape-the-Dawn/Frame.cpp @@ -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() +{ + +} +*/ \ No newline at end of file diff --git a/Escape-the-Dawn/Frame.h b/Escape-the-Dawn/Frame.h index e69de29..2e9a3f4 100644 --- a/Escape-the-Dawn/Frame.h +++ b/Escape-the-Dawn/Frame.h @@ -0,0 +1,51 @@ +/*#ifndef Frame_h__ +#define Frame_h__ + +#include +#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 Properties = new std::map(); + void AddChild(Frame childFrame); + void RemoveChild(Frame childFrame); + void Update(double dt); + void Draw(); +protected: + virtual void Initialize(); + +}; +} + +#endif*/ \ No newline at end of file diff --git a/Escape-the-Dawn/GUIManager.cpp b/Escape-the-Dawn/GUIManager.cpp index e69de29..40b50d3 100644 --- a/Escape-the-Dawn/GUIManager.cpp +++ b/Escape-the-Dawn/GUIManager.cpp @@ -0,0 +1,8 @@ +/*#include "GUIManager.h" + +int GUI::GUIManager::Add(Frame frame) +{ + //Frame.Add(frame); + //return CreateUID(); +} +*/ \ No newline at end of file diff --git a/Escape-the-Dawn/GUIManager.h b/Escape-the-Dawn/GUIManager.h index e69de29..7b8434a 100644 --- a/Escape-the-Dawn/GUIManager.h +++ b/Escape-the-Dawn/GUIManager.h @@ -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 */ \ No newline at end of file diff --git a/Escape-the-Dawn/GameFrame.cpp b/Escape-the-Dawn/GameFrame.cpp index e69de29..43a87af 100644 --- a/Escape-the-Dawn/GameFrame.cpp +++ b/Escape-the-Dawn/GameFrame.cpp @@ -0,0 +1 @@ +#include "GameFrame.h" \ No newline at end of file diff --git a/Escape-the-Dawn/MenuFrame.cpp b/Escape-the-Dawn/MenuFrame.cpp index e69de29..4c89382 100644 --- a/Escape-the-Dawn/MenuFrame.cpp +++ b/Escape-the-Dawn/MenuFrame.cpp @@ -0,0 +1 @@ +#include "MenuFrame.h" diff --git a/Escape-the-Dawn/Rectangle.h b/Escape-the-Dawn/Rectangle.h new file mode 100644 index 0000000..2f6d0cd --- /dev/null +++ b/Escape-the-Dawn/Rectangle.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 \ No newline at end of file diff --git a/Escape-the-Dawn/TextFrame.cpp b/Escape-the-Dawn/TextFrame.cpp index e69de29..bc52864 100644 --- a/Escape-the-Dawn/TextFrame.cpp +++ b/Escape-the-Dawn/TextFrame.cpp @@ -0,0 +1 @@ +#include "TextFrame.h" \ No newline at end of file