cButton Texture Generate

This commit is contained in:
2018-08-30 09:16:39 -04:00
parent 30416b0334
commit 335166ea00
24 changed files with 163 additions and 174 deletions
+8
View File
@@ -0,0 +1,8 @@
#include "GUI.hpp"
GUI::GUI()
{}
GUI::~GUI()
{
}
+14
View File
@@ -0,0 +1,14 @@
#ifndef __GUI__
#define __GUI__
#include "dllExport.h"
class GUI {
public:
GUI();
~GUI();
private:
};
#endif /// __GUI__
+31 -31
View File
@@ -26,44 +26,44 @@ void GUIXMLTest()
// }
// align = leftRight;
// }
GUIXMLSizerTest();
GUIXMLDefaultTest();
//GUIXMLSizerTest();
}
void GUIXMLDefaultTest()
{
UTest u("GUI XML Default");
LoadFile("GUIXMLDefaultTest.xml");
LoadFile("GUIXMLDefaultTest.xml", true);
std::vector<GUIEngine::cWindow*> objects = GUIEngine::cGUI::Inst().GetObjects();
GUIEngine::cPanel* panel = (GUIEngine::cPanel*)objects[0];
Settings sets;
sets.pos = { 0, 0 };
sets.size = { 200, 200 };
sets.pad = { 0, 0, 0, 0 };
sets.center = { 100, 100 };
cWindowTest("Panel", u, panel, sets);
GUIEngine::cLayout* layout = (GUIEngine::cLayout*)panel->getChildren()[0];
sets.pos = { 5, 5 };
sets.size = { 190, 190 };
sets.pad = { 5, 5, 5, 5 };
cWindowTest("Layout", u, layout, sets);
GUIEngine::cLabel* label = (GUIEngine::cLabel*)layout->getChildren()[0];
sets.pos = { 56, 96 };
sets.size = { 88, 8 };
cWindowTest("Label", u, label, sets);
// std::vector<GUIEngine::cWindow*> objects = GUIEngine::cGUI::Inst().GetObjects();
//
// GUIEngine::cPanel* panel = (GUIEngine::cPanel*)objects[0];
//
// Settings sets;
// sets.pos = { 0, 0 };
// sets.size = { 200, 200 };
// sets.pad = { 0, 0, 0, 0 };
// sets.center = { 100, 100 };
//
// cWindowTest("Panel", u, panel, sets);
//
// GUIEngine::cLayout* layout = (GUIEngine::cLayout*)panel->getChildren()[0];
//
// sets.pos = { 5, 5 };
// sets.size = { 190, 190 };
// sets.pad = { 5, 5, 5, 5 };
//
//
// cWindowTest("Layout", u, layout, sets);
//
// GUIEngine::cLabel* label = (GUIEngine::cLabel*)layout->getChildren()[0];
//
//
// sets.pos = { 56, 96 };
// sets.size = { 88, 8 };
//
// cWindowTest("Label", u, label, sets);
u.report();
@@ -146,6 +146,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="EventEngineTest\EventEngineTest.cpp" />
<ClCompile Include="GUI.cpp" />
<ClCompile Include="GUIEngineTest\GUIXMLTest.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="MathEngineTest\CollisionTest.cpp" />
@@ -160,6 +161,7 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="EventEngineTest\EventEngineTest.hpp" />
<ClInclude Include="GUI.hpp" />
<ClInclude Include="GUIEngineTest\GUIXMLTest.hpp" />
<ClInclude Include="MathEngineTest\CollisionTest.hpp" />
<ClInclude Include="MathEngineTest\MathEngineTest.hpp" />
@@ -57,6 +57,7 @@
<ClInclude Include="MathEngineTest\MathEngineTest.hpp">
<Filter>MathEngineTest</Filter>
</ClInclude>
<ClInclude Include="GUI.hpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="UTest\UTest.cpp">
@@ -93,6 +94,7 @@
<ClCompile Include="MathEngineTest\MathEngineTest.cpp">
<Filter>MathEngineTest</Filter>
</ClCompile>
<ClCompile Include="GUI.cpp" />
</ItemGroup>
<ItemGroup>
<Xml Include="xml\GUI.xml">
+5 -5
View File
@@ -5,8 +5,8 @@
class UTest {
private:
UTest( UTest & ); // no copy constructor
UTest operator = ( UTest & ); // no assignment operator
UTest( UTest & ); /// no copy constructor
UTest operator = ( UTest & ); /// no assignment operator
UTest(){}
public:
static const char* version() { return __UTest_VERSION; }
@@ -27,8 +27,8 @@ private:
static const char* sp_pstr; /*= "pass";*/
static const char* sp_fstr; /*= "fail";*/
static unsigned long int s_pass; //= 0
static unsigned long int s_fail; //= 0
static unsigned long int s_pass; ///= 0
static unsigned long int s_fail; ///= 0
};
#endif // __UTEST__
#endif /// __UTEST__
+2 -1
View File
@@ -55,7 +55,8 @@ int main(int argc, char *argv[])
MathEngineTest();
//GUIXMLTest();
GUIXMLTest();
SDL_Rect rec = { 0, 0, 100, 20 };
//ImageTest();
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Panel size="400,400">
<debug/>
<debug />
<Layout>
<Label align="left">Hello world Left</Label>
<Label align="center">Hello world Center</Label>
+2 -2
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Panel size="200,200">
<debug/>
<debug />
<Layout>
<Label>Hello world</Label>
<Include dir ="xml/" filename="include.xml"/>
<Button size="100,20" />
</Layout>
</Panel>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Panel position="20, 20" size="200,200">
<debug/>
<debug />
<Layout position="100, 1100">
<Label position="100, 1002" text="Hello world" />
</Layout>
Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB