aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/tools/GUIEditor
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttribute.h338
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.cpp240
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.h108
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIBoolAttribute.h136
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIColorAttribute.h358
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIDummyEditorStub.h118
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.cpp240
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.h106
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.cpp712
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.h176
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.cpp1854
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.h336
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIEnumAttribute.h228
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.cpp680
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h256
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIStringAttribute.h140
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureAttribute.h280
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.cpp672
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.h176
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.cpp190
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h146
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/EGUIEditTypes.h122
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.sln40
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.vcproj590
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.sln40
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.vcproj586
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj424
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters174
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj432
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters174
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/Makefile86
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/main.cpp152
32 files changed, 5155 insertions, 5155 deletions
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttribute.h
index 0585498..1f2b092 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttribute.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttribute.h
@@ -1,169 +1,169 @@
1/* 1/*
2 This base class is used by the Attribute editor for making your own attribute types. 2 This base class is used by the Attribute editor for making your own attribute types.
3 3
4 The attribute editor will try and create an attribute called "AttribType_attribute", 4 The attribute editor will try and create an attribute called "AttribType_attribute",
5 and if it fails, it will create a "string_attribute". 5 and if it fails, it will create a "string_attribute".
6 6
7*/ 7*/
8 8
9#ifndef __C_GUI_ATTRIBUTE_H_INCLUDED__ 9#ifndef __C_GUI_ATTRIBUTE_H_INCLUDED__
10#define __C_GUI_ATTRIBUTE_H_INCLUDED__ 10#define __C_GUI_ATTRIBUTE_H_INCLUDED__
11 11
12#include "IGUIElement.h" 12#include "IGUIElement.h"
13#include "IGUIEnvironment.h" 13#include "IGUIEnvironment.h"
14#include "IGUIFont.h" 14#include "IGUIFont.h"
15#include "IGUIStaticText.h" 15#include "IGUIStaticText.h"
16#include "IAttributes.h" 16#include "IAttributes.h"
17#include "CGUIEditWorkspace.h" 17#include "CGUIEditWorkspace.h"
18 18
19namespace irr 19namespace irr
20{ 20{
21 21
22namespace gui 22namespace gui
23{ 23{
24 24
25 const u32 ATTRIBEDIT_ATTRIB_CHANGED=MAKE_IRR_ID('A','T','T','R'); 25 const u32 ATTRIBEDIT_ATTRIB_CHANGED=MAKE_IRR_ID('A','T','T','R');
26 26
27 class CGUIAttribute : public IGUIElement 27 class CGUIAttribute : public IGUIElement
28 { 28 {
29 public: 29 public:
30 //! constructor 30 //! constructor
31 CGUIAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : 31 CGUIAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) :
32 IGUIElement(EGUIET_ELEMENT, environment, parent, -1, core::rect<s32>(0, 0, 100, 100) ), 32 IGUIElement(EGUIET_ELEMENT, environment, parent, -1, core::rect<s32>(0, 0, 100, 100) ),
33 AttribName(0), Attribs(0), Index(0), MyParentID(myParentID) 33 AttribName(0), Attribs(0), Index(0), MyParentID(myParentID)
34 { 34 {
35 35
36 #ifdef _DEBUG 36 #ifdef _DEBUG
37 setDebugName("CGUIAttribute"); 37 setDebugName("CGUIAttribute");
38 #endif 38 #endif
39 39
40 AttribName = environment->addStaticText(0, 40 AttribName = environment->addStaticText(0,
41 core::rect<s32>(0, 0, 41 core::rect<s32>(0, 0,
42 100, Environment->getSkin()->getFont()->getDimension(L"A").Height), 42 100, Environment->getSkin()->getFont()->getDimension(L"A").Height),
43 false, false, this, -1, false); 43 false, false, this, -1, false);
44 AttribName->grab(); 44 AttribName->grab();
45 AttribName->setSubElement(true); 45 AttribName->setSubElement(true);
46 AttribName->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 46 AttribName->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
47 } 47 }
48 48
49 virtual ~CGUIAttribute() 49 virtual ~CGUIAttribute()
50 { 50 {
51 if (Attribs) 51 if (Attribs)
52 Attribs->drop(); 52 Attribs->drop();
53 if (AttribName) 53 if (AttribName)
54 AttribName->drop(); 54 AttribName->drop();
55 } 55 }
56 56
57 virtual bool OnEvent(const SEvent &e) 57 virtual bool OnEvent(const SEvent &e)
58 { 58 {
59 if (IsEnabled) 59 if (IsEnabled)
60 { 60 {
61 switch (e.EventType) 61 switch (e.EventType)
62 { 62 {
63 case EET_GUI_EVENT: 63 case EET_GUI_EVENT:
64 switch (e.GUIEvent.EventType) 64 switch (e.GUIEvent.EventType)
65 { 65 {
66 case EGET_ELEMENT_FOCUSED: 66 case EGET_ELEMENT_FOCUSED:
67 if (Parent && isMyChild(e.GUIEvent.Caller)) 67 if (Parent && isMyChild(e.GUIEvent.Caller))
68 Parent->bringToFront(this); 68 Parent->bringToFront(this);
69 break; 69 break;
70 case EGET_ELEMENT_HOVERED: 70 case EGET_ELEMENT_HOVERED:
71 case EGET_ELEMENT_LEFT: 71 case EGET_ELEMENT_LEFT:
72 return IGUIElement::OnEvent(e); 72 return IGUIElement::OnEvent(e);
73 case EGET_ELEMENT_FOCUS_LOST: 73 case EGET_ELEMENT_FOCUS_LOST:
74 updateAttrib(); 74 updateAttrib();
75 return IGUIElement::OnEvent(e); 75 return IGUIElement::OnEvent(e);
76 default: 76 default:
77 return updateAttrib(); 77 return updateAttrib();
78 } 78 }
79 break; 79 break;
80 case EET_KEY_INPUT_EVENT: 80 case EET_KEY_INPUT_EVENT:
81 return true; 81 return true;
82 default: 82 default:
83 break; 83 break;
84 } 84 }
85 } 85 }
86 86
87 return IGUIElement::OnEvent(e); 87 return IGUIElement::OnEvent(e);
88 } 88 }
89 89
90 //! sets the attribute to use 90 //! sets the attribute to use
91 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) 91 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex)
92 { 92 {
93 if (Attribs) 93 if (Attribs)
94 Attribs->drop(); 94 Attribs->drop();
95 Attribs = attribs; 95 Attribs = attribs;
96 if (Attribs) 96 if (Attribs)
97 Attribs->grab(); 97 Attribs->grab();
98 Index = attribIndex; 98 Index = attribIndex;
99 99
100 core::stringw name(attribs->getAttributeName(attribIndex)); 100 core::stringw name(attribs->getAttributeName(attribIndex));
101 name += L" ("; 101 name += L" (";
102 name += attribs->getAttributeTypeString(attribIndex); 102 name += attribs->getAttributeTypeString(attribIndex);
103 name += L")"; 103 name += L")";
104 AttribName->setText(name.c_str()); 104 AttribName->setText(name.c_str());
105 105
106 core::rect<s32> r = Parent->getAbsolutePosition(); 106 core::rect<s32> r = Parent->getAbsolutePosition();
107 core::rect<s32> r2(0, 5, 107 core::rect<s32> r2(0, 5,
108 r.getWidth(), Environment->getSkin()->getFont()->getDimension(L"A").Height + 10 ); 108 r.getWidth(), Environment->getSkin()->getFont()->getDimension(L"A").Height + 10 );
109 109
110 AttribName->setRelativePosition(r2); 110 AttribName->setRelativePosition(r2);
111 111
112 // get minimum height 112 // get minimum height
113 s32 y=0; 113 s32 y=0;
114 core::list<IGUIElement*>::Iterator it = Children.begin(); 114 core::list<IGUIElement*>::Iterator it = Children.begin();
115 for (; it != Children.end(); ++it) 115 for (; it != Children.end(); ++it)
116 { 116 {
117 if (y < (*it)->getRelativePosition().LowerRightCorner.Y) 117 if (y < (*it)->getRelativePosition().LowerRightCorner.Y)
118 y = (*it)->getRelativePosition().LowerRightCorner.Y; 118 y = (*it)->getRelativePosition().LowerRightCorner.Y;
119 } 119 }
120 setMinSize( core::dimension2du(0, y+5)); 120 setMinSize( core::dimension2du(0, y+5));
121 121
122 updateAttrib(false); 122 updateAttrib(false);
123 } 123 }
124 124
125 //! sets the parent ID, for identifying where events came from 125 //! sets the parent ID, for identifying where events came from
126 void setParentID(s32 parentID) 126 void setParentID(s32 parentID)
127 { 127 {
128 MyParentID = parentID; 128 MyParentID = parentID;
129 } 129 }
130 130
131 //! save the attribute and possibly post the event to its parent 131 //! save the attribute and possibly post the event to its parent
132 virtual bool updateAttrib(bool sendEvent=true) 132 virtual bool updateAttrib(bool sendEvent=true)
133 { 133 {
134 if (Attribs && IsEnabled && sendEvent) 134 if (Attribs && IsEnabled && sendEvent)
135 { 135 {
136 // build event and pass to parent 136 // build event and pass to parent
137 SEvent event; 137 SEvent event;
138 event.EventType = (EEVENT_TYPE)ATTRIBEDIT_ATTRIB_CHANGED; 138 event.EventType = (EEVENT_TYPE)ATTRIBEDIT_ATTRIB_CHANGED;
139 event.UserEvent.UserData1 = MyParentID; 139 event.UserEvent.UserData1 = MyParentID;
140 event.UserEvent.UserData2 = Index; 140 event.UserEvent.UserData2 = Index;
141 return Parent->OnEvent(event); 141 return Parent->OnEvent(event);
142 } 142 }
143 143
144 return true; 144 return true;
145 } 145 }
146 146
147 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) 147 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0)
148 { 148 {
149 IGUIElement::serializeAttributes(out, options); 149 IGUIElement::serializeAttributes(out, options);
150 } 150 }
151 151
152 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) 152 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
153 { 153 {
154 IGUIElement::deserializeAttributes(in, options); 154 IGUIElement::deserializeAttributes(in, options);
155 if (AttribName) 155 if (AttribName)
156 AttribName->setText(Text.c_str()); 156 AttribName->setText(Text.c_str());
157 } 157 }
158 158
159 protected: 159 protected:
160 IGUIStaticText* AttribName; 160 IGUIStaticText* AttribName;
161 io::IAttributes* Attribs; 161 io::IAttributes* Attribs;
162 u32 Index; 162 u32 Index;
163 s32 MyParentID; 163 s32 MyParentID;
164 }; 164 };
165 165
166} // namespace gui 166} // namespace gui
167} // namespace irr 167} // namespace irr
168 168
169#endif 169#endif
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.cpp
index 45913b6..6d61f17 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.cpp
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.cpp
@@ -1,120 +1,120 @@
1 1
2#include "CGUIAttributeEditor.h" 2#include "CGUIAttributeEditor.h"
3#include "IGUIEnvironment.h" 3#include "IGUIEnvironment.h"
4#include "IFileSystem.h" 4#include "IFileSystem.h"
5#include "IVideoDriver.h" 5#include "IVideoDriver.h"
6#include "IAttributes.h" 6#include "IAttributes.h"
7#include "IGUIFont.h" 7#include "IGUIFont.h"
8#include "IGUIScrollBar.h" 8#include "IGUIScrollBar.h"
9#include "CGUIEditWorkspace.h" 9#include "CGUIEditWorkspace.h"
10#include "CGUIAttribute.h" 10#include "CGUIAttribute.h"
11#include "CGUIStringAttribute.h" 11#include "CGUIStringAttribute.h"
12 12
13namespace irr 13namespace irr
14{ 14{
15namespace gui 15namespace gui
16{ 16{
17 17
18using namespace core; 18using namespace core;
19using namespace io; 19using namespace io;
20 20
21CGUIAttributeEditor::CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent) : 21CGUIAttributeEditor::CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent) :
22 CGUIPanel(environment, parent, id, rect<s32>(0, 0, 100, 100)), 22 CGUIPanel(environment, parent, id, rect<s32>(0, 0, 100, 100)),
23 Attribs(0), Panel(0) 23 Attribs(0), Panel(0)
24{ 24{
25 #ifdef _DEBUG 25 #ifdef _DEBUG
26 setDebugName("CGUIAttributeEditor"); 26 setDebugName("CGUIAttributeEditor");
27 #endif 27 #endif
28 28
29 // create attributes 29 // create attributes
30 Attribs = environment->getFileSystem()->createEmptyAttributes(Environment->getVideoDriver()); 30 Attribs = environment->getFileSystem()->createEmptyAttributes(Environment->getVideoDriver());
31 31
32 calculateClientArea(); 32 calculateClientArea();
33 resizeInnerPane(); 33 resizeInnerPane();
34 34
35 // refresh attrib list 35 // refresh attrib list
36 refreshAttribs(); 36 refreshAttribs();
37 37
38 IGUIScrollBar* sb = getVScrollBar(); 38 IGUIScrollBar* sb = getVScrollBar();
39 core::rect<s32> r = sb->getRelativePosition(); 39 core::rect<s32> r = sb->getRelativePosition();
40 r.LowerRightCorner.Y -= 16; 40 r.LowerRightCorner.Y -= 16;
41 sb->setRelativePosition(r); 41 sb->setRelativePosition(r);
42} 42}
43 43
44CGUIAttributeEditor::~CGUIAttributeEditor() 44CGUIAttributeEditor::~CGUIAttributeEditor()
45{ 45{
46 for (u32 i=0; i<AttribList.size(); ++i) 46 for (u32 i=0; i<AttribList.size(); ++i)
47 { 47 {
48 AttribList[i]->remove(); 48 AttribList[i]->remove();
49 AttribList[i]->drop(); 49 AttribList[i]->drop();
50 } 50 }
51 AttribList.clear(); 51 AttribList.clear();
52 52
53 Attribs->drop(); 53 Attribs->drop();
54} 54}
55 55
56 56
57IAttributes* CGUIAttributeEditor::getAttribs() 57IAttributes* CGUIAttributeEditor::getAttribs()
58{ 58{
59 return Attribs; 59 return Attribs;
60} 60}
61 61
62void CGUIAttributeEditor::refreshAttribs() 62void CGUIAttributeEditor::refreshAttribs()
63{ 63{
64 // clear the attribute list 64 // clear the attribute list
65 u32 i; 65 u32 i;
66 for (i=0; i<AttribList.size(); ++i) 66 for (i=0; i<AttribList.size(); ++i)
67 { 67 {
68 AttribList[i]->remove(); 68 AttribList[i]->remove();
69 AttribList[i]->drop(); 69 AttribList[i]->drop();
70 } 70 }
71 AttribList.clear(); 71 AttribList.clear();
72 72
73 position2di top(10, 5); 73 position2di top(10, 5);
74 rect<s32> r(top.X, top.Y, 74 rect<s32> r(top.X, top.Y,
75 getClientArea().getWidth() - 10, 75 getClientArea().getWidth() - 10,
76 5 + Environment->getSkin()->getFont()->getDimension(L"A").Height); 76 5 + Environment->getSkin()->getFont()->getDimension(L"A").Height);
77 77
78 // add attribute elements 78 // add attribute elements
79 u32 c = Attribs->getAttributeCount(); 79 u32 c = Attribs->getAttributeCount();
80 for (i=0; i<c; ++i) 80 for (i=0; i<c; ++i)
81 { 81 {
82 82
83 // try to create attribute 83 // try to create attribute
84 stringc str = Attribs->getAttributeTypeString(i); 84 stringc str = Attribs->getAttributeTypeString(i);
85 str += "_attribute"; 85 str += "_attribute";
86 CGUIAttribute* n = (CGUIAttribute*)Environment->addGUIElement(str.c_str(), 0); 86 CGUIAttribute* n = (CGUIAttribute*)Environment->addGUIElement(str.c_str(), 0);
87 87
88 // if this doesn't exist, use a string editor 88 // if this doesn't exist, use a string editor
89 if (!n) 89 if (!n)
90 n = (CGUIAttribute*)Environment->addGUIElement("string_attribute", 0); 90 n = (CGUIAttribute*)Environment->addGUIElement("string_attribute", 0);
91 91
92 if (n) 92 if (n)
93 { 93 {
94 AttribList.push_back(n); 94 AttribList.push_back(n);
95 n->setParentID(getID()); 95 n->setParentID(getID());
96 n->grab(); 96 n->grab();
97 } 97 }
98 98
99 // We can't set "this" as parent above as we need functionality 99 // We can't set "this" as parent above as we need functionality
100 // of the overloaded addChild which isn't called in the constructor. 100 // of the overloaded addChild which isn't called in the constructor.
101 // (that's a general Irrlicht messup with too fat constructors) 101 // (that's a general Irrlicht messup with too fat constructors)
102 addChild(n); 102 addChild(n);
103 103
104 AttribList[i]->setSubElement(true); 104 AttribList[i]->setSubElement(true);
105 AttribList[i]->setRelativePosition(r); 105 AttribList[i]->setRelativePosition(r);
106 AttribList[i]->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 106 AttribList[i]->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
107 AttribList[i]->setAttrib(Attribs, i); 107 AttribList[i]->setAttrib(Attribs, i);
108 r += position2di(0, AttribList[i]->getRelativePosition().getHeight() + 5); 108 r += position2di(0, AttribList[i]->getRelativePosition().getHeight() + 5);
109 } 109 }
110} 110}
111 111
112void CGUIAttributeEditor::updateAttribs() 112void CGUIAttributeEditor::updateAttribs()
113{ 113{
114 for (u32 i=0; i<AttribList.size(); ++i) 114 for (u32 i=0; i<AttribList.size(); ++i)
115 AttribList[i]->updateAttrib(false); 115 AttribList[i]->updateAttrib(false);
116} 116}
117 117
118} // namespace gui 118} // namespace gui
119} // namespace irr 119} // namespace irr
120 120
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.h
index 0bcdab5..551fdfd 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.h
@@ -1,54 +1,54 @@
1#ifndef __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ 1#ifndef __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__
2#define __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ 2#define __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__
3 3
4#include "IGUIElement.h" 4#include "IGUIElement.h"
5#include "CGUIPanel.h" 5#include "CGUIPanel.h"
6#include "irrArray.h" 6#include "irrArray.h"
7#include "IAttributes.h" 7#include "IAttributes.h"
8#include "EGUIEditTypes.h" 8#include "EGUIEditTypes.h"
9 9
10namespace irr 10namespace irr
11{ 11{
12namespace gui 12namespace gui
13{ 13{
14 14
15 class CGUIAttribute; 15 class CGUIAttribute;
16 16
17 17
18 class CGUIAttributeEditor : public CGUIPanel 18 class CGUIAttributeEditor : public CGUIPanel
19 { 19 {
20 public: 20 public:
21 21
22 //! constructor 22 //! constructor
23 CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent=0); 23 CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent=0);
24 24
25 //! destructor 25 //! destructor
26 ~CGUIAttributeEditor(); 26 ~CGUIAttributeEditor();
27 27
28 // gets the current attributes list 28 // gets the current attributes list
29 virtual io::IAttributes* getAttribs(); 29 virtual io::IAttributes* getAttribs();
30 30
31 // update the attribute list after making a change 31 // update the attribute list after making a change
32 void refreshAttribs(); 32 void refreshAttribs();
33 33
34 // save the attributes 34 // save the attributes
35 void updateAttribs(); 35 void updateAttribs();
36 36
37 //! Returns the type name of the gui element. 37 //! Returns the type name of the gui element.
38 virtual const c8* getTypeName() const 38 virtual const c8* getTypeName() const
39 { 39 {
40 return GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR]; 40 return GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR];
41 } 41 }
42 42
43 private: 43 private:
44 44
45 core::array<CGUIAttribute*> AttribList; // attributes editing controls 45 core::array<CGUIAttribute*> AttribList; // attributes editing controls
46 io::IAttributes* Attribs; // current attributes 46 io::IAttributes* Attribs; // current attributes
47 CGUIPanel* Panel; 47 CGUIPanel* Panel;
48 }; 48 };
49 49
50} // end namespace gui 50} // end namespace gui
51} // end namespace irr 51} // end namespace irr
52 52
53#endif // __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ 53#endif // __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__
54 54
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIBoolAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIBoolAttribute.h
index b0521db..189bd2d 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIBoolAttribute.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIBoolAttribute.h
@@ -1,68 +1,68 @@
1#ifndef __C_GUI_BOOL_ATTRIBUTE_H_INCLUDED__ 1#ifndef __C_GUI_BOOL_ATTRIBUTE_H_INCLUDED__
2#define __C_GUI_BOOL_ATTRIBUTE_H_INCLUDED__ 2#define __C_GUI_BOOL_ATTRIBUTE_H_INCLUDED__
3 3
4#include "CGUIAttribute.h" 4#include "CGUIAttribute.h"
5#include "IGUICheckBox.h" 5#include "IGUICheckBox.h"
6#include "EGUIEditTypes.h" 6#include "EGUIEditTypes.h"
7 7
8namespace irr 8namespace irr
9{ 9{
10namespace gui 10namespace gui
11{ 11{
12 12
13 class CGUIBoolAttribute : public CGUIAttribute 13 class CGUIBoolAttribute : public CGUIAttribute
14 { 14 {
15 public: 15 public:
16 // 16 //
17 CGUIBoolAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : 17 CGUIBoolAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) :
18 CGUIAttribute(environment, parent, myParentID), AttribCheckBox(0) 18 CGUIAttribute(environment, parent, myParentID), AttribCheckBox(0)
19 { 19 {
20 20
21 core::rect<s32> r = getAbsolutePosition(); 21 core::rect<s32> r = getAbsolutePosition();
22 core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, 22 core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10,
23 r.getWidth() - 5, 23 r.getWidth() - 5,
24 Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 15 ); 24 Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 15 );
25 25
26 AttribCheckBox = environment->addCheckBox(false, r2, this); 26 AttribCheckBox = environment->addCheckBox(false, r2, this);
27 AttribCheckBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 27 AttribCheckBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
28 AttribCheckBox->setSubElement(true); 28 AttribCheckBox->setSubElement(true);
29 AttribCheckBox->grab(); 29 AttribCheckBox->grab();
30 } 30 }
31 31
32 virtual ~CGUIBoolAttribute() 32 virtual ~CGUIBoolAttribute()
33 { 33 {
34 if (AttribCheckBox) 34 if (AttribCheckBox)
35 AttribCheckBox->drop(); 35 AttribCheckBox->drop();
36 } 36 }
37 37
38 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) 38 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex)
39 { 39 {
40 AttribCheckBox->setChecked(attribs->getAttributeAsBool(attribIndex)); 40 AttribCheckBox->setChecked(attribs->getAttributeAsBool(attribIndex));
41 CGUIAttribute::setAttrib(attribs, attribIndex); 41 CGUIAttribute::setAttrib(attribs, attribIndex);
42 } 42 }
43 43
44 // save the attribute and possibly post the event to its parent 44 // save the attribute and possibly post the event to its parent
45 virtual bool updateAttrib(bool sendEvent=true) 45 virtual bool updateAttrib(bool sendEvent=true)
46 { 46 {
47 if (!Attribs) 47 if (!Attribs)
48 return true; 48 return true;
49 49
50 Attribs->setAttribute(Index, AttribCheckBox->isChecked()); 50 Attribs->setAttribute(Index, AttribCheckBox->isChecked());
51 51
52 return CGUIAttribute::updateAttrib(sendEvent); 52 return CGUIAttribute::updateAttrib(sendEvent);
53 } 53 }
54 54
55 //! Returns the type name of the gui element. 55 //! Returns the type name of the gui element.
56 virtual const c8* getTypeName() const 56 virtual const c8* getTypeName() const
57 { 57 {
58 return GUIEditElementTypeNames[EGUIEDIT_BOOLATTRIBUTE]; 58 return GUIEditElementTypeNames[EGUIEDIT_BOOLATTRIBUTE];
59 } 59 }
60 60
61 private: 61 private:
62 IGUICheckBox* AttribCheckBox; 62 IGUICheckBox* AttribCheckBox;
63 }; 63 };
64 64
65} // namespace gui 65} // namespace gui
66} // namespace irr 66} // namespace irr
67 67
68#endif 68#endif
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIColorAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIColorAttribute.h
index e0c5212..d14b7a1 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIColorAttribute.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIColorAttribute.h
@@ -1,179 +1,179 @@
1#ifndef __C_GUI_COLOR_ATTRIBUTE_H_INCLUDED__ 1#ifndef __C_GUI_COLOR_ATTRIBUTE_H_INCLUDED__
2#define __C_GUI_COLOR_ATTRIBUTE_H_INCLUDED__ 2#define __C_GUI_COLOR_ATTRIBUTE_H_INCLUDED__
3 3
4#include "CGUIAttribute.h" 4#include "CGUIAttribute.h"
5#include "IGUIStaticText.h" 5#include "IGUIStaticText.h"
6#include "IGUIScrollBar.h" 6#include "IGUIScrollBar.h"
7#include "IGUITabControl.h" 7#include "IGUITabControl.h"
8#include "EGUIEditTypes.h" 8#include "EGUIEditTypes.h"
9 9
10namespace irr 10namespace irr
11{ 11{
12namespace gui 12namespace gui
13{ 13{
14 class CGUIColorAttribute : public CGUIAttribute 14 class CGUIColorAttribute : public CGUIAttribute
15 { 15 {
16 public: 16 public:
17 // 17 //
18 CGUIColorAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : 18 CGUIColorAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) :
19 CGUIAttribute(environment, parent, myParentID), 19 CGUIAttribute(environment, parent, myParentID),
20 AttribSliderA(0), AttribSliderR(0), AttribSliderG(0), AttribSliderB(0), 20 AttribSliderA(0), AttribSliderR(0), AttribSliderG(0), AttribSliderB(0),
21 AttribEditBox(0), AttribColor(0) 21 AttribEditBox(0), AttribColor(0)
22 { 22 {
23 s32 fh = Environment->getSkin()->getFont()->getDimension(L"A").Height; 23 s32 fh = Environment->getSkin()->getFont()->getDimension(L"A").Height;
24 24
25 core::rect<s32> r0(getAbsolutePosition()), 25 core::rect<s32> r0(getAbsolutePosition()),
26 r2(0, fh + 5, r0.getWidth() - 5, fh*2 + 10 ), 26 r2(0, fh + 5, r0.getWidth() - 5, fh*2 + 10 ),
27 r3(r2), 27 r3(r2),
28 r4(r2.getWidth() - 20, 3, r2.getWidth() - 3, r2.getHeight()-3); 28 r4(r2.getWidth() - 20, 3, r2.getWidth() - 3, r2.getHeight()-3);
29 29
30 AttribColor = Environment->addTab(r4, this, 0); 30 AttribColor = Environment->addTab(r4, this, 0);
31 AttribColor->grab(); 31 AttribColor->grab();
32 AttribColor->setDrawBackground(true); 32 AttribColor->setDrawBackground(true);
33 AttribColor->setSubElement(true); 33 AttribColor->setSubElement(true);
34 AttribColor->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 34 AttribColor->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
35 35
36 s32 h=2; 36 s32 h=2;
37 r2 += core::position2di(0, h*4 + Environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH)*2); 37 r2 += core::position2di(0, h*4 + Environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH)*2);
38 r3.LowerRightCorner.Y = r3.UpperLeftCorner.Y + Environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH)/2; 38 r3.LowerRightCorner.Y = r3.UpperLeftCorner.Y + Environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH)/2;
39 39
40 AttribSliderA = environment->addScrollBar(true, r3, this, -1); 40 AttribSliderA = environment->addScrollBar(true, r3, this, -1);
41 AttribSliderA->setMax(255); 41 AttribSliderA->setMax(255);
42 AttribSliderA->grab(); 42 AttribSliderA->grab();
43 AttribSliderA->setSubElement(true); 43 AttribSliderA->setSubElement(true);
44 AttribSliderA->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 44 AttribSliderA->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
45 r3 += core::position2di(0, r3.getHeight()+h); 45 r3 += core::position2di(0, r3.getHeight()+h);
46 AttribSliderR = environment->addScrollBar(true, r3, this, -1); 46 AttribSliderR = environment->addScrollBar(true, r3, this, -1);
47 AttribSliderR->setMax(255); 47 AttribSliderR->setMax(255);
48 AttribSliderR->grab(); 48 AttribSliderR->grab();
49 AttribSliderR->setSubElement(true); 49 AttribSliderR->setSubElement(true);
50 AttribSliderR->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 50 AttribSliderR->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
51 r3 += core::position2di(0, r3.getHeight()+h); 51 r3 += core::position2di(0, r3.getHeight()+h);
52 AttribSliderG = environment->addScrollBar(true, r3, this, -1); 52 AttribSliderG = environment->addScrollBar(true, r3, this, -1);
53 AttribSliderG->setMax(255); 53 AttribSliderG->setMax(255);
54 AttribSliderG->grab(); 54 AttribSliderG->grab();
55 AttribSliderG->setSubElement(true); 55 AttribSliderG->setSubElement(true);
56 AttribSliderG->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 56 AttribSliderG->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
57 r3 += core::position2di(0, r3.getHeight()+h); 57 r3 += core::position2di(0, r3.getHeight()+h);
58 AttribSliderB = environment->addScrollBar(true, r3, this, -1); 58 AttribSliderB = environment->addScrollBar(true, r3, this, -1);
59 AttribSliderB->setMax(255); 59 AttribSliderB->setMax(255);
60 AttribSliderB->grab(); 60 AttribSliderB->grab();
61 AttribSliderB->setSubElement(true); 61 AttribSliderB->setSubElement(true);
62 AttribSliderB->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 62 AttribSliderB->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
63 63
64 // add editbox 64 // add editbox
65 AttribEditBox = environment->addEditBox( 65 AttribEditBox = environment->addEditBox(
66 L"", 66 L"",
67 r2, 67 r2,
68 true, this, -1); 68 true, this, -1);
69 AttribEditBox->grab(); 69 AttribEditBox->grab();
70 AttribEditBox->setSubElement(true); 70 AttribEditBox->setSubElement(true);
71 AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 71 AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
72 } 72 }
73 73
74 virtual ~CGUIColorAttribute() 74 virtual ~CGUIColorAttribute()
75 { 75 {
76 if (AttribSliderA) 76 if (AttribSliderA)
77 AttribSliderA->drop(); 77 AttribSliderA->drop();
78 if (AttribSliderR) 78 if (AttribSliderR)
79 AttribSliderR->drop(); 79 AttribSliderR->drop();
80 if (AttribSliderG) 80 if (AttribSliderG)
81 AttribSliderG->drop(); 81 AttribSliderG->drop();
82 if (AttribSliderB) 82 if (AttribSliderB)
83 AttribSliderB->drop(); 83 AttribSliderB->drop();
84 if (AttribEditBox) 84 if (AttribEditBox)
85 AttribEditBox->drop(); 85 AttribEditBox->drop();
86 if (AttribColor) 86 if (AttribColor)
87 AttribColor->drop(); 87 AttribColor->drop();
88 } 88 }
89 89
90 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) 90 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex)
91 { 91 {
92 video::SColor col = attribs->getAttributeAsColor(attribIndex); 92 video::SColor col = attribs->getAttributeAsColor(attribIndex);
93 93
94 AttribSliderA->setPos(col.getAlpha()); 94 AttribSliderA->setPos(col.getAlpha());
95 AttribSliderR->setPos(col.getRed()); 95 AttribSliderR->setPos(col.getRed());
96 AttribSliderG->setPos(col.getGreen()); 96 AttribSliderG->setPos(col.getGreen());
97 AttribSliderB->setPos(col.getBlue()); 97 AttribSliderB->setPos(col.getBlue());
98 AttribEditBox->setText( attribs->getAttributeAsStringW(attribIndex).c_str() ); 98 AttribEditBox->setText( attribs->getAttributeAsStringW(attribIndex).c_str() );
99 AttribColor->setBackgroundColor(col); 99 AttribColor->setBackgroundColor(col);
100 100
101 CGUIAttribute::setAttrib(attribs, attribIndex); 101 CGUIAttribute::setAttrib(attribs, attribIndex);
102 } 102 }
103 103
104 virtual bool OnEvent(const SEvent &e) 104 virtual bool OnEvent(const SEvent &e)
105 { 105 {
106 switch (e.EventType) 106 switch (e.EventType)
107 { 107 {
108 108
109 case EET_GUI_EVENT: 109 case EET_GUI_EVENT:
110 switch (e.GUIEvent.EventType) 110 switch (e.GUIEvent.EventType)
111 { 111 {
112 case EGET_EDITBOX_ENTER: 112 case EGET_EDITBOX_ENTER:
113 case EGET_ELEMENT_FOCUS_LOST: 113 case EGET_ELEMENT_FOCUS_LOST:
114 if (e.GUIEvent.Caller == AttribEditBox) 114 if (e.GUIEvent.Caller == AttribEditBox)
115 { 115 {
116 // update scrollbars from textbox 116 // update scrollbars from textbox
117 Attribs->setAttribute(Index, AttribEditBox->getText()); 117 Attribs->setAttribute(Index, AttribEditBox->getText());
118 video::SColor col = Attribs->getAttributeAsColor(Index); 118 video::SColor col = Attribs->getAttributeAsColor(Index);
119 AttribSliderA->setPos(col.getAlpha()); 119 AttribSliderA->setPos(col.getAlpha());
120 AttribSliderR->setPos(col.getRed()); 120 AttribSliderR->setPos(col.getRed());
121 AttribSliderG->setPos(col.getGreen()); 121 AttribSliderG->setPos(col.getGreen());
122 AttribSliderB->setPos(col.getBlue()); 122 AttribSliderB->setPos(col.getBlue());
123 // update colour 123 // update colour
124 AttribColor->setBackgroundColor(col); 124 AttribColor->setBackgroundColor(col);
125 } 125 }
126 break; 126 break;
127 case EGET_SCROLL_BAR_CHANGED: 127 case EGET_SCROLL_BAR_CHANGED:
128 { 128 {
129 // update editbox from scrollbars 129 // update editbox from scrollbars
130 video::SColor col( AttribSliderA->getPos(), AttribSliderR->getPos(), 130 video::SColor col( AttribSliderA->getPos(), AttribSliderR->getPos(),
131 AttribSliderG->getPos(), AttribSliderB->getPos()); 131 AttribSliderG->getPos(), AttribSliderB->getPos());
132 132
133 Attribs->setAttribute(Index, col); 133 Attribs->setAttribute(Index, col);
134 AttribEditBox->setText( Attribs->getAttributeAsStringW(Index).c_str()); 134 AttribEditBox->setText( Attribs->getAttributeAsStringW(Index).c_str());
135 // update colour 135 // update colour
136 AttribColor->setBackgroundColor(col); 136 AttribColor->setBackgroundColor(col);
137 } 137 }
138 return updateAttrib(); 138 return updateAttrib();
139 default: 139 default:
140 break; 140 break;
141 } 141 }
142 break; 142 break;
143 default: 143 default:
144 break; 144 break;
145 } 145 }
146 return CGUIAttribute::OnEvent(e); 146 return CGUIAttribute::OnEvent(e);
147 } 147 }
148 148
149 // save the attribute and possibly post the event to its parent 149 // save the attribute and possibly post the event to its parent
150 virtual bool updateAttrib(bool sendEvent=true) 150 virtual bool updateAttrib(bool sendEvent=true)
151 { 151 {
152 if (!Attribs) 152 if (!Attribs)
153 return true; 153 return true;
154 154
155 Attribs->setAttribute(Index, AttribEditBox->getText()); 155 Attribs->setAttribute(Index, AttribEditBox->getText());
156 AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); 156 AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str());
157 return CGUIAttribute::updateAttrib(sendEvent); 157 return CGUIAttribute::updateAttrib(sendEvent);
158 } 158 }
159 159
160 //! Returns the type name of the gui element. 160 //! Returns the type name of the gui element.
161 virtual const c8* getTypeName() const 161 virtual const c8* getTypeName() const
162 { 162 {
163 return GUIEditElementTypeNames[EGUIEDIT_COLORATTRIBUTE]; 163 return GUIEditElementTypeNames[EGUIEDIT_COLORATTRIBUTE];
164 } 164 }
165 165
166 private: 166 private:
167 IGUIScrollBar* AttribSliderA; 167 IGUIScrollBar* AttribSliderA;
168 IGUIScrollBar* AttribSliderR; 168 IGUIScrollBar* AttribSliderR;
169 IGUIScrollBar* AttribSliderG; 169 IGUIScrollBar* AttribSliderG;
170 IGUIScrollBar* AttribSliderB; 170 IGUIScrollBar* AttribSliderB;
171 IGUIEditBox* AttribEditBox; 171 IGUIEditBox* AttribEditBox;
172 IGUITab* AttribColor; 172 IGUITab* AttribColor;
173 }; 173 };
174 174
175} // namespace gui 175} // namespace gui
176} // namespace irr 176} // namespace irr
177 177
178#endif 178#endif
179 179
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIDummyEditorStub.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIDummyEditorStub.h
index 635501a..b373b2d 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIDummyEditorStub.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIDummyEditorStub.h
@@ -1,59 +1,59 @@
1/* 1/*
2 This is a custom editor for stubbing problematic elements out, 2 This is a custom editor for stubbing problematic elements out,
3 for example elements which include modal screens 3 for example elements which include modal screens
4*/ 4*/
5 5
6#ifndef __C_GUI_DUMMY_EDITOR_STUB_H_INCLUDED__ 6#ifndef __C_GUI_DUMMY_EDITOR_STUB_H_INCLUDED__
7#define __C_GUI_DUMMY_EDITOR_STUB_H_INCLUDED__ 7#define __C_GUI_DUMMY_EDITOR_STUB_H_INCLUDED__
8 8
9#include "IGUIElement.h" 9#include "IGUIElement.h"
10#include "IGUIEnvironment.h" 10#include "IGUIEnvironment.h"
11#include "IGUIStaticText.h" 11#include "IGUIStaticText.h"
12 12
13namespace irr 13namespace irr
14{ 14{
15 15
16namespace gui 16namespace gui
17{ 17{
18 class CGUIDummyEditorStub : public IGUIElement 18 class CGUIDummyEditorStub : public IGUIElement
19 { 19 {
20 public: 20 public:
21 //! constructor 21 //! constructor
22 CGUIDummyEditorStub(IGUIEnvironment* environment, IGUIElement *parent, const char *text) : 22 CGUIDummyEditorStub(IGUIEnvironment* environment, IGUIElement *parent, const char *text) :
23 IGUIElement(EGUIET_ELEMENT, environment, parent, -1, core::rect<s32>(0, 0, 100, 100) ), 23 IGUIElement(EGUIET_ELEMENT, environment, parent, -1, core::rect<s32>(0, 0, 100, 100) ),
24 TextBox(0), TypeName(text) 24 TextBox(0), TypeName(text)
25 { 25 {
26 26
27 #ifdef _DEBUG 27 #ifdef _DEBUG
28 setDebugName("CGUIDummyEditorStub"); 28 setDebugName("CGUIDummyEditorStub");
29 #endif 29 #endif
30 30
31 core::dimension2du d = Environment->getSkin()->getFont()->getDimension(L"A"); 31 core::dimension2du d = Environment->getSkin()->getFont()->getDimension(L"A");
32 s32 h = d.Height / 2; 32 s32 h = d.Height / 2;
33 s32 w = d.Width / 2; 33 s32 w = d.Width / 2;
34 34
35 TextBox = environment->addStaticText(core::stringw(text).c_str(), 35 TextBox = environment->addStaticText(core::stringw(text).c_str(),
36 core::rect<s32>(50-w, 50-h, 50+w, 50+h), 36 core::rect<s32>(50-w, 50-h, 50+w, 50+h),
37 false, false, this, -1, false); 37 false, false, this, -1, false);
38 TextBox->grab(); 38 TextBox->grab();
39 TextBox->setSubElement(true); 39 TextBox->setSubElement(true);
40 TextBox->setAlignment(EGUIA_CENTER, EGUIA_CENTER, EGUIA_CENTER, EGUIA_CENTER); 40 TextBox->setAlignment(EGUIA_CENTER, EGUIA_CENTER, EGUIA_CENTER, EGUIA_CENTER);
41 } 41 }
42 42
43 virtual ~CGUIDummyEditorStub() 43 virtual ~CGUIDummyEditorStub()
44 { 44 {
45 if (TextBox) 45 if (TextBox)
46 TextBox->drop(); 46 TextBox->drop();
47 } 47 }
48 virtual const c8* getTypeName() const { return TypeName.c_str(); } 48 virtual const c8* getTypeName() const { return TypeName.c_str(); }
49 49
50 protected: 50 protected:
51 IGUIStaticText* TextBox; 51 IGUIStaticText* TextBox;
52 core::stringc TypeName; 52 core::stringc TypeName;
53 53
54 }; 54 };
55 55
56} // namespace gui 56} // namespace gui
57} // namespace irr 57} // namespace irr
58 58
59#endif 59#endif
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.cpp
index 9552745..0748360 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.cpp
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.cpp
@@ -1,120 +1,120 @@
1#include "CGUIEditFactory.h" 1#include "CGUIEditFactory.h"
2#include "IGUIEnvironment.h" 2#include "IGUIEnvironment.h"
3#include "irrString.h" 3#include "irrString.h"
4 4
5#include "EGUIEditTypes.h" 5#include "EGUIEditTypes.h"
6 6
7#include "CGUIEditWorkspace.h" 7#include "CGUIEditWorkspace.h"
8#include "CGUIEditWindow.h" 8#include "CGUIEditWindow.h"
9#include "CGUIPanel.h" 9#include "CGUIPanel.h"
10#include "CGUITextureCacheBrowser.h" 10#include "CGUITextureCacheBrowser.h"
11#include "CGUIAttributeEditor.h" 11#include "CGUIAttributeEditor.h"
12#include "CGUIStringAttribute.h" 12#include "CGUIStringAttribute.h"
13#include "CGUIBoolAttribute.h" 13#include "CGUIBoolAttribute.h"
14#include "CGUIEnumAttribute.h" 14#include "CGUIEnumAttribute.h"
15#include "CGUIColorAttribute.h" 15#include "CGUIColorAttribute.h"
16#include "CGUITextureAttribute.h" 16#include "CGUITextureAttribute.h"
17#include "CGUIDummyEditorStub.h" 17#include "CGUIDummyEditorStub.h"
18 18
19namespace irr 19namespace irr
20{ 20{
21namespace gui 21namespace gui
22{ 22{
23 23
24CGUIEditFactory::CGUIEditFactory(IGUIEnvironment* env) 24CGUIEditFactory::CGUIEditFactory(IGUIEnvironment* env)
25: Environment(env) 25: Environment(env)
26{ 26{
27 #ifdef _DEBUG 27 #ifdef _DEBUG
28 setDebugName("CGUIEditFactory"); 28 setDebugName("CGUIEditFactory");
29 #endif 29 #endif
30 30
31 // don't grab the gui environment here to prevent cyclic references 31 // don't grab the gui environment here to prevent cyclic references
32} 32}
33 33
34 34
35CGUIEditFactory::~CGUIEditFactory() 35CGUIEditFactory::~CGUIEditFactory()
36{ 36{
37} 37}
38 38
39 39
40//! adds an element to the environment based on its type name 40//! adds an element to the environment based on its type name
41IGUIElement* CGUIEditFactory::addGUIElement(const c8* typeName, IGUIElement* parent) 41IGUIElement* CGUIEditFactory::addGUIElement(const c8* typeName, IGUIElement* parent)
42{ 42{
43 /* 43 /*
44 here we create elements, add them to the manager, and then drop them 44 here we create elements, add them to the manager, and then drop them
45 */ 45 */
46 46
47 core::stringc elementType(typeName); 47 core::stringc elementType(typeName);
48 IGUIElement* ret=0; 48 IGUIElement* ret=0;
49 if (!parent) 49 if (!parent)
50 parent = Environment->getRootGUIElement(); 50 parent = Environment->getRootGUIElement();
51 51
52 // editor workspace 52 // editor workspace
53 if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIEDIT])) 53 if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIEDIT]))
54 ret = new CGUIEditWorkspace(Environment, -1, 0); 54 ret = new CGUIEditWorkspace(Environment, -1, 0);
55 // editor window 55 // editor window
56 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW])) 56 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW]))
57 ret = new CGUIEditWindow(Environment, core::rect<s32>(0,0,100,100), 0); 57 ret = new CGUIEditWindow(Environment, core::rect<s32>(0,0,100,100), 0);
58 // Klasker's GUI Panel 58 // Klasker's GUI Panel
59 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIPANEL])) 59 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIPANEL]))
60 ret = new CGUIPanel(Environment, 0); 60 ret = new CGUIPanel(Environment, 0);
61 // texture cache browser 61 // texture cache browser
62 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_TEXTUREBROWSER])) 62 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_TEXTUREBROWSER]))
63 ret = new CGUITextureCacheBrowser(Environment, -1, 0); 63 ret = new CGUITextureCacheBrowser(Environment, -1, 0);
64 // block of attribute editors 64 // block of attribute editors
65 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR])) 65 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR]))
66 ret = new CGUIAttributeEditor(Environment, -1, 0); 66 ret = new CGUIAttributeEditor(Environment, -1, 0);
67 //! single attribute editors 67 //! single attribute editors
68 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_STRINGATTRIBUTE])) 68 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_STRINGATTRIBUTE]))
69 ret = new CGUIStringAttribute(Environment, 0, -1); 69 ret = new CGUIStringAttribute(Environment, 0, -1);
70 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_BOOLATTRIBUTE])) 70 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_BOOLATTRIBUTE]))
71 ret = new CGUIBoolAttribute(Environment, 0, -1); 71 ret = new CGUIBoolAttribute(Environment, 0, -1);
72 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_ENUMATTRIBUTE])) 72 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_ENUMATTRIBUTE]))
73 ret = new CGUIEnumAttribute(Environment, 0, -1); 73 ret = new CGUIEnumAttribute(Environment, 0, -1);
74 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORATTRIBUTE])) 74 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORATTRIBUTE]))
75 ret = new CGUIColorAttribute(Environment, 0, -1); 75 ret = new CGUIColorAttribute(Environment, 0, -1);
76 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORFATTRIBUTE])) 76 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORFATTRIBUTE]))
77 ret = new CGUIColorAttribute(Environment, 0, -1); 77 ret = new CGUIColorAttribute(Environment, 0, -1);
78 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_TEXTUREATTRIBUTE])) 78 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_TEXTUREATTRIBUTE]))
79 ret = new CGUITextureAttribute(Environment, 0, -1); 79 ret = new CGUITextureAttribute(Environment, 0, -1);
80 // stubs and custom editors 80 // stubs and custom editors
81 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_CONTEXTMENUEDITOR]) || 81 else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_CONTEXTMENUEDITOR]) ||
82 elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_MENUEDITOR]) || 82 elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_MENUEDITOR]) ||
83 elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_FILEDIALOGEDITOR]) || 83 elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_FILEDIALOGEDITOR]) ||
84 elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORDIALOGEDITOR]) || 84 elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORDIALOGEDITOR]) ||
85 elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_MODALSCREENEDITOR]) ) 85 elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_MODALSCREENEDITOR]) )
86 ret = new CGUIDummyEditorStub(Environment, 0, typeName); 86 ret = new CGUIDummyEditorStub(Environment, 0, typeName);
87 87
88 // add the element to its parent 88 // add the element to its parent
89 if (ret) 89 if (ret)
90 parent->addChild(ret); 90 parent->addChild(ret);
91 91
92 // the environment now has the reference, so we can drop the element 92 // the environment now has the reference, so we can drop the element
93 if (ret) 93 if (ret)
94 ret->drop(); 94 ret->drop();
95 95
96 return ret; 96 return ret;
97} 97}
98 98
99 99
100//! returns amount of element types this factory is able to create 100//! returns amount of element types this factory is able to create
101s32 CGUIEditFactory::getCreatableGUIElementTypeCount() const 101s32 CGUIEditFactory::getCreatableGUIElementTypeCount() const
102{ 102{
103 return EGUIEDIT_COUNT; 103 return EGUIEDIT_COUNT;
104} 104}
105 105
106 106
107//! returns type name of a createable element type 107//! returns type name of a createable element type
108const c8* CGUIEditFactory::getCreateableGUIElementTypeName(s32 idx) const 108const c8* CGUIEditFactory::getCreateableGUIElementTypeName(s32 idx) const
109{ 109{
110 if (idx>=0 && idx<EGUIEDIT_COUNT) 110 if (idx>=0 && idx<EGUIEDIT_COUNT)
111 return GUIEditElementTypeNames[idx]; 111 return GUIEditElementTypeNames[idx];
112 112
113 return 0; 113 return 0;
114} 114}
115 115
116 116
117 117
118} // end namespace gui 118} // end namespace gui
119} // end namespace irr 119} // end namespace irr
120 120
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.h
index e6f8815..b697942 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.h
@@ -1,53 +1,53 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_GUIEDIT_FACTORY_H_INCLUDED__ 5#ifndef __C_GUIEDIT_FACTORY_H_INCLUDED__
6#define __C_GUIEDIT_FACTORY_H_INCLUDED__ 6#define __C_GUIEDIT_FACTORY_H_INCLUDED__
7 7
8#include "IGUIElementFactory.h" 8#include "IGUIElementFactory.h"
9 9
10namespace irr 10namespace irr
11{ 11{
12namespace gui 12namespace gui
13{ 13{
14 class IGUIElement; 14 class IGUIElement;
15 class IGUIEnvironment; 15 class IGUIEnvironment;
16 16
17 //! Interface making it possible to dynamicly create gui elements 17 //! Interface making it possible to dynamicly create gui elements
18 class CGUIEditFactory : public IGUIElementFactory 18 class CGUIEditFactory : public IGUIElementFactory
19 { 19 {
20 public: 20 public:
21 21
22 CGUIEditFactory(IGUIEnvironment* env); 22 CGUIEditFactory(IGUIEnvironment* env);
23 ~CGUIEditFactory(); 23 ~CGUIEditFactory();
24 24
25 //! adds a GUI element to the GUI Environment based on its type name 25 //! adds a GUI element to the GUI Environment based on its type name
26 /** \param typeName: Type name of the element to add. 26 /** \param typeName: Type name of the element to add.
27 \param parent: Parent scene node of the new element, can be null to add it to the root. 27 \param parent: Parent scene node of the new element, can be null to add it to the root.
28 \return Returns pointer to the new element or null if not successful. */ 28 \return Returns pointer to the new element or null if not successful. */
29 virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0); 29 virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0);
30 30
31 //! returns amount of GUI element types this factory is able to create 31 //! returns amount of GUI element types this factory is able to create
32 virtual s32 getCreatableGUIElementTypeCount() const; 32 virtual s32 getCreatableGUIElementTypeCount() const;
33 33
34 //! returns type name of a createable GUI element type by index 34 //! returns type name of a createable GUI element type by index
35 /** \param idx: Index of the type in this factory. Must be a value between 0 and 35 /** \param idx: Index of the type in this factory. Must be a value between 0 and
36 getCreatableGUIElementTypeCount() */ 36 getCreatableGUIElementTypeCount() */
37 virtual const c8* getCreateableGUIElementTypeName(s32 idx) const; 37 virtual const c8* getCreateableGUIElementTypeName(s32 idx) const;
38 38
39 // not used: 39 // not used:
40 virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const {return 0;} ; 40 virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const {return 0;} ;
41 virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const { return EGUIET_ELEMENT;}; 41 virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const { return EGUIET_ELEMENT;};
42 virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) {return 0;}; 42 virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) {return 0;};
43 private: 43 private:
44 44
45 IGUIEnvironment* Environment; 45 IGUIEnvironment* Environment;
46 }; 46 };
47 47
48 48
49} // end namespace scene 49} // end namespace scene
50} // end namespace irr 50} // end namespace irr
51 51
52#endif 52#endif
53 53
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.cpp
index 2ff96ae..23221ec 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.cpp
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.cpp
@@ -1,356 +1,356 @@
1 1
2#include "CGUIEditWindow.h" 2#include "CGUIEditWindow.h"
3#include "IGUISkin.h" 3#include "IGUISkin.h"
4#include "IGUIEnvironment.h" 4#include "IGUIEnvironment.h"
5#include "IGUIElementFactory.h" 5#include "IGUIElementFactory.h"
6#include "IAttributes.h" 6#include "IAttributes.h"
7#include "IGUIFont.h" 7#include "IGUIFont.h"
8#include "IGUITabControl.h" 8#include "IGUITabControl.h"
9#include "IGUITreeView.h" 9#include "IGUITreeView.h"
10#include "CGUIEditWorkspace.h" 10#include "CGUIEditWorkspace.h"
11 11
12using namespace irr; 12using namespace irr;
13using namespace gui; 13using namespace gui;
14 14
15//! constructor 15//! constructor
16CGUIEditWindow::CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent) 16CGUIEditWindow::CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent)
17 : IGUIWindow(environment, parent, -1, rectangle), 17 : IGUIWindow(environment, parent, -1, rectangle),
18 Dragging(false), IsDraggable(true), Resizing(false), SelectedElement(0), 18 Dragging(false), IsDraggable(true), Resizing(false), SelectedElement(0),
19 AttribEditor(0), OptionEditor(0), EnvEditor(0) 19 AttribEditor(0), OptionEditor(0), EnvEditor(0)
20{ 20{
21 #ifdef _DEBUG 21 #ifdef _DEBUG
22 setDebugName("CGUIEditWindow"); 22 setDebugName("CGUIEditWindow");
23 #endif 23 #endif
24 24
25 // we can't tab out of this window 25 // we can't tab out of this window
26 setTabGroup(true); 26 setTabGroup(true);
27 // we can ctrl+tab to it 27 // we can ctrl+tab to it
28 setTabStop(true); 28 setTabStop(true);
29 // the tab order number is auto-assigned 29 // the tab order number is auto-assigned
30 setTabOrder(-1); 30 setTabOrder(-1);
31 31
32 // set window text 32 // set window text
33 setText(L"GUI Editor"); 33 setText(L"GUI Editor");
34 34
35 // return if we have no skin. 35 // return if we have no skin.
36 IGUISkin *skin = environment->getSkin(); 36 IGUISkin *skin = environment->getSkin();
37 if (!skin) 37 if (!skin)
38 return; 38 return;
39 39
40 s32 th = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); 40 s32 th = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH);
41 41
42 setRelativePosition(core::rect<s32>(50,50,250,500)); 42 setRelativePosition(core::rect<s32>(50,50,250,500));
43 setMinSize(core::dimension2du(200,200)); 43 setMinSize(core::dimension2du(200,200));
44 44
45 IGUITabControl *TabControl = environment->addTabControl(core::rect<s32>(1,th+5,199,449), this, false, true); 45 IGUITabControl *TabControl = environment->addTabControl(core::rect<s32>(1,th+5,199,449), this, false, true);
46 TabControl->setSubElement(true); 46 TabControl->setSubElement(true);
47 TabControl->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); 47 TabControl->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
48 48
49 TabControl->addTab(L"Tools"); 49 TabControl->addTab(L"Tools");
50 //L"Texture Cache Browser" 50 //L"Texture Cache Browser"
51 //L"Font Browser" 51 //L"Font Browser"
52 //L"Font Generator" 52 //L"Font Generator"
53 //L"Sprite Editor" 53 //L"Sprite Editor"
54 //Environment->addGUIElement("textureCacheBrowser", this); 54 //Environment->addGUIElement("textureCacheBrowser", this);
55 55
56 IGUITab* EditorTab = TabControl->addTab(L"Editor"); 56 IGUITab* EditorTab = TabControl->addTab(L"Editor");
57 OptionEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", EditorTab); 57 OptionEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", EditorTab);
58 OptionEditor->grab(); 58 OptionEditor->grab();
59 OptionEditor->setID(EGUIEDCE_OPTION_EDITOR); 59 OptionEditor->setID(EGUIEDCE_OPTION_EDITOR);
60 OptionEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); 60 OptionEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f));
61 OptionEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); 61 OptionEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
62 62
63 if (Parent && Parent->getParent() == Environment->getRootGUIElement()) 63 if (Parent && Parent->getParent() == Environment->getRootGUIElement())
64 { 64 {
65 IGUITab* EnvTab = TabControl->addTab(L"Env"); 65 IGUITab* EnvTab = TabControl->addTab(L"Env");
66 EnvEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", EnvTab); 66 EnvEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", EnvTab);
67 EnvEditor->grab(); 67 EnvEditor->grab();
68 EnvEditor->setID(EGUIEDCE_ENV_EDITOR); 68 EnvEditor->setID(EGUIEDCE_ENV_EDITOR);
69 EnvEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); 69 EnvEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f));
70 EnvEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); 70 EnvEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
71 } 71 }
72 IGUITab* ElementTab = TabControl->addTab(L"Element"); 72 IGUITab* ElementTab = TabControl->addTab(L"Element");
73 73
74 AttribEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", ElementTab); 74 AttribEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", ElementTab);
75 AttribEditor->grab(); 75 AttribEditor->grab();
76 AttribEditor->setID(EGUIEDCE_ATTRIB_EDITOR); 76 AttribEditor->setID(EGUIEDCE_ATTRIB_EDITOR);
77 AttribEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); 77 AttribEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f));
78 AttribEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); 78 AttribEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
79 79
80 IGUITab* TreeTab = TabControl->addTab(L"Tree"); 80 IGUITab* TreeTab = TabControl->addTab(L"Tree");
81 TreeView = environment->addTreeView(core::rect<s32>(0,0,0,0), TreeTab); 81 TreeView = environment->addTreeView(core::rect<s32>(0,0,0,0), TreeTab);
82 TreeView->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); 82 TreeView->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f));
83 TreeView->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); 83 TreeView->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
84 IGUITreeViewNode* treenode = TreeView->getRoot(); 84 IGUITreeViewNode* treenode = TreeView->getRoot();
85 //treenode->addChildFront(L"Elements"); 85 //treenode->addChildFront(L"Elements");
86 ResizeButton = environment->addButton(core::rect<s32>(199-th,449-th,199,449), this); 86 ResizeButton = environment->addButton(core::rect<s32>(199-th,449-th,199,449), this);
87 ResizeButton->setDrawBorder(false); 87 ResizeButton->setDrawBorder(false);
88 ResizeButton->setEnabled(false); 88 ResizeButton->setEnabled(false);
89 ResizeButton->setSpriteBank(skin->getSpriteBank()); 89 ResizeButton->setSpriteBank(skin->getSpriteBank());
90 ResizeButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_RESIZE), skin->getColor(EGDC_WINDOW_SYMBOL)); 90 ResizeButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_RESIZE), skin->getColor(EGDC_WINDOW_SYMBOL));
91 ResizeButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_RESIZE), skin->getColor(EGDC_WINDOW_SYMBOL)); 91 ResizeButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_RESIZE), skin->getColor(EGDC_WINDOW_SYMBOL));
92 ResizeButton->grab(); 92 ResizeButton->grab();
93 ResizeButton->setSubElement(true); 93 ResizeButton->setSubElement(true);
94 ResizeButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); 94 ResizeButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT);
95 updateTree(); 95 updateTree();
96} 96}
97 97
98 98
99//! destructor 99//! destructor
100CGUIEditWindow::~CGUIEditWindow() 100CGUIEditWindow::~CGUIEditWindow()
101{ 101{
102 // drop everything 102 // drop everything
103 if (AttribEditor) 103 if (AttribEditor)
104 AttribEditor->drop(); 104 AttribEditor->drop();
105 if (EnvEditor) 105 if (EnvEditor)
106 EnvEditor->drop(); 106 EnvEditor->drop();
107 if (OptionEditor) 107 if (OptionEditor)
108 OptionEditor->drop(); 108 OptionEditor->drop();
109 if (ResizeButton) 109 if (ResizeButton)
110 ResizeButton->drop(); 110 ResizeButton->drop();
111} 111}
112 112
113IGUITreeView* CGUIEditWindow::getTreeView() const 113IGUITreeView* CGUIEditWindow::getTreeView() const
114{ 114{
115 return TreeView; 115 return TreeView;
116} 116}
117CGUIAttributeEditor* CGUIEditWindow::getEnvironmentEditor() const 117CGUIAttributeEditor* CGUIEditWindow::getEnvironmentEditor() const
118{ 118{
119 return EnvEditor; 119 return EnvEditor;
120} 120}
121 121
122CGUIAttributeEditor* CGUIEditWindow::getAttributeEditor() const 122CGUIAttributeEditor* CGUIEditWindow::getAttributeEditor() const
123{ 123{
124 return AttribEditor; 124 return AttribEditor;
125} 125}
126 126
127CGUIAttributeEditor* CGUIEditWindow::getOptionEditor() const 127CGUIAttributeEditor* CGUIEditWindow::getOptionEditor() const
128{ 128{
129 return OptionEditor; 129 return OptionEditor;
130} 130}
131 131
132IGUITreeViewNode* CGUIEditWindow::getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode) 132IGUITreeViewNode* CGUIEditWindow::getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode)
133{ 133{
134 IGUITreeViewNode* child = searchnode->getFirstChild(); 134 IGUITreeViewNode* child = searchnode->getFirstChild();
135 while (child) 135 while (child)
136 { 136 {
137 if (((IGUIElement*) child->getData()) == element) 137 if (((IGUIElement*) child->getData()) == element)
138 return child; 138 return child;
139 139
140 if (child->hasChildren()) 140 if (child->hasChildren())
141 { 141 {
142 IGUITreeViewNode* foundnode = getTreeNode(element, child); 142 IGUITreeViewNode* foundnode = getTreeNode(element, child);
143 if (foundnode) 143 if (foundnode)
144 return foundnode; 144 return foundnode;
145 } 145 }
146 child = child->getNextSibling(); 146 child = child->getNextSibling();
147 } 147 }
148 return 0; 148 return 0;
149} 149}
150 150
151void CGUIEditWindow::addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode) 151void CGUIEditWindow::addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode)
152{ 152{
153 core::stringw name = core::stringw(parentElement->getTypeName()); 153 core::stringw name = core::stringw(parentElement->getTypeName());
154 if (parentElement->getID() != -1) 154 if (parentElement->getID() != -1)
155 name += core::stringw(L" [") + core::stringw(parentElement->getID()) + core::stringw(L"]"); 155 name += core::stringw(L" [") + core::stringw(parentElement->getID()) + core::stringw(L"]");
156 156
157 IGUITreeViewNode* newnode = treenode->addChildBack(name.c_str()); 157 IGUITreeViewNode* newnode = treenode->addChildBack(name.c_str());
158 newnode->setData((void*)parentElement); 158 newnode->setData((void*)parentElement);
159 core::list<IGUIElement*> children = parentElement->getChildren(); 159 core::list<IGUIElement*> children = parentElement->getChildren();
160 160
161 for (core::list<IGUIElement*>::Iterator i = children.begin(); i != children.end(); i++ ) 161 for (core::list<IGUIElement*>::Iterator i = children.begin(); i != children.end(); i++ )
162 { 162 {
163 if(core::stringc((*i)->getTypeName()) != "GUIEditor" && !(*i)->isSubElement()) 163 if(core::stringc((*i)->getTypeName()) != "GUIEditor" && !(*i)->isSubElement())
164 addChildrenToTree(*i, newnode); 164 addChildrenToTree(*i, newnode);
165 } 165 }
166} 166}
167 167
168void CGUIEditWindow::updateTree() 168void CGUIEditWindow::updateTree()
169{ 169{
170 TreeView->getRoot()->clearChildren(); 170 TreeView->getRoot()->clearChildren();
171 IGUIElement* root = Environment->getRootGUIElement(); 171 IGUIElement* root = Environment->getRootGUIElement();
172 addChildrenToTree(root, TreeView->getRoot()); 172 addChildrenToTree(root, TreeView->getRoot());
173 TreeView->getRoot()->getFirstChild()->setExpanded(true); 173 TreeView->getRoot()->getFirstChild()->setExpanded(true);
174} 174}
175 175
176void CGUIEditWindow::setSelectedElement(IGUIElement *sel) 176void CGUIEditWindow::setSelectedElement(IGUIElement *sel)
177{ 177{
178 // save changes 178 // save changes
179 AttribEditor->updateAttribs(); 179 AttribEditor->updateAttribs();
180 IGUITreeViewNode* elementTreeNode = getTreeNode(sel, TreeView->getRoot()); 180 IGUITreeViewNode* elementTreeNode = getTreeNode(sel, TreeView->getRoot());
181 181
182 if (elementTreeNode) 182 if (elementTreeNode)
183 { 183 {
184 elementTreeNode->setSelected(true); 184 elementTreeNode->setSelected(true);
185 while (elementTreeNode) 185 while (elementTreeNode)
186 { 186 {
187 elementTreeNode->setExpanded(true); 187 elementTreeNode->setExpanded(true);
188 elementTreeNode = elementTreeNode->getParent(); 188 elementTreeNode = elementTreeNode->getParent();
189 } 189 }
190 } 190 }
191 191
192 io::IAttributes* Attribs = AttribEditor->getAttribs(); 192 io::IAttributes* Attribs = AttribEditor->getAttribs();
193 193
194 if (SelectedElement && sel != SelectedElement) 194 if (SelectedElement && sel != SelectedElement)
195 { 195 {
196 // deserialize attributes 196 // deserialize attributes
197 SelectedElement->deserializeAttributes(Attribs); 197 SelectedElement->deserializeAttributes(Attribs);
198 } 198 }
199 // clear the attributes list 199 // clear the attributes list
200 Attribs->clear(); 200 Attribs->clear();
201 SelectedElement = sel; 201 SelectedElement = sel;
202 202
203 // get the new attributes 203 // get the new attributes
204 if (SelectedElement) 204 if (SelectedElement)
205 SelectedElement->serializeAttributes(Attribs); 205 SelectedElement->serializeAttributes(Attribs);
206 206
207 AttribEditor->refreshAttribs(); 207 AttribEditor->refreshAttribs();
208} 208}
209 209
210//! draws the element and its children. 210//! draws the element and its children.
211//! same code as for a window 211//! same code as for a window
212void CGUIEditWindow::draw() 212void CGUIEditWindow::draw()
213{ 213{
214 if (!IsVisible) 214 if (!IsVisible)
215 return; 215 return;
216 216
217 IGUISkin* skin = Environment->getSkin(); 217 IGUISkin* skin = Environment->getSkin();
218 218
219 core::rect<s32> rect = AbsoluteRect; 219 core::rect<s32> rect = AbsoluteRect;
220 220
221 // draw body fast 221 // draw body fast
222 rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER), 222 rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER),
223 AbsoluteRect, &AbsoluteClippingRect); 223 AbsoluteRect, &AbsoluteClippingRect);
224 224
225 if (Text.size()) 225 if (Text.size())
226 { 226 {
227 rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X); 227 rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X);
228 rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y); 228 rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y);
229 rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; 229 rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5;
230 230
231 IGUIFont* font = skin->getFont(); 231 IGUIFont* font = skin->getFont();
232 if (font) 232 if (font)
233 font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, &AbsoluteClippingRect); 233 font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, &AbsoluteClippingRect);
234 } 234 }
235 235
236 IGUIElement::draw(); 236 IGUIElement::draw();
237} 237}
238 238
239 239
240//! called if an event happened. 240//! called if an event happened.
241bool CGUIEditWindow::OnEvent(const SEvent &event) 241bool CGUIEditWindow::OnEvent(const SEvent &event)
242{ 242{
243 switch(event.EventType) 243 switch(event.EventType)
244 { 244 {
245 case EET_GUI_EVENT: 245 case EET_GUI_EVENT:
246 switch(event.GUIEvent.EventType) 246 switch(event.GUIEvent.EventType)
247 { 247 {
248 case EGET_ELEMENT_FOCUS_LOST: 248 case EGET_ELEMENT_FOCUS_LOST:
249 if (event.GUIEvent.Caller == this || 249 if (event.GUIEvent.Caller == this ||
250 event.GUIEvent.Caller == ResizeButton) 250 event.GUIEvent.Caller == ResizeButton)
251 { 251 {
252 Dragging = false; 252 Dragging = false;
253 Resizing = false; 253 Resizing = false;
254 } 254 }
255 break; 255 break;
256 default: 256 default:
257 break; 257 break;
258 } 258 }
259 259
260 break; 260 break;
261 case EET_MOUSE_INPUT_EVENT: 261 case EET_MOUSE_INPUT_EVENT:
262 switch(event.MouseInput.Event) 262 switch(event.MouseInput.Event)
263 { 263 {
264 case EMIE_LMOUSE_PRESSED_DOWN: 264 case EMIE_LMOUSE_PRESSED_DOWN:
265 { 265 {
266 DragStart.X = event.MouseInput.X; 266 DragStart.X = event.MouseInput.X;
267 DragStart.Y = event.MouseInput.Y; 267 DragStart.Y = event.MouseInput.Y;
268 268
269 IGUIElement* clickedElement = getElementFromPoint(DragStart); 269 IGUIElement* clickedElement = getElementFromPoint(DragStart);
270 270
271 if (clickedElement == this) 271 if (clickedElement == this)
272 { 272 {
273 Dragging = IsDraggable; 273 Dragging = IsDraggable;
274 //Environment->setFocus(this); 274 //Environment->setFocus(this);
275 if (Parent) 275 if (Parent)
276 Parent->bringToFront(this); 276 Parent->bringToFront(this);
277 return true; 277 return true;
278 } 278 }
279 else if (clickedElement == ResizeButton) 279 else if (clickedElement == ResizeButton)
280 { 280 {
281 Resizing = true; 281 Resizing = true;
282 //Environment->setFocus(this); 282 //Environment->setFocus(this);
283 if (Parent) 283 if (Parent)
284 Parent->bringToFront(this); 284 Parent->bringToFront(this);
285 return true; 285 return true;
286 } 286 }
287 break; 287 break;
288 } 288 }
289 case EMIE_LMOUSE_LEFT_UP: 289 case EMIE_LMOUSE_LEFT_UP:
290 if (Dragging || Resizing) 290 if (Dragging || Resizing)
291 { 291 {
292 Dragging = false; 292 Dragging = false;
293 Resizing = false; 293 Resizing = false;
294 return true; 294 return true;
295 } 295 }
296 break; 296 break;
297 case EMIE_MOUSE_MOVED: 297 case EMIE_MOUSE_MOVED:
298 if (Dragging || Resizing) 298 if (Dragging || Resizing)
299 { 299 {
300 // gui window should not be dragged outside of its parent 300 // gui window should not be dragged outside of its parent
301 if (Parent) 301 if (Parent)
302 if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || 302 if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 ||
303 event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || 303 event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 ||
304 event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || 304 event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 ||
305 event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1) 305 event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1)
306 306
307 return true; 307 return true;
308 core::position2di diff(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y); 308 core::position2di diff(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y);
309 if (Dragging) 309 if (Dragging)
310 { 310 {
311 move(diff); 311 move(diff);
312 DragStart.X = event.MouseInput.X; 312 DragStart.X = event.MouseInput.X;
313 DragStart.Y = event.MouseInput.Y; 313 DragStart.Y = event.MouseInput.Y;
314 } 314 }
315 else if (Resizing) 315 else if (Resizing)
316 { 316 {
317 core::position2di dp = RelativeRect.LowerRightCorner + diff; 317 core::position2di dp = RelativeRect.LowerRightCorner + diff;
318 setRelativePosition(core::rect<s32>(RelativeRect.UpperLeftCorner, dp)); 318 setRelativePosition(core::rect<s32>(RelativeRect.UpperLeftCorner, dp));
319 DragStart += dp - RelativeRect.LowerRightCorner + diff; 319 DragStart += dp - RelativeRect.LowerRightCorner + diff;
320 } 320 }
321 321
322 return true; 322 return true;
323 } 323 }
324 break; 324 break;
325 default: 325 default:
326 break; 326 break;
327 } 327 }
328 default: 328 default:
329 break; 329 break;
330 } 330 }
331 331
332 return Parent ? Parent->OnEvent(event) : false; 332 return Parent ? Parent->OnEvent(event) : false;
333} 333}
334 334
335bool CGUIEditWindow::isDraggable() const 335bool CGUIEditWindow::isDraggable() const
336{ 336{
337 return IsDraggable; 337 return IsDraggable;
338} 338}
339 339
340void CGUIEditWindow::setDraggable(bool draggable) 340void CGUIEditWindow::setDraggable(bool draggable)
341{ 341{
342 IsDraggable = draggable; 342 IsDraggable = draggable;
343 343
344 if (Dragging && !IsDraggable) 344 if (Dragging && !IsDraggable)
345 Dragging = false; 345 Dragging = false;
346} 346}
347 347
348 348
349// we're supposed to supply these if we're creating an IGUIWindow 349// we're supposed to supply these if we're creating an IGUIWindow
350// but we don't need them so we'll just return null 350// but we don't need them so we'll just return null
351 351
352//! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars) 352//! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars)
353core::rect<s32> CGUIEditWindow::getClientRect() const {return core::recti();} 353core::rect<s32> CGUIEditWindow::getClientRect() const {return core::recti();}
354IGUIButton* CGUIEditWindow::getCloseButton() const {return 0;} 354IGUIButton* CGUIEditWindow::getCloseButton() const {return 0;}
355IGUIButton* CGUIEditWindow::getMinimizeButton() const {return 0;} 355IGUIButton* CGUIEditWindow::getMinimizeButton() const {return 0;}
356IGUIButton* CGUIEditWindow::getMaximizeButton() const {return 0;} 356IGUIButton* CGUIEditWindow::getMaximizeButton() const {return 0;}
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.h
index 4b1d72f..07eb28b 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.h
@@ -1,88 +1,88 @@
1#ifndef __C_GUI_EDITOR_H_INCLUDED__ 1#ifndef __C_GUI_EDITOR_H_INCLUDED__
2#define __C_GUI_EDITOR_H_INCLUDED__ 2#define __C_GUI_EDITOR_H_INCLUDED__
3 3
4 4
5#include "IGUIWindow.h" 5#include "IGUIWindow.h"
6#include "CGUIAttributeEditor.h" 6#include "CGUIAttributeEditor.h"
7//#include "IGUIStaticText.h" 7//#include "IGUIStaticText.h"
8#include "IGUIButton.h" 8#include "IGUIButton.h"
9#include "IGUITreeView.h" 9#include "IGUITreeView.h"
10#include "irrArray.h" 10#include "irrArray.h"
11#include "IAttributes.h" 11#include "IAttributes.h"
12#include "EGUIEditTypes.h" 12#include "EGUIEditTypes.h"
13 13
14namespace irr 14namespace irr
15{ 15{
16namespace gui 16namespace gui
17{ 17{
18 class CGUIEditWindow : public IGUIWindow 18 class CGUIEditWindow : public IGUIWindow
19 { 19 {
20 public: 20 public:
21 21
22 //! constructor 22 //! constructor
23 CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent); 23 CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent);
24 24
25 //! destructor 25 //! destructor
26 ~CGUIEditWindow(); 26 ~CGUIEditWindow();
27 27
28 //! this part draws the window 28 //! this part draws the window
29 virtual void draw(); 29 virtual void draw();
30 //! handles events 30 //! handles events
31 virtual bool OnEvent(const SEvent &event); 31 virtual bool OnEvent(const SEvent &event);
32 32
33 //! change selection 33 //! change selection
34 virtual void setSelectedElement(IGUIElement *sel); 34 virtual void setSelectedElement(IGUIElement *sel);
35 35
36 //! get draggable 36 //! get draggable
37 virtual bool isDraggable() const; 37 virtual bool isDraggable() const;
38 38
39 //! get draggable 39 //! get draggable
40 virtual void setDraggable(bool draggable); 40 virtual void setDraggable(bool draggable);
41 41
42 // not used 42 // not used
43 virtual core::rect<s32> getClientRect() const; 43 virtual core::rect<s32> getClientRect() const;
44 virtual IGUIButton* getCloseButton() const; 44 virtual IGUIButton* getCloseButton() const;
45 virtual IGUIButton* getMinimizeButton() const; 45 virtual IGUIButton* getMinimizeButton() const;
46 virtual IGUIButton* getMaximizeButton() const; 46 virtual IGUIButton* getMaximizeButton() const;
47 virtual void setDrawBackground(bool draw) { } 47 virtual void setDrawBackground(bool draw) { }
48 virtual bool getDrawBackground() const { return true; } 48 virtual bool getDrawBackground() const { return true; }
49 virtual void setDrawTitlebar(bool draw) { } 49 virtual void setDrawTitlebar(bool draw) { }
50 virtual bool getDrawTitlebar() const { return true; } 50 virtual bool getDrawTitlebar() const { return true; }
51 51
52 IGUITreeView* getTreeView() const; 52 IGUITreeView* getTreeView() const;
53 CGUIAttributeEditor* getAttributeEditor() const; 53 CGUIAttributeEditor* getAttributeEditor() const;
54 CGUIAttributeEditor* getOptionEditor() const; 54 CGUIAttributeEditor* getOptionEditor() const;
55 CGUIAttributeEditor* getEnvironmentEditor() const; 55 CGUIAttributeEditor* getEnvironmentEditor() const;
56 56
57 //! Returns the type name of the gui element. 57 //! Returns the type name of the gui element.
58 virtual const c8* getTypeName() const 58 virtual const c8* getTypeName() const
59 { 59 {
60 return GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW]; 60 return GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW];
61 } 61 }
62 62
63 void updateTree(); 63 void updateTree();
64 private: 64 private:
65 65
66 void addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode); 66 void addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode);
67 IGUITreeViewNode* getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode); 67 IGUITreeViewNode* getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode);
68 // for dragging the window 68 // for dragging the window
69 bool Dragging; 69 bool Dragging;
70 bool IsDraggable; 70 bool IsDraggable;
71 bool Resizing; 71 bool Resizing;
72 core::position2d<s32> DragStart; 72 core::position2d<s32> DragStart;
73 73
74 IGUIElement* SelectedElement; // current selected element 74 IGUIElement* SelectedElement; // current selected element
75 75
76 CGUIAttributeEditor* AttribEditor; // edits the current attribute 76 CGUIAttributeEditor* AttribEditor; // edits the current attribute
77 CGUIAttributeEditor* OptionEditor; // edits the options for the window 77 CGUIAttributeEditor* OptionEditor; // edits the options for the window
78 CGUIAttributeEditor* EnvEditor; // edits attributes for the environment 78 CGUIAttributeEditor* EnvEditor; // edits attributes for the environment
79 IGUITreeView* TreeView; // tree view of all elements in scene 79 IGUITreeView* TreeView; // tree view of all elements in scene
80 IGUIButton* ResizeButton; 80 IGUIButton* ResizeButton;
81 81
82 }; 82 };
83 83
84} // end namespace gui 84} // end namespace gui
85} // end namespace irr 85} // end namespace irr
86 86
87#endif // __C_GUI_EDITOR_H_INCLUDED__ 87#endif // __C_GUI_EDITOR_H_INCLUDED__
88 88
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.cpp
index a45e5d3..7b09136 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.cpp
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.cpp
@@ -1,927 +1,927 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson 1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5// Thanks to Midnight for all his testing, bug fixes and patches :) 5// Thanks to Midnight for all his testing, bug fixes and patches :)
6 6
7#include "CGUIEditWorkspace.h" 7#include "CGUIEditWorkspace.h"
8#include "IGUIEnvironment.h" 8#include "IGUIEnvironment.h"
9#include "IVideoDriver.h" 9#include "IVideoDriver.h"
10#include "IOSOperator.h" 10#include "IOSOperator.h"
11#include "IReadFile.h" 11#include "IReadFile.h"
12#include "IFileSystem.h" 12#include "IFileSystem.h"
13#include "IXMLWriter.h" 13#include "IXMLWriter.h"
14#include "IGUISkin.h" 14#include "IGUISkin.h"
15#include "IGUIElementFactory.h" 15#include "IGUIElementFactory.h"
16#include "CGUIEditWindow.h" 16#include "CGUIEditWindow.h"
17#include "IGUIContextMenu.h" 17#include "IGUIContextMenu.h"
18#include "IGUIFileOpenDialog.h" 18#include "IGUIFileOpenDialog.h"
19#include "IGUITreeView.h" 19#include "IGUITreeView.h"
20#include "CGUIAttribute.h" 20#include "CGUIAttribute.h"
21#include "CMemoryReadWriteFile.h" 21#include "CMemoryReadWriteFile.h"
22 22
23namespace irr 23namespace irr
24{ 24{
25namespace gui 25namespace gui
26{ 26{
27 27
28//! constructor 28//! constructor
29CGUIEditWorkspace::CGUIEditWorkspace(IGUIEnvironment* environment, s32 id, IGUIElement *parent) 29CGUIEditWorkspace::CGUIEditWorkspace(IGUIEnvironment* environment, s32 id, IGUIElement *parent)
30: IGUIElement(EGUIET_ELEMENT, environment, parent ? parent : environment->getRootGUIElement(), id, environment->getRootGUIElement()->getAbsolutePosition()), 30: IGUIElement(EGUIET_ELEMENT, environment, parent ? parent : environment->getRootGUIElement(), id, environment->getRootGUIElement()->getAbsolutePosition()),
31 CurrentMode(EGUIEDM_SELECT), MouseOverMode(EGUIEDM_SELECT), 31 CurrentMode(EGUIEDM_SELECT), MouseOverMode(EGUIEDM_SELECT),
32 GridSize(10,10), MenuCommandStart(0x3D17), DrawGrid(false), UseGrid(true), 32 GridSize(10,10), MenuCommandStart(0x3D17), DrawGrid(false), UseGrid(true),
33 MouseOverElement(0), SelectedElement(0), EditorWindow(0) 33 MouseOverElement(0), SelectedElement(0), EditorWindow(0)
34{ 34{
35 #ifdef _DEBUG 35 #ifdef _DEBUG
36 setDebugName("CGUIEditWorkspace"); 36 setDebugName("CGUIEditWorkspace");
37 #endif 37 #endif
38 38
39 // this element is never saved. 39 // this element is never saved.
40 setSubElement(true); 40 setSubElement(true);
41 41
42 // it resizes to fit a resizing window 42 // it resizes to fit a resizing window
43 setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); 43 setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
44 44
45 EditorWindow = (CGUIEditWindow*) Environment->addGUIElement("GUIEditWindow", this); 45 EditorWindow = (CGUIEditWindow*) Environment->addGUIElement("GUIEditWindow", this);
46 if (EditorWindow) 46 if (EditorWindow)
47 { 47 {
48 EditorWindow->grab(); 48 EditorWindow->grab();
49 EditorWindow->setSubElement(true); 49 EditorWindow->setSubElement(true);
50 50
51 Environment->setFocus(EditorWindow); 51 Environment->setFocus(EditorWindow);
52 serializeAttributes(EditorWindow->getOptionEditor()->getAttribs()); 52 serializeAttributes(EditorWindow->getOptionEditor()->getAttribs());
53 EditorWindow->getOptionEditor()->refreshAttribs(); 53 EditorWindow->getOptionEditor()->refreshAttribs();
54 54
55 if (EditorWindow->getEnvironmentEditor()) 55 if (EditorWindow->getEnvironmentEditor())
56 { 56 {
57 Environment->serializeAttributes(EditorWindow->getEnvironmentEditor()->getAttribs()); 57 Environment->serializeAttributes(EditorWindow->getEnvironmentEditor()->getAttribs());
58 EditorWindow->getEnvironmentEditor()->refreshAttribs(); 58 EditorWindow->getEnvironmentEditor()->refreshAttribs();
59 } 59 }
60 } 60 }
61} 61}
62 62
63 63
64//! destructor 64//! destructor
65CGUIEditWorkspace::~CGUIEditWorkspace() 65CGUIEditWorkspace::~CGUIEditWorkspace()
66{ 66{
67 if (EditorWindow) 67 if (EditorWindow)
68 EditorWindow->drop(); 68 EditorWindow->drop();
69} 69}
70 70
71 71
72void CGUIEditWorkspace::setMenuCommandIDStart(s32 id) 72void CGUIEditWorkspace::setMenuCommandIDStart(s32 id)
73{ 73{
74 MenuCommandStart = id; 74 MenuCommandStart = id;
75} 75}
76 76
77CGUIEditWorkspace::EGUIEDIT_MODE CGUIEditWorkspace::getModeFromPos(core::position2di p) 77CGUIEditWorkspace::EGUIEDIT_MODE CGUIEditWorkspace::getModeFromPos(core::position2di p)
78{ 78{
79 if (SelectedElement) 79 if (SelectedElement)
80 { 80 {
81 core::rect<s32> r = SelectedElement->getAbsolutePosition(); 81 core::rect<s32> r = SelectedElement->getAbsolutePosition();
82 82
83 if (TLRect.isPointInside(p)) 83 if (TLRect.isPointInside(p))
84 return EGUIEDM_RESIZE_TL; 84 return EGUIEDM_RESIZE_TL;
85 85
86 else if (TRRect.isPointInside(p)) 86 else if (TRRect.isPointInside(p))
87 return EGUIEDM_RESIZE_TR; 87 return EGUIEDM_RESIZE_TR;
88 88
89 else if (BLRect.isPointInside(p) ) 89 else if (BLRect.isPointInside(p) )
90 return EGUIEDM_RESIZE_BL; 90 return EGUIEDM_RESIZE_BL;
91 91
92 else if (BRRect.isPointInside(p)) 92 else if (BRRect.isPointInside(p))
93 return EGUIEDM_RESIZE_BR; 93 return EGUIEDM_RESIZE_BR;
94 94
95 else if (TopRect.isPointInside(p)) 95 else if (TopRect.isPointInside(p))
96 return EGUIEDM_RESIZE_T; 96 return EGUIEDM_RESIZE_T;
97 97
98 else if (BRect.isPointInside(p)) 98 else if (BRect.isPointInside(p))
99 return EGUIEDM_RESIZE_B; 99 return EGUIEDM_RESIZE_B;
100 100
101 else if (LRect.isPointInside(p)) 101 else if (LRect.isPointInside(p))
102 return EGUIEDM_RESIZE_L; 102 return EGUIEDM_RESIZE_L;
103 103
104 else if (RRect.isPointInside(p)) 104 else if (RRect.isPointInside(p))
105 return EGUIEDM_RESIZE_R; 105 return EGUIEDM_RESIZE_R;
106 106
107 else if (getEditableElementFromPoint(SelectedElement, p) == SelectedElement) 107 else if (getEditableElementFromPoint(SelectedElement, p) == SelectedElement)
108 return EGUIEDM_MOVE; 108 return EGUIEDM_MOVE;
109 109
110 else 110 else
111 return EGUIEDM_SELECT; 111 return EGUIEDM_SELECT;
112 } 112 }
113 113
114 return EGUIEDM_SELECT; 114 return EGUIEDM_SELECT;
115 115
116} 116}
117 117
118IGUIElement* CGUIEditWorkspace::getEditableElementFromPoint(IGUIElement *start, const core::position2di &point, s32 index ) 118IGUIElement* CGUIEditWorkspace::getEditableElementFromPoint(IGUIElement *start, const core::position2di &point, s32 index )
119{ 119{
120 IGUIElement* target = 0; 120 IGUIElement* target = 0;
121 121
122 // we have to search from back to front. 122 // we have to search from back to front.
123 123
124 core::list<IGUIElement*>::ConstIterator it = start->getChildren().getLast(); 124 core::list<IGUIElement*>::ConstIterator it = start->getChildren().getLast();
125 s32 count=0; 125 s32 count=0;
126 while(it != start->getChildren().end()) 126 while(it != start->getChildren().end())
127 { 127 {
128 target = getEditableElementFromPoint((*it),point); 128 target = getEditableElementFromPoint((*it),point);
129 if (target) 129 if (target)
130 { 130 {
131 if (!target->isSubElement() && !isMyChild(target) && target != this) 131 if (!target->isSubElement() && !isMyChild(target) && target != this)
132 { 132 {
133 if (index == count) 133 if (index == count)
134 return target; 134 return target;
135 else 135 else
136 count++; 136 count++;
137 } 137 }
138 else 138 else
139 target = 0; 139 target = 0;
140 } 140 }
141 --it; 141 --it;
142 } 142 }
143 143
144 if (start->getAbsolutePosition().isPointInside(point)) 144 if (start->getAbsolutePosition().isPointInside(point))
145 target = start; 145 target = start;
146 146
147 return target; 147 return target;
148} 148}
149 149
150void CGUIEditWorkspace::setSelectedElement(IGUIElement *sel) 150void CGUIEditWorkspace::setSelectedElement(IGUIElement *sel)
151{ 151{
152 IGUIElement* focus = Environment->getFocus(); 152 IGUIElement* focus = Environment->getFocus();
153 // we only give focus back to children 153 // we only give focus back to children
154 if (!isMyChild(focus)) 154 if (!isMyChild(focus))
155 focus = 0; 155 focus = 0;
156 156
157 if (SelectedElement != Parent) 157 if (SelectedElement != Parent)
158 { 158 {
159 if (SelectedElement != sel && EditorWindow) 159 if (SelectedElement != sel && EditorWindow)
160 { 160 {
161 EditorWindow->setSelectedElement(sel); 161 EditorWindow->setSelectedElement(sel);
162 SelectedElement = sel; 162 SelectedElement = sel;
163 } 163 }
164 } 164 }
165 else 165 else
166 SelectedElement = 0; 166 SelectedElement = 0;
167 167
168 if (focus) 168 if (focus)
169 Environment->setFocus(focus); 169 Environment->setFocus(focus);
170 else 170 else
171 Environment->setFocus(this); 171 Environment->setFocus(this);
172} 172}
173 173
174IGUIElement* CGUIEditWorkspace::getSelectedElement() 174IGUIElement* CGUIEditWorkspace::getSelectedElement()
175{ 175{
176 return SelectedElement; 176 return SelectedElement;
177} 177}
178void CGUIEditWorkspace::selectNextSibling() 178void CGUIEditWorkspace::selectNextSibling()
179{ 179{
180 IGUIElement* p=0; 180 IGUIElement* p=0;
181 181
182 if (SelectedElement && SelectedElement->getParent()) 182 if (SelectedElement && SelectedElement->getParent())
183 p = SelectedElement->getParent(); 183 p = SelectedElement->getParent();
184 else 184 else
185 p = Parent; 185 p = Parent;
186 186
187 core::list<IGUIElement*>::ConstIterator it = p->getChildren().begin(); 187 core::list<IGUIElement*>::ConstIterator it = p->getChildren().begin();
188 // find selected element 188 // find selected element
189 if (SelectedElement) 189 if (SelectedElement)
190 while (*it != SelectedElement) 190 while (*it != SelectedElement)
191 ++it; 191 ++it;
192 if (it !=p->getChildren().end()) 192 if (it !=p->getChildren().end())
193 ++it; 193 ++it;
194 // find next non sub-element 194 // find next non sub-element
195 while (it != p->getChildren().end() && (*it)->isSubElement()) 195 while (it != p->getChildren().end() && (*it)->isSubElement())
196 ++it; 196 ++it;
197 197
198 if (it != p->getChildren().end()) 198 if (it != p->getChildren().end())
199 setSelectedElement(*it); 199 setSelectedElement(*it);
200} 200}
201void CGUIEditWorkspace::selectPreviousSibling() 201void CGUIEditWorkspace::selectPreviousSibling()
202{ 202{
203 IGUIElement* p=0; 203 IGUIElement* p=0;
204 204
205 if (SelectedElement && SelectedElement->getParent()) 205 if (SelectedElement && SelectedElement->getParent())
206 p = SelectedElement->getParent(); 206 p = SelectedElement->getParent();
207 else 207 else
208 p = Parent; 208 p = Parent;
209 209
210 core::list<IGUIElement*>::ConstIterator it = p->getChildren().getLast(); 210 core::list<IGUIElement*>::ConstIterator it = p->getChildren().getLast();
211 // find selected element 211 // find selected element
212 if (SelectedElement) 212 if (SelectedElement)
213 while (*it != SelectedElement) 213 while (*it != SelectedElement)
214 --it; 214 --it;
215 if (it != p->getChildren().end()) 215 if (it != p->getChildren().end())
216 --it; 216 --it;
217 // find next non sub-element 217 // find next non sub-element
218 while (it != p->getChildren().end() && (*it)->isSubElement()) 218 while (it != p->getChildren().end() && (*it)->isSubElement())
219 --it; 219 --it;
220 220
221 if (it != p->getChildren().end()) 221 if (it != p->getChildren().end())
222 setSelectedElement(*it); 222 setSelectedElement(*it);
223} 223}
224 224
225//! called if an event happened. 225//! called if an event happened.
226bool CGUIEditWorkspace::OnEvent(const SEvent &e) 226bool CGUIEditWorkspace::OnEvent(const SEvent &e)
227{ 227{
228 IGUIFileOpenDialog* dialog=0; 228 IGUIFileOpenDialog* dialog=0;
229 switch(e.EventType) 229 switch(e.EventType)
230 { 230 {
231 case ATTRIBEDIT_ATTRIB_CHANGED: 231 case ATTRIBEDIT_ATTRIB_CHANGED:
232 { 232 {
233 switch (e.UserEvent.UserData1) 233 switch (e.UserEvent.UserData1)
234 { 234 {
235 case EGUIEDCE_ATTRIB_EDITOR: 235 case EGUIEDCE_ATTRIB_EDITOR:
236 { 236 {
237 // update selected items attributes 237 // update selected items attributes
238 if (SelectedElement) 238 if (SelectedElement)
239 { 239 {
240 SelectedElement->deserializeAttributes(EditorWindow->getAttributeEditor()->getAttribs()); 240 SelectedElement->deserializeAttributes(EditorWindow->getAttributeEditor()->getAttribs());
241 EditorWindow->updateTree(); 241 EditorWindow->updateTree();
242 } 242 }
243 return true; 243 return true;
244 } 244 }
245 case EGUIEDCE_OPTION_EDITOR: 245 case EGUIEDCE_OPTION_EDITOR:
246 { 246 {
247 // update editor options 247 // update editor options
248 deserializeAttributes(EditorWindow->getOptionEditor()->getAttribs()); 248 deserializeAttributes(EditorWindow->getOptionEditor()->getAttribs());
249 return true; 249 return true;
250 } 250 }
251 case EGUIEDCE_ENV_EDITOR: 251 case EGUIEDCE_ENV_EDITOR:
252 { 252 {
253 // update environment 253 // update environment
254 Environment->deserializeAttributes(EditorWindow->getEnvironmentEditor()->getAttribs()); 254 Environment->deserializeAttributes(EditorWindow->getEnvironmentEditor()->getAttribs());
255 return true; 255 return true;
256 } 256 }
257 } 257 }
258 } 258 }
259 break; 259 break;
260 260
261 case EET_KEY_INPUT_EVENT: 261 case EET_KEY_INPUT_EVENT:
262 if (!e.KeyInput.PressedDown) 262 if (!e.KeyInput.PressedDown)
263 { 263 {
264 switch (e.KeyInput.Key) 264 switch (e.KeyInput.Key)
265 { 265 {
266 case KEY_DELETE: 266 case KEY_DELETE:
267 if (SelectedElement) 267 if (SelectedElement)
268 { 268 {
269 IGUIElement* el = SelectedElement; 269 IGUIElement* el = SelectedElement;
270 setSelectedElement(0); 270 setSelectedElement(0);
271 MouseOverElement = 0; 271 MouseOverElement = 0;
272 el->remove(); 272 el->remove();
273 EditorWindow->updateTree(); 273 EditorWindow->updateTree();
274 } 274 }
275 break; 275 break;
276 case KEY_KEY_X: 276 case KEY_KEY_X:
277 if (e.KeyInput.Control && SelectedElement) 277 if (e.KeyInput.Control && SelectedElement)
278 { 278 {
279 // cut 279 // cut
280 CopySelectedElementXML(); 280 CopySelectedElementXML();
281 // delete element 281 // delete element
282 IGUIElement *el = SelectedElement; 282 IGUIElement *el = SelectedElement;
283 setSelectedElement(0); 283 setSelectedElement(0);
284 MouseOverElement = 0; 284 MouseOverElement = 0;
285 el->remove(); 285 el->remove();
286 } 286 }
287 break; 287 break;
288 case KEY_KEY_C: 288 case KEY_KEY_C:
289 // copy 289 // copy
290 if (e.KeyInput.Control && SelectedElement) 290 if (e.KeyInput.Control && SelectedElement)
291 { 291 {
292 CopySelectedElementXML(); 292 CopySelectedElementXML();
293 } 293 }
294 break; 294 break;
295 case KEY_KEY_V: 295 case KEY_KEY_V:
296 // paste 296 // paste
297 if (e.KeyInput.Control) 297 if (e.KeyInput.Control)
298 { 298 {
299 PasteXMLToSelectedElement(); 299 PasteXMLToSelectedElement();
300 } 300 }
301 break; 301 break;
302 default: 302 default:
303 break; 303 break;
304 } 304 }
305 305
306 return true; 306 return true;
307 } 307 }
308 break; 308 break;
309 309
310 case EET_MOUSE_INPUT_EVENT: 310 case EET_MOUSE_INPUT_EVENT:
311 311
312 switch(e.MouseInput.Event) 312 switch(e.MouseInput.Event)
313 { 313 {
314 case EMIE_MOUSE_WHEEL: 314 case EMIE_MOUSE_WHEEL:
315 { 315 {
316 f32 wheel = e.MouseInput.Wheel; 316 f32 wheel = e.MouseInput.Wheel;
317 317
318 if (wheel > 0) 318 if (wheel > 0)
319 selectPreviousSibling(); 319 selectPreviousSibling();
320 else 320 else
321 selectNextSibling(); 321 selectNextSibling();
322 } 322 }
323 break; 323 break;
324 case EMIE_LMOUSE_PRESSED_DOWN: 324 case EMIE_LMOUSE_PRESSED_DOWN:
325 { 325 {
326 core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); 326 core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y);
327 327
328 IGUIElement* newSelection = getElementFromPoint(p); 328 IGUIElement* newSelection = getElementFromPoint(p);
329 329
330 if (newSelection != this && isMyChild(newSelection) ) // redirect event 330 if (newSelection != this && isMyChild(newSelection) ) // redirect event
331 { 331 {
332 Environment->setFocus(newSelection); 332 Environment->setFocus(newSelection);
333 return true; 333 return true;
334 } 334 }
335 335
336 // hide the gui editor 336 // hide the gui editor
337 if (EditorWindow) 337 if (EditorWindow)
338 EditorWindow->setVisible(false); 338 EditorWindow->setVisible(false);
339 339
340 if (CurrentMode == EGUIEDM_SELECT) 340 if (CurrentMode == EGUIEDM_SELECT)
341 { 341 {
342 if (SelectedElement) 342 if (SelectedElement)
343 { 343 {
344 // start moving or dragging 344 // start moving or dragging
345 CurrentMode = getModeFromPos(p); 345 CurrentMode = getModeFromPos(p);
346 346
347 if (CurrentMode == EGUIEDM_MOVE) 347 if (CurrentMode == EGUIEDM_MOVE)
348 StartMovePos = SelectedElement->getAbsolutePosition().UpperLeftCorner; 348 StartMovePos = SelectedElement->getAbsolutePosition().UpperLeftCorner;
349 349
350 DragStart = p; 350 DragStart = p;
351 SelectedArea = SelectedElement->getAbsolutePosition(); 351 SelectedArea = SelectedElement->getAbsolutePosition();
352 } 352 }
353 353
354 if (CurrentMode < EGUIEDM_MOVE) 354 if (CurrentMode < EGUIEDM_MOVE)
355 { 355 {
356 // selecting an element... 356 // selecting an element...
357 MouseOverElement = getEditableElementFromPoint(Parent, p); 357 MouseOverElement = getEditableElementFromPoint(Parent, p);
358 358
359 if (MouseOverElement == Parent) 359 if (MouseOverElement == Parent)
360 MouseOverElement = 0; 360 MouseOverElement = 0;
361 361
362 setSelectedElement(MouseOverElement); 362 setSelectedElement(MouseOverElement);
363 } 363 }
364 } 364 }
365 365
366 break; 366 break;
367 } 367 }
368 case EMIE_RMOUSE_PRESSED_DOWN: 368 case EMIE_RMOUSE_PRESSED_DOWN:
369 if (CurrentMode == EGUIEDM_SELECT_NEW_PARENT || CurrentMode >= EGUIEDM_MOVE) 369 if (CurrentMode == EGUIEDM_SELECT_NEW_PARENT || CurrentMode >= EGUIEDM_MOVE)
370 { 370 {
371 // cancel dragging 371 // cancel dragging
372 CurrentMode = EGUIEDM_SELECT; 372 CurrentMode = EGUIEDM_SELECT;
373 } 373 }
374 else 374 else
375 { 375 {
376 DragStart = core::position2di(e.MouseInput.X,e.MouseInput.Y); 376 DragStart = core::position2di(e.MouseInput.X,e.MouseInput.Y);
377 // root menu 377 // root menu
378 IGUIContextMenu* mnu = Environment->addContextMenu( 378 IGUIContextMenu* mnu = Environment->addContextMenu(
379 core::rect<s32>(e.MouseInput.X, e.MouseInput.Y, e.MouseInput.Y+100, e.MouseInput.Y+100),this); 379 core::rect<s32>(e.MouseInput.X, e.MouseInput.Y, e.MouseInput.Y+100, e.MouseInput.Y+100),this);
380 mnu->addItem(L"File",-1,true,true); 380 mnu->addItem(L"File",-1,true,true);
381 mnu->addItem(L"Edit",-1,true,true); 381 mnu->addItem(L"Edit",-1,true,true);
382 mnu->addItem(L"View",-1,true,true); 382 mnu->addItem(L"View",-1,true,true);
383 mnu->addItem(SelectedElement ? L"Add child" : L"Add" ,-1,true,true); 383 mnu->addItem(SelectedElement ? L"Add child" : L"Add" ,-1,true,true);
384 384
385 // file menu 385 // file menu
386 IGUIContextMenu* sub = mnu->getSubMenu(0); 386 IGUIContextMenu* sub = mnu->getSubMenu(0);
387 IGUIContextMenu* sub2 =0; 387 IGUIContextMenu* sub2 =0;
388 388
389 sub->addItem(L"New", MenuCommandStart + EGUIEDMC_FILE_NEW ); 389 sub->addItem(L"New", MenuCommandStart + EGUIEDMC_FILE_NEW );
390 sub->addItem(L"Load...",MenuCommandStart + EGUIEDMC_FILE_LOAD); 390 sub->addItem(L"Load...",MenuCommandStart + EGUIEDMC_FILE_LOAD);
391 sub->addItem(L"Save...",MenuCommandStart + EGUIEDMC_FILE_SAVE); 391 sub->addItem(L"Save...",MenuCommandStart + EGUIEDMC_FILE_SAVE);
392 392
393 // edit menu 393 // edit menu
394 sub = mnu->getSubMenu(1); 394 sub = mnu->getSubMenu(1);
395 sub->addItem(L"Cut (ctrl+x)", MenuCommandStart + EGUIEDMC_CUT_ELEMENT, (SelectedElement != 0)); 395 sub->addItem(L"Cut (ctrl+x)", MenuCommandStart + EGUIEDMC_CUT_ELEMENT, (SelectedElement != 0));
396 sub->addItem(L"Copy (ctrl+c)", MenuCommandStart + EGUIEDMC_COPY_ELEMENT, (SelectedElement != 0)); 396 sub->addItem(L"Copy (ctrl+c)", MenuCommandStart + EGUIEDMC_COPY_ELEMENT, (SelectedElement != 0));
397 sub->addItem(L"Paste (ctrl+v)", MenuCommandStart + EGUIEDMC_PASTE_ELEMENT, 397 sub->addItem(L"Paste (ctrl+v)", MenuCommandStart + EGUIEDMC_PASTE_ELEMENT,
398 (core::stringc(Environment->getOSOperator()->getTextFromClipboard()) != "")); 398 (core::stringc(Environment->getOSOperator()->getTextFromClipboard()) != ""));
399 sub->addItem(L"Delete (del)", MenuCommandStart + EGUIEDMC_DELETE_ELEMENT, (SelectedElement != 0)); 399 sub->addItem(L"Delete (del)", MenuCommandStart + EGUIEDMC_DELETE_ELEMENT, (SelectedElement != 0));
400 sub->addSeparator(); 400 sub->addSeparator();
401 sub->addItem(L"Set parent", MenuCommandStart + EGUIEDMC_SET_PARENT, (SelectedElement != 0)); 401 sub->addItem(L"Set parent", MenuCommandStart + EGUIEDMC_SET_PARENT, (SelectedElement != 0));
402 sub->addItem(L"Bring to front", MenuCommandStart + EGUIEDMC_BRING_TO_FRONT, (SelectedElement != 0)); 402 sub->addItem(L"Bring to front", MenuCommandStart + EGUIEDMC_BRING_TO_FRONT, (SelectedElement != 0));
403 sub->addSeparator(); 403 sub->addSeparator();
404 sub->addItem(L"Save to XML...", MenuCommandStart + EGUIEDMC_SAVE_ELEMENT, (SelectedElement != 0)); 404 sub->addItem(L"Save to XML...", MenuCommandStart + EGUIEDMC_SAVE_ELEMENT, (SelectedElement != 0));
405 405
406 sub = mnu->getSubMenu(2); 406 sub = mnu->getSubMenu(2);
407 // view menu 407 // view menu
408 if (EditorWindow) 408 if (EditorWindow)
409 sub->addItem(EditorWindow->isVisible() ? L"Hide window" : L"Show window", MenuCommandStart + EGUIEDMC_TOGGLE_EDITOR); 409 sub->addItem(EditorWindow->isVisible() ? L"Hide window" : L"Show window", MenuCommandStart + EGUIEDMC_TOGGLE_EDITOR);
410 410
411 sub = mnu->getSubMenu(3); 411 sub = mnu->getSubMenu(3);
412 412
413 s32 i,j,c=0; 413 s32 i,j,c=0;
414 sub->addItem(L"Default factory",-1,true, true); 414 sub->addItem(L"Default factory",-1,true, true);
415 415
416 // add elements from each factory 416 // add elements from each factory
417 for (i=0; u32(i) < Environment->getRegisteredGUIElementFactoryCount(); ++i) 417 for (i=0; u32(i) < Environment->getRegisteredGUIElementFactoryCount(); ++i)
418 { 418 {
419 sub2 = sub->getSubMenu(i); 419 sub2 = sub->getSubMenu(i);
420 420
421 IGUIElementFactory *f = Environment->getGUIElementFactory(i); 421 IGUIElementFactory *f = Environment->getGUIElementFactory(i);
422 422
423 for (j=0; j< f->getCreatableGUIElementTypeCount(); ++j) 423 for (j=0; j< f->getCreatableGUIElementTypeCount(); ++j)
424 { 424 {
425 sub2->addItem(core::stringw(f->getCreateableGUIElementTypeName(j)).c_str(), MenuCommandStart + EGUIEDMC_COUNT + c); 425 sub2->addItem(core::stringw(f->getCreateableGUIElementTypeName(j)).c_str(), MenuCommandStart + EGUIEDMC_COUNT + c);
426 c++; 426 c++;
427 } 427 }
428 428
429 if (u32(i+1) < Environment->getRegisteredGUIElementFactoryCount()) 429 if (u32(i+1) < Environment->getRegisteredGUIElementFactoryCount())
430 { 430 {
431 core::stringw strFact; 431 core::stringw strFact;
432 strFact = L"Factory "; 432 strFact = L"Factory ";
433 strFact += i+1; 433 strFact += i+1;
434 sub->addItem(strFact.c_str(),-1, true, true); 434 sub->addItem(strFact.c_str(),-1, true, true);
435 } 435 }
436 } 436 }
437 sub->addSeparator(); 437 sub->addSeparator();
438 sub->addItem(L"From XML...", MenuCommandStart + EGUIEDMC_INSERT_XML); 438 sub->addItem(L"From XML...", MenuCommandStart + EGUIEDMC_INSERT_XML);
439 439
440 // set focus to menu 440 // set focus to menu
441 Environment->setFocus(mnu); 441 Environment->setFocus(mnu);
442 442
443 } 443 }
444 break; 444 break;
445 case EMIE_LMOUSE_LEFT_UP: 445 case EMIE_LMOUSE_LEFT_UP:
446 446
447 // make window visible again 447 // make window visible again
448 if (EditorWindow) 448 if (EditorWindow)
449 EditorWindow->setVisible(true); 449 EditorWindow->setVisible(true);
450 if (CurrentMode == EGUIEDM_SELECT_NEW_PARENT) 450 if (CurrentMode == EGUIEDM_SELECT_NEW_PARENT)
451 { 451 {
452 if (SelectedElement) 452 if (SelectedElement)
453 { 453 {
454 MouseOverElement = getEditableElementFromPoint(Parent, 454 MouseOverElement = getEditableElementFromPoint(Parent,
455 core::position2di(e.MouseInput.X,e.MouseInput.Y)); 455 core::position2di(e.MouseInput.X,e.MouseInput.Y));
456 if (MouseOverElement) 456 if (MouseOverElement)
457 { 457 {
458 MouseOverElement->addChild(SelectedElement); 458 MouseOverElement->addChild(SelectedElement);
459 setSelectedElement(0); 459 setSelectedElement(0);
460 setSelectedElement(SelectedElement); 460 setSelectedElement(SelectedElement);
461 } 461 }
462 } 462 }
463 CurrentMode = EGUIEDM_SELECT; 463 CurrentMode = EGUIEDM_SELECT;
464 } 464 }
465 else if (CurrentMode >= EGUIEDM_MOVE) 465 else if (CurrentMode >= EGUIEDM_MOVE)
466 { 466 {
467 IGUIElement *sel = SelectedElement; 467 IGUIElement *sel = SelectedElement;
468 // unselect 468 // unselect
469 setSelectedElement(0); 469 setSelectedElement(0);
470 470
471 // move 471 // move
472 core::position2d<s32> p(0,0); 472 core::position2d<s32> p(0,0);
473 if (sel->getParent()) 473 if (sel->getParent())
474 p = sel->getParent()->getAbsolutePosition().UpperLeftCorner; 474 p = sel->getParent()->getAbsolutePosition().UpperLeftCorner;
475 475
476 sel->setRelativePosition(SelectedArea - p); 476 sel->setRelativePosition(SelectedArea - p);
477 477
478 // select 478 // select
479 setSelectedElement(sel); 479 setSelectedElement(sel);
480 480
481 // reset selection mode... 481 // reset selection mode...
482 CurrentMode = EGUIEDM_SELECT; 482 CurrentMode = EGUIEDM_SELECT;
483 } 483 }
484 break; 484 break;
485 case EMIE_MOUSE_MOVED: 485 case EMIE_MOUSE_MOVED:
486 // always on top 486 // always on top
487 Parent->bringToFront(this); 487 Parent->bringToFront(this);
488 488
489 // if selecting 489 // if selecting
490 if (CurrentMode == EGUIEDM_SELECT || CurrentMode == EGUIEDM_SELECT_NEW_PARENT) 490 if (CurrentMode == EGUIEDM_SELECT || CurrentMode == EGUIEDM_SELECT_NEW_PARENT)
491 { 491 {
492 492
493 core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); 493 core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y);
494 494
495 // highlight the element that the mouse is over 495 // highlight the element that the mouse is over
496 MouseOverElement = getEditableElementFromPoint(Parent, p); 496 MouseOverElement = getEditableElementFromPoint(Parent, p);
497 if (MouseOverElement == Parent) 497 if (MouseOverElement == Parent)
498 { 498 {
499 MouseOverElement = 0; 499 MouseOverElement = 0;
500 } 500 }
501 501
502 if (CurrentMode == EGUIEDM_SELECT) 502 if (CurrentMode == EGUIEDM_SELECT)
503 { 503 {
504 MouseOverMode = getModeFromPos(p); 504 MouseOverMode = getModeFromPos(p);
505 if (MouseOverMode > EGUIEDM_MOVE) 505 if (MouseOverMode > EGUIEDM_MOVE)
506 { 506 {
507 MouseOverElement = SelectedElement; 507 MouseOverElement = SelectedElement;
508 } 508 }
509 } 509 }
510 } 510 }
511 else if (CurrentMode == EGUIEDM_MOVE) 511 else if (CurrentMode == EGUIEDM_MOVE)
512 { 512 {
513 // get difference 513 // get difference
514 core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); 514 core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y);
515 p -= DragStart; 515 p -= DragStart;
516 516
517 // apply to top corner 517 // apply to top corner
518 p = StartMovePos + p; 518 p = StartMovePos + p;
519 if (UseGrid) 519 if (UseGrid)
520 { 520 {
521 p.X = (p.X/GridSize.Width)*GridSize.Width; 521 p.X = (p.X/GridSize.Width)*GridSize.Width;
522 p.Y = (p.Y/GridSize.Height)*GridSize.Height; 522 p.Y = (p.Y/GridSize.Height)*GridSize.Height;
523 } 523 }
524 524
525 SelectedArea += p - SelectedArea.UpperLeftCorner; 525 SelectedArea += p - SelectedArea.UpperLeftCorner;
526 } 526 }
527 else if (CurrentMode > EGUIEDM_MOVE) 527 else if (CurrentMode > EGUIEDM_MOVE)
528 { 528 {
529 // get difference from start position 529 // get difference from start position
530 core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); 530 core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y);
531 if (UseGrid) 531 if (UseGrid)
532 { 532 {
533 p.X = (p.X/GridSize.Width)*GridSize.Width; 533 p.X = (p.X/GridSize.Width)*GridSize.Width;
534 p.Y = (p.Y/GridSize.Height)*GridSize.Height; 534 p.Y = (p.Y/GridSize.Height)*GridSize.Height;
535 } 535 }
536 536
537 switch(CurrentMode) 537 switch(CurrentMode)
538 { 538 {
539 case EGUIEDM_RESIZE_T: 539 case EGUIEDM_RESIZE_T:
540 SelectedArea.UpperLeftCorner.Y = p.Y; 540 SelectedArea.UpperLeftCorner.Y = p.Y;
541 break; 541 break;
542 case EGUIEDM_RESIZE_B: 542 case EGUIEDM_RESIZE_B:
543 SelectedArea.LowerRightCorner.Y = p.Y; 543 SelectedArea.LowerRightCorner.Y = p.Y;
544 break; 544 break;
545 case EGUIEDM_RESIZE_L: 545 case EGUIEDM_RESIZE_L:
546 SelectedArea.UpperLeftCorner.X = p.X; 546 SelectedArea.UpperLeftCorner.X = p.X;
547 break; 547 break;
548 case EGUIEDM_RESIZE_R: 548 case EGUIEDM_RESIZE_R:
549 SelectedArea.LowerRightCorner.X = p.X; 549 SelectedArea.LowerRightCorner.X = p.X;
550 break; 550 break;
551 case EGUIEDM_RESIZE_TL: 551 case EGUIEDM_RESIZE_TL:
552 SelectedArea.UpperLeftCorner = p; 552 SelectedArea.UpperLeftCorner = p;
553 break; 553 break;
554 case EGUIEDM_RESIZE_TR: 554 case EGUIEDM_RESIZE_TR:
555 SelectedArea.UpperLeftCorner.Y = p.Y; 555 SelectedArea.UpperLeftCorner.Y = p.Y;
556 SelectedArea.LowerRightCorner.X = p.X; 556 SelectedArea.LowerRightCorner.X = p.X;
557 break; 557 break;
558 case EGUIEDM_RESIZE_BL: 558 case EGUIEDM_RESIZE_BL:
559 SelectedArea.UpperLeftCorner.X = p.X; 559 SelectedArea.UpperLeftCorner.X = p.X;
560 SelectedArea.LowerRightCorner.Y = p.Y; 560 SelectedArea.LowerRightCorner.Y = p.Y;
561 break; 561 break;
562 case EGUIEDM_RESIZE_BR: 562 case EGUIEDM_RESIZE_BR:
563 SelectedArea.LowerRightCorner = p; 563 SelectedArea.LowerRightCorner = p;
564 break; 564 break;
565 default: 565 default:
566 break; 566 break;
567 } 567 }
568 } 568 }
569 569
570 break; 570 break;
571 default: 571 default:
572 break; 572 break;
573 } 573 }
574 break; 574 break;
575 575
576 case EET_GUI_EVENT: 576 case EET_GUI_EVENT:
577 switch(e.GUIEvent.EventType) 577 switch(e.GUIEvent.EventType)
578 { 578 {
579 case EGET_TREEVIEW_NODE_SELECT: 579 case EGET_TREEVIEW_NODE_SELECT:
580 { 580 {
581 IGUITreeViewNode* eventnode = ((IGUITreeView*)e.GUIEvent.Caller)->getLastEventNode(); 581 IGUITreeViewNode* eventnode = ((IGUITreeView*)e.GUIEvent.Caller)->getLastEventNode();
582 if(!eventnode->isRoot()) 582 if(!eventnode->isRoot())
583 setSelectedElement((IGUIElement*)(eventnode->getData())); 583 setSelectedElement((IGUIElement*)(eventnode->getData()));
584 break; 584 break;
585 } 585 }
586 // load a gui file 586 // load a gui file
587 case EGET_FILE_SELECTED: 587 case EGET_FILE_SELECTED:
588 dialog = (IGUIFileOpenDialog*)e.GUIEvent.Caller; 588 dialog = (IGUIFileOpenDialog*)e.GUIEvent.Caller;
589 Environment->loadGUI(core::stringc(dialog->getFileName()).c_str()); 589 Environment->loadGUI(core::stringc(dialog->getFileName()).c_str());
590 break; 590 break;
591 591
592 case EGET_MENU_ITEM_SELECTED: 592 case EGET_MENU_ITEM_SELECTED:
593 { 593 {
594 IGUIContextMenu *menu = (IGUIContextMenu*)e.GUIEvent.Caller; 594 IGUIContextMenu *menu = (IGUIContextMenu*)e.GUIEvent.Caller;
595 s32 cmdID = menu->getItemCommandId(menu->getSelectedItem()) - MenuCommandStart; 595 s32 cmdID = menu->getItemCommandId(menu->getSelectedItem()) - MenuCommandStart;
596 596
597 IGUIElement* el; 597 IGUIElement* el;
598 598
599 switch(cmdID) 599 switch(cmdID)
600 { 600 {
601 601
602 //! file commands 602 //! file commands
603 case EGUIEDMC_FILE_NEW: 603 case EGUIEDMC_FILE_NEW:
604 // clear all elements belonging to our parent 604 // clear all elements belonging to our parent
605 setSelectedElement(0); 605 setSelectedElement(0);
606 MouseOverElement = 0; 606 MouseOverElement = 0;
607 el = Parent; 607 el = Parent;
608 grab(); 608 grab();
609 // remove all children 609 // remove all children
610 while(Children.end() != el->getChildren().begin()) 610 while(Children.end() != el->getChildren().begin())
611 el->removeChild(*(el->getChildren().begin())); 611 el->removeChild(*(el->getChildren().begin()));
612 // attach to parent again 612 // attach to parent again
613 el->addChild(this); 613 el->addChild(this);
614 drop(); 614 drop();
615 615
616 break; 616 break;
617 case EGUIEDMC_FILE_LOAD: 617 case EGUIEDMC_FILE_LOAD:
618 Environment->addFileOpenDialog(L"Please select a GUI file to open", false, this); 618 Environment->addFileOpenDialog(L"Please select a GUI file to open", false, this);
619 break; 619 break;
620 case EGUIEDMC_FILE_SAVE: 620 case EGUIEDMC_FILE_SAVE:
621 Environment->saveGUI("guiTest.xml"); 621 Environment->saveGUI("guiTest.xml");
622 break; 622 break;
623 623
624 //! edit menu 624 //! edit menu
625 case EGUIEDMC_CUT_ELEMENT: 625 case EGUIEDMC_CUT_ELEMENT:
626 { 626 {
627 CopySelectedElementXML(); 627 CopySelectedElementXML();
628 // delete element 628 // delete element
629 el = SelectedElement; 629 el = SelectedElement;
630 setSelectedElement(0); 630 setSelectedElement(0);
631 MouseOverElement = 0; 631 MouseOverElement = 0;
632 el->remove(); 632 el->remove();
633 break; 633 break;
634 } 634 }
635 case EGUIEDMC_COPY_ELEMENT: 635 case EGUIEDMC_COPY_ELEMENT:
636 CopySelectedElementXML(); 636 CopySelectedElementXML();
637 break; 637 break;
638 case EGUIEDMC_PASTE_ELEMENT: 638 case EGUIEDMC_PASTE_ELEMENT:
639 PasteXMLToSelectedElement(); 639 PasteXMLToSelectedElement();
640 break; 640 break;
641 case EGUIEDMC_DELETE_ELEMENT: 641 case EGUIEDMC_DELETE_ELEMENT:
642 el = SelectedElement; 642 el = SelectedElement;
643 setSelectedElement(0); 643 setSelectedElement(0);
644 MouseOverElement = 0; 644 MouseOverElement = 0;
645 el->remove(); 645 el->remove();
646 break; 646 break;
647 case EGUIEDMC_SET_PARENT: 647 case EGUIEDMC_SET_PARENT:
648 CurrentMode = EGUIEDM_SELECT_NEW_PARENT; 648 CurrentMode = EGUIEDM_SELECT_NEW_PARENT;
649 break; 649 break;
650 case EGUIEDMC_BRING_TO_FRONT: 650 case EGUIEDMC_BRING_TO_FRONT:
651 if (SelectedElement->getParent()) 651 if (SelectedElement->getParent())
652 SelectedElement->getParent()->bringToFront(SelectedElement); 652 SelectedElement->getParent()->bringToFront(SelectedElement);
653 break; 653 break;
654 654
655 case EGUIEDMC_SAVE_ELEMENT: 655 case EGUIEDMC_SAVE_ELEMENT:
656 //TODO: add 'save' dialog. 656 //TODO: add 'save' dialog.
657 Environment->saveGUI("guiTest.xml", SelectedElement ? SelectedElement : Environment->getRootGUIElement() ); 657 Environment->saveGUI("guiTest.xml", SelectedElement ? SelectedElement : Environment->getRootGUIElement() );
658 break; 658 break;
659 659
660 //! toggle edit window 660 //! toggle edit window
661 case EGUIEDMC_TOGGLE_EDITOR: 661 case EGUIEDMC_TOGGLE_EDITOR:
662 break; 662 break;
663 663
664 case EGUIEDMC_INSERT_XML: 664 case EGUIEDMC_INSERT_XML:
665 Environment->loadGUI("guiTest.xml", SelectedElement ? SelectedElement : Environment->getRootGUIElement() ); 665 Environment->loadGUI("guiTest.xml", SelectedElement ? SelectedElement : Environment->getRootGUIElement() );
666 break; 666 break;
667 667
668 default: 668 default:
669 // create element from factory? 669 // create element from factory?
670 if (cmdID >= EGUIEDMC_COUNT) 670 if (cmdID >= EGUIEDMC_COUNT)
671 { 671 {
672 672
673 s32 num = cmdID - EGUIEDMC_COUNT; // get index 673 s32 num = cmdID - EGUIEDMC_COUNT; // get index
674 // loop through all factories 674 // loop through all factories
675 s32 i, c=Environment->getRegisteredGUIElementFactoryCount(); 675 s32 i, c=Environment->getRegisteredGUIElementFactoryCount();
676 for (i=0; i<c && num > Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount(); ++i) 676 for (i=0; i<c && num > Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount(); ++i)
677 { 677 {
678 num -= Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount(); 678 num -= Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount();
679 } 679 }
680 if (num < Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount() ) 680 if (num < Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount() )
681 { 681 {
682 core::stringc name = Environment->getGUIElementFactory(i)->getCreateableGUIElementTypeName(num); 682 core::stringc name = Environment->getGUIElementFactory(i)->getCreateableGUIElementTypeName(num);
683 IGUIElement *parentElement = SelectedElement ? SelectedElement : Environment->getRootGUIElement(); 683 IGUIElement *parentElement = SelectedElement ? SelectedElement : Environment->getRootGUIElement();
684 // add it 684 // add it
685 IGUIElement *newElement = Environment->getGUIElementFactory(i)->addGUIElement(name.c_str(),parentElement); 685 IGUIElement *newElement = Environment->getGUIElementFactory(i)->addGUIElement(name.c_str(),parentElement);
686 if (newElement) 686 if (newElement)
687 { 687 {
688 core::position2di p = DragStart - parentElement->getAbsolutePosition().UpperLeftCorner; 688 core::position2di p = DragStart - parentElement->getAbsolutePosition().UpperLeftCorner;
689 newElement->setRelativePosition(core::rect<s32>(p,p+core::position2di(100,100))); 689 newElement->setRelativePosition(core::rect<s32>(p,p+core::position2di(100,100)));
690 //Environment->removeFocus(newElement); 690 //Environment->removeFocus(newElement);
691 } 691 }
692 } 692 }
693 } 693 }
694 break; 694 break;
695 } 695 }
696 EditorWindow->updateTree(); 696 EditorWindow->updateTree();
697 } 697 }
698 return true; 698 return true;
699 default: 699 default:
700 break; 700 break;
701 } 701 }
702 break; 702 break;
703 703
704 default: 704 default:
705 break; 705 break;
706 } 706 }
707 707
708 // even if we didn't absorb the event, 708 // even if we didn't absorb the event,
709 // we never pass events back to the GUI we're editing! 709 // we never pass events back to the GUI we're editing!
710 return false; 710 return false;
711} 711}
712 712
713 713
714//! draws the element and its children 714//! draws the element and its children
715void CGUIEditWorkspace::draw() 715void CGUIEditWorkspace::draw()
716{ 716{
717 video::IVideoDriver *driver = Environment->getVideoDriver(); 717 video::IVideoDriver *driver = Environment->getVideoDriver();
718 718
719 if (DrawGrid) 719 if (DrawGrid)
720 { 720 {
721 // draw the grid 721 // draw the grid
722 722
723 core::rect<s32> r = getAbsolutePosition(); 723 core::rect<s32> r = getAbsolutePosition();
724 724
725 s32 cy = r.UpperLeftCorner.Y; 725 s32 cy = r.UpperLeftCorner.Y;
726 while (cy < r.LowerRightCorner.Y) 726 while (cy < r.LowerRightCorner.Y)
727 { 727 {
728 s32 cx = r.UpperLeftCorner.X; 728 s32 cx = r.UpperLeftCorner.X;
729 while (cx < r.LowerRightCorner.X) 729 while (cx < r.LowerRightCorner.X)
730 { 730 {
731 driver->draw2DRectangle(video::SColor(40,0,0,90),core::rect<s32>(cx+1,cy+1,GridSize.Width+cx,GridSize.Height+cy)); 731 driver->draw2DRectangle(video::SColor(40,0,0,90),core::rect<s32>(cx+1,cy+1,GridSize.Width+cx,GridSize.Height+cy));
732 cx += GridSize.Width; 732 cx += GridSize.Width;
733 } 733 }
734 cy += GridSize.Height; 734 cy += GridSize.Height;
735 } 735 }
736 } 736 }
737 if (MouseOverElement && 737 if (MouseOverElement &&
738 MouseOverElement != SelectedElement && 738 MouseOverElement != SelectedElement &&
739 MouseOverElement != Parent) 739 MouseOverElement != Parent)
740 { 740 {
741 core::rect<s32> r = MouseOverElement->getAbsolutePosition(); 741 core::rect<s32> r = MouseOverElement->getAbsolutePosition();
742 driver->draw2DRectangle(video::SColor(100,0,0,255), r); 742 driver->draw2DRectangle(video::SColor(100,0,0,255), r);
743 } 743 }
744 if (SelectedElement && CurrentMode == EGUIEDM_SELECT) 744 if (SelectedElement && CurrentMode == EGUIEDM_SELECT)
745 { 745 {
746 driver->draw2DRectangle(video::SColor(100,0,255,0),SelectedElement->getAbsolutePosition()); 746 driver->draw2DRectangle(video::SColor(100,0,255,0),SelectedElement->getAbsolutePosition());
747 } 747 }
748 if (CurrentMode >= EGUIEDM_MOVE) 748 if (CurrentMode >= EGUIEDM_MOVE)
749 { 749 {
750 driver->draw2DRectangle(video::SColor(100,255,0,0),SelectedArea); 750 driver->draw2DRectangle(video::SColor(100,255,0,0),SelectedArea);
751 } 751 }
752 752
753 if ( (SelectedElement && CurrentMode >= EGUIEDM_MOVE) || 753 if ( (SelectedElement && CurrentMode >= EGUIEDM_MOVE) ||
754 (SelectedElement && MouseOverElement == SelectedElement && MouseOverMode >= EGUIEDM_MOVE) ) 754 (SelectedElement && MouseOverElement == SelectedElement && MouseOverMode >= EGUIEDM_MOVE) )
755 { 755 {
756 // draw handles for moving 756 // draw handles for moving
757 EGUIEDIT_MODE m = CurrentMode; 757 EGUIEDIT_MODE m = CurrentMode;
758 core::rect<s32> r = SelectedArea; 758 core::rect<s32> r = SelectedArea;
759 if (m < EGUIEDM_MOVE) 759 if (m < EGUIEDM_MOVE)
760 { 760 {
761 m = MouseOverMode; 761 m = MouseOverMode;
762 r = SelectedElement->getAbsolutePosition(); 762 r = SelectedElement->getAbsolutePosition();
763 } 763 }
764 764
765 core::position2di d = core::position2di(4,4); 765 core::position2di d = core::position2di(4,4);
766 766
767 TLRect = core::rect<s32>(r.UpperLeftCorner, r.UpperLeftCorner + d ); 767 TLRect = core::rect<s32>(r.UpperLeftCorner, r.UpperLeftCorner + d );
768 TRRect = core::rect<s32>(r.LowerRightCorner.X-4, r.UpperLeftCorner.Y, r.LowerRightCorner.X, r.UpperLeftCorner.Y+4); 768 TRRect = core::rect<s32>(r.LowerRightCorner.X-4, r.UpperLeftCorner.Y, r.LowerRightCorner.X, r.UpperLeftCorner.Y+4);
769 TopRect = core::rect<s32>(r.getCenter().X-2, r.UpperLeftCorner.Y,r.getCenter().X+2, r.UpperLeftCorner.Y+4 ); 769 TopRect = core::rect<s32>(r.getCenter().X-2, r.UpperLeftCorner.Y,r.getCenter().X+2, r.UpperLeftCorner.Y+4 );
770 BLRect = core::rect<s32>(r.UpperLeftCorner.X, r.LowerRightCorner.Y-4, r.UpperLeftCorner.X+4, r.LowerRightCorner.Y); 770 BLRect = core::rect<s32>(r.UpperLeftCorner.X, r.LowerRightCorner.Y-4, r.UpperLeftCorner.X+4, r.LowerRightCorner.Y);
771 LRect = core::rect<s32>(r.UpperLeftCorner.X,r.getCenter().Y-2, r.UpperLeftCorner.X+4, r.getCenter().Y+2 ); 771 LRect = core::rect<s32>(r.UpperLeftCorner.X,r.getCenter().Y-2, r.UpperLeftCorner.X+4, r.getCenter().Y+2 );
772 RRect = core::rect<s32>(r.LowerRightCorner.X-4,r.getCenter().Y-2, r.LowerRightCorner.X, r.getCenter().Y+2 ); 772 RRect = core::rect<s32>(r.LowerRightCorner.X-4,r.getCenter().Y-2, r.LowerRightCorner.X, r.getCenter().Y+2 );
773 BRRect = core::rect<s32>(r.LowerRightCorner-d, r.LowerRightCorner); 773 BRRect = core::rect<s32>(r.LowerRightCorner-d, r.LowerRightCorner);
774 BRect = core::rect<s32>(r.getCenter().X-2, r.LowerRightCorner.Y-4,r.getCenter().X+2, r.LowerRightCorner.Y ); 774 BRect = core::rect<s32>(r.getCenter().X-2, r.LowerRightCorner.Y-4,r.getCenter().X+2, r.LowerRightCorner.Y );
775 775
776 // top left 776 // top left
777 if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_RESIZE_L || m == EGUIEDM_RESIZE_TL || m == EGUIEDM_MOVE ) 777 if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_RESIZE_L || m == EGUIEDM_RESIZE_TL || m == EGUIEDM_MOVE )
778 driver->draw2DRectangle(video::SColor(100,255,255,255), TLRect); 778 driver->draw2DRectangle(video::SColor(100,255,255,255), TLRect);
779 779
780 if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_RESIZE_R || m == EGUIEDM_RESIZE_TR || m == EGUIEDM_MOVE ) 780 if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_RESIZE_R || m == EGUIEDM_RESIZE_TR || m == EGUIEDM_MOVE )
781 driver->draw2DRectangle(video::SColor(100,255,255,255), TRRect); 781 driver->draw2DRectangle(video::SColor(100,255,255,255), TRRect);
782 782
783 if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_MOVE ) 783 if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_MOVE )
784 driver->draw2DRectangle(video::SColor(100,255,255,255), TopRect); 784 driver->draw2DRectangle(video::SColor(100,255,255,255), TopRect);
785 785
786 if (m == EGUIEDM_RESIZE_L || m == EGUIEDM_RESIZE_BL || m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) 786 if (m == EGUIEDM_RESIZE_L || m == EGUIEDM_RESIZE_BL || m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE )
787 driver->draw2DRectangle(video::SColor(100,255,255,255), BLRect); 787 driver->draw2DRectangle(video::SColor(100,255,255,255), BLRect);
788 788
789 if (m == EGUIEDM_RESIZE_L || m == EGUIEDM_MOVE ) 789 if (m == EGUIEDM_RESIZE_L || m == EGUIEDM_MOVE )
790 driver->draw2DRectangle(video::SColor(100,255,255,255), LRect); 790 driver->draw2DRectangle(video::SColor(100,255,255,255), LRect);
791 791
792 if (m == EGUIEDM_RESIZE_R || m == EGUIEDM_MOVE ) 792 if (m == EGUIEDM_RESIZE_R || m == EGUIEDM_MOVE )
793 driver->draw2DRectangle(video::SColor(100,255,255,255), RRect); 793 driver->draw2DRectangle(video::SColor(100,255,255,255), RRect);
794 794
795 if (m == EGUIEDM_RESIZE_R || m == EGUIEDM_RESIZE_BR || m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) 795 if (m == EGUIEDM_RESIZE_R || m == EGUIEDM_RESIZE_BR || m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE )
796 driver->draw2DRectangle(video::SColor(100,255,255,255), BRRect ); 796 driver->draw2DRectangle(video::SColor(100,255,255,255), BRRect );
797 797
798 if (m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) 798 if (m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE )
799 driver->draw2DRectangle(video::SColor(100,255,255,255), BRect); 799 driver->draw2DRectangle(video::SColor(100,255,255,255), BRect);
800 800
801 801
802 } 802 }
803 803
804 IGUIElement::draw(); 804 IGUIElement::draw();
805} 805}
806 806
807 807
808void CGUIEditWorkspace::setDrawGrid(bool drawGrid) 808void CGUIEditWorkspace::setDrawGrid(bool drawGrid)
809{ 809{
810 DrawGrid = drawGrid; 810 DrawGrid = drawGrid;
811} 811}
812 812
813void CGUIEditWorkspace::setGridSize(const core::dimension2di& gridSize) 813void CGUIEditWorkspace::setGridSize(const core::dimension2di& gridSize)
814{ 814{
815 GridSize = gridSize; 815 GridSize = gridSize;
816 if (GridSize.Width < 2) 816 if (GridSize.Width < 2)
817 GridSize.Width = 2; 817 GridSize.Width = 2;
818 if (GridSize.Height < 2) 818 if (GridSize.Height < 2)
819 GridSize.Height = 2; 819 GridSize.Height = 2;
820} 820}
821 821
822void CGUIEditWorkspace::setUseGrid(bool useGrid) 822void CGUIEditWorkspace::setUseGrid(bool useGrid)
823{ 823{
824 UseGrid = useGrid; 824 UseGrid = useGrid;
825} 825}
826 826
827 827
828//! Removes a child. 828//! Removes a child.
829void CGUIEditWorkspace::removeChild(IGUIElement* child) 829void CGUIEditWorkspace::removeChild(IGUIElement* child)
830{ 830{
831 IGUIElement::removeChild(child); 831 IGUIElement::removeChild(child);
832 832
833 if (Children.empty()) 833 if (Children.empty())
834 remove(); 834 remove();
835} 835}
836 836
837 837
838void CGUIEditWorkspace::updateAbsolutePosition() 838void CGUIEditWorkspace::updateAbsolutePosition()
839{ 839{
840 core::rect<s32> parentRect(0,0,0,0); 840 core::rect<s32> parentRect(0,0,0,0);
841 841
842 if (Parent) 842 if (Parent)
843 { 843 {
844 parentRect = Parent->getAbsolutePosition(); 844 parentRect = Parent->getAbsolutePosition();
845 RelativeRect.UpperLeftCorner.X = 0; 845 RelativeRect.UpperLeftCorner.X = 0;
846 RelativeRect.UpperLeftCorner.Y = 0; 846 RelativeRect.UpperLeftCorner.Y = 0;
847 RelativeRect.LowerRightCorner.X = parentRect.getWidth(); 847 RelativeRect.LowerRightCorner.X = parentRect.getWidth();
848 RelativeRect.LowerRightCorner.Y = parentRect.getHeight(); 848 RelativeRect.LowerRightCorner.Y = parentRect.getHeight();
849 } 849 }
850 850
851 IGUIElement::updateAbsolutePosition(); 851 IGUIElement::updateAbsolutePosition();
852} 852}
853 853
854void CGUIEditWorkspace::CopySelectedElementXML() 854void CGUIEditWorkspace::CopySelectedElementXML()
855{ 855{
856 core::stringc XMLText; 856 core::stringc XMLText;
857 core::stringw wXMLText; 857 core::stringw wXMLText;
858 // create memory write file 858 // create memory write file
859 io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#"); 859 io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#");
860 // save gui to mem file 860 // save gui to mem file
861 io::IXMLWriter* xml = Environment->getFileSystem()->createXMLWriter(memWrite); 861 io::IXMLWriter* xml = Environment->getFileSystem()->createXMLWriter(memWrite);
862 Environment->writeGUIElement(xml, SelectedElement); 862 Environment->writeGUIElement(xml, SelectedElement);
863 863
864 // copy to clipboard- wide chars not supported yet :( 864 // copy to clipboard- wide chars not supported yet :(
865 wXMLText = (wchar_t*)&memWrite->getData()[0]; 865 wXMLText = (wchar_t*)&memWrite->getData()[0];
866 u32 i = memWrite->getData().size()/sizeof(wchar_t); 866 u32 i = memWrite->getData().size()/sizeof(wchar_t);
867 if (wXMLText.size() > i) 867 if (wXMLText.size() > i)
868 wXMLText[i] = L'\0'; 868 wXMLText[i] = L'\0';
869 XMLText = wXMLText.c_str(); 869 XMLText = wXMLText.c_str();
870 memWrite->drop(); 870 memWrite->drop();
871 xml->drop(); 871 xml->drop();
872 Environment->getOSOperator()->copyToClipboard(XMLText.c_str()); 872 Environment->getOSOperator()->copyToClipboard(XMLText.c_str());
873} 873}
874 874
875void CGUIEditWorkspace::PasteXMLToSelectedElement() 875void CGUIEditWorkspace::PasteXMLToSelectedElement()
876{ 876{
877 // get clipboard data 877 // get clipboard data
878 core::stringc XMLText = Environment->getOSOperator()->getTextFromClipboard(); 878 core::stringc XMLText = Environment->getOSOperator()->getTextFromClipboard();
879 // convert to stringw 879 // convert to stringw
880 core::stringw wXMLText = XMLText.c_str(); 880 core::stringw wXMLText = XMLText.c_str();
881 881
882 io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#"); 882 io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#");
883 883
884 io::IXMLWriter* xmlw = Environment->getFileSystem()->createXMLWriter(memWrite); 884 io::IXMLWriter* xmlw = Environment->getFileSystem()->createXMLWriter(memWrite);
885 xmlw->writeXMLHeader(); // it needs one of those 885 xmlw->writeXMLHeader(); // it needs one of those
886 xmlw->drop(); 886 xmlw->drop();
887 887
888 // write clipboard data 888 // write clipboard data
889 memWrite->write((void*)&wXMLText[0], wXMLText.size() * sizeof(wchar_t)); 889 memWrite->write((void*)&wXMLText[0], wXMLText.size() * sizeof(wchar_t));
890 890
891 // rewind file 891 // rewind file
892 memWrite->seek(0, false); 892 memWrite->seek(0, false);
893 893
894 // read xml 894 // read xml
895 Environment->loadGUI(memWrite, SelectedElement); 895 Environment->loadGUI(memWrite, SelectedElement);
896 896
897 // reset focus 897 // reset focus
898 Environment->setFocus(this); 898 Environment->setFocus(this);
899 899
900 // drop the read file 900 // drop the read file
901 memWrite->drop(); 901 memWrite->drop();
902} 902}
903 903
904void CGUIEditWorkspace::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) 904void CGUIEditWorkspace::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options)
905{ 905{
906 out->addBool("DrawGrid", DrawGrid); 906 out->addBool("DrawGrid", DrawGrid);
907 out->addBool("UseGrid", UseGrid); 907 out->addBool("UseGrid", UseGrid);
908 out->addPosition2d("GridSize", core::position2di(GridSize.Width, GridSize.Height)); 908 out->addPosition2d("GridSize", core::position2di(GridSize.Width, GridSize.Height));
909 out->addInt("MenuCommandStart", MenuCommandStart); 909 out->addInt("MenuCommandStart", MenuCommandStart);
910} 910}
911 911
912void CGUIEditWorkspace::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) 912void CGUIEditWorkspace::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)
913{ 913{
914 setDrawGrid(in->getAttributeAsBool("DrawGrid")); 914 setDrawGrid(in->getAttributeAsBool("DrawGrid"));
915 setUseGrid(in->getAttributeAsBool("UseGrid")); 915 setUseGrid(in->getAttributeAsBool("UseGrid"));
916 916
917 core::position2di tmpp = in->getAttributeAsPosition2d("GridSize"); 917 core::position2di tmpp = in->getAttributeAsPosition2d("GridSize");
918 core::dimension2di tmpd(tmpp.X, tmpp.Y); 918 core::dimension2di tmpd(tmpp.X, tmpp.Y);
919 setGridSize(tmpd); 919 setGridSize(tmpd);
920 setMenuCommandIDStart(in->getAttributeAsInt("MenuCommandStart")); 920 setMenuCommandIDStart(in->getAttributeAsInt("MenuCommandStart"));
921} 921}
922 922
923 923
924} // end namespace gui 924} // end namespace gui
925} // end namespace irr 925} // end namespace irr
926 926
927 927
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.h
index 3f21258..c9ccd14 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.h
@@ -1,168 +1,168 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson 1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_GUIEDIT_WORKSPACE_H_INCLUDED__ 5#ifndef __C_GUIEDIT_WORKSPACE_H_INCLUDED__
6#define __C_GUIEDIT_WORKSPACE_H_INCLUDED__ 6#define __C_GUIEDIT_WORKSPACE_H_INCLUDED__
7 7
8#include "IGUIElement.h" 8#include "IGUIElement.h"
9#include "CGUIEditWindow.h" 9#include "CGUIEditWindow.h"
10#include "EGUIEditTypes.h" 10#include "EGUIEditTypes.h"
11 11
12namespace irr 12namespace irr
13{ 13{
14namespace gui 14namespace gui
15{ 15{
16 16
17 //! Adding the GUI Editor Workspace to an element allows you 17 //! Adding the GUI Editor Workspace to an element allows you
18 /** to create, edit, load and save any elements supported 18 /** to create, edit, load and save any elements supported
19 by any loaded factories. 19 by any loaded factories.
20 When you add it without a parent (to the root element) 20 When you add it without a parent (to the root element)
21 it will also allow you to edit, load and save settings in 21 it will also allow you to edit, load and save settings in
22 the current skin. 22 the current skin.
23 */ 23 */
24 24
25 // custom events 25 // custom events
26 enum EGUIEDIT_CUSTOM_EVENTS 26 enum EGUIEDIT_CUSTOM_EVENTS
27 { 27 {
28 EGUIEDCE_ATTRIB_EDITOR = MAKE_IRR_ID('g','A','t','t'), 28 EGUIEDCE_ATTRIB_EDITOR = MAKE_IRR_ID('g','A','t','t'),
29 EGUIEDCE_OPTION_EDITOR = MAKE_IRR_ID('g','O','p','t'), 29 EGUIEDCE_OPTION_EDITOR = MAKE_IRR_ID('g','O','p','t'),
30 EGUIEDCE_ENV_EDITOR = MAKE_IRR_ID('g','E','n','v') 30 EGUIEDCE_ENV_EDITOR = MAKE_IRR_ID('g','E','n','v')
31 }; 31 };
32 32
33 class CGUIEditWorkspace : public IGUIElement 33 class CGUIEditWorkspace : public IGUIElement
34 { 34 {
35 public: 35 public:
36 36
37 //! constructor 37 //! constructor
38 CGUIEditWorkspace(IGUIEnvironment* environment, s32 id=-1, IGUIElement *parent=0); 38 CGUIEditWorkspace(IGUIEnvironment* environment, s32 id=-1, IGUIElement *parent=0);
39 39
40 //! destructor 40 //! destructor
41 ~CGUIEditWorkspace(); 41 ~CGUIEditWorkspace();
42 42
43 //! called if an event happened. 43 //! called if an event happened.
44 virtual bool OnEvent(const SEvent &event); 44 virtual bool OnEvent(const SEvent &event);
45 45
46 //! Removes a child. 46 //! Removes a child.
47 virtual void removeChild(IGUIElement* child); 47 virtual void removeChild(IGUIElement* child);
48 48
49 //! draws the element and its children 49 //! draws the element and its children
50 virtual void draw(); 50 virtual void draw();
51 51
52 //! Updates the absolute position. 52 //! Updates the absolute position.
53 virtual void updateAbsolutePosition(); 53 virtual void updateAbsolutePosition();
54 54
55 //! Sets the menu command id's 55 //! Sets the menu command id's
56 /** The GUI editor defaults to command ID's from 0xED17 to 0xED17+EGUIEDMC_COUNT 56 /** The GUI editor defaults to command ID's from 0xED17 to 0xED17+EGUIEDMC_COUNT
57 In the rare case that these are already in use and you wish to use menus 57 In the rare case that these are already in use and you wish to use menus
58 while the editor is present you can set a new offset here. 58 while the editor is present you can set a new offset here.
59 */ 59 */
60 virtual void setMenuCommandIDStart(s32 id); 60 virtual void setMenuCommandIDStart(s32 id);
61 61
62 //! grid drawing... 62 //! grid drawing...
63 virtual void setDrawGrid(bool drawGrid); 63 virtual void setDrawGrid(bool drawGrid);
64 virtual void setGridSize(const core::dimension2di& gridSize); 64 virtual void setGridSize(const core::dimension2di& gridSize);
65 virtual void setUseGrid(bool useGrid); 65 virtual void setUseGrid(bool useGrid);
66 66
67 //! returns the first editable element under the mouse 67 //! returns the first editable element under the mouse
68 virtual IGUIElement* getEditableElementFromPoint(IGUIElement *start, const core::position2di &point, s32 index=0 ); 68 virtual IGUIElement* getEditableElementFromPoint(IGUIElement *start, const core::position2di &point, s32 index=0 );
69 69
70 //! selecting elements 70 //! selecting elements
71 virtual void setSelectedElement(IGUIElement *sel); 71 virtual void setSelectedElement(IGUIElement *sel);
72 virtual void selectNextSibling(); 72 virtual void selectNextSibling();
73 virtual void selectPreviousSibling(); 73 virtual void selectPreviousSibling();
74 74
75 //! returns the selected element 75 //! returns the selected element
76 virtual IGUIElement* getSelectedElement(); 76 virtual IGUIElement* getSelectedElement();
77 77
78 //! copies the xml of the selected element and all children to the clipboard 78 //! copies the xml of the selected element and all children to the clipboard
79 virtual void CopySelectedElementXML(); 79 virtual void CopySelectedElementXML();
80 80
81 //! copies the xml of the selected element and all children to the clipboard 81 //! copies the xml of the selected element and all children to the clipboard
82 virtual void PasteXMLToSelectedElement(); 82 virtual void PasteXMLToSelectedElement();
83 83
84 virtual const c8* getTypeName() const 84 virtual const c8* getTypeName() const
85 { 85 {
86 return GUIEditElementTypeNames[EGUIEDIT_GUIEDIT]; 86 return GUIEditElementTypeNames[EGUIEDIT_GUIEDIT];
87 } 87 }
88 88
89 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0); 89 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0);
90 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); 90 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
91 91
92 private: 92 private:
93 93
94 enum EGUIEDIT_MODE 94 enum EGUIEDIT_MODE
95 { 95 {
96 // when we are currently selecting an element 96 // when we are currently selecting an element
97 EGUIEDM_SELECT=0, 97 EGUIEDM_SELECT=0,
98 // selecting a new parent for the selected element 98 // selecting a new parent for the selected element
99 EGUIEDM_SELECT_NEW_PARENT, 99 EGUIEDM_SELECT_NEW_PARENT,
100 100
101 // moving the selected element 101 // moving the selected element
102 EGUIEDM_MOVE, 102 EGUIEDM_MOVE,
103 // resizing the selected element 103 // resizing the selected element
104 EGUIEDM_RESIZE_TL, 104 EGUIEDM_RESIZE_TL,
105 EGUIEDM_RESIZE_T, 105 EGUIEDM_RESIZE_T,
106 EGUIEDM_RESIZE_TR, 106 EGUIEDM_RESIZE_TR,
107 EGUIEDM_RESIZE_R, 107 EGUIEDM_RESIZE_R,
108 EGUIEDM_RESIZE_BR, 108 EGUIEDM_RESIZE_BR,
109 EGUIEDM_RESIZE_B, 109 EGUIEDM_RESIZE_B,
110 EGUIEDM_RESIZE_BL, 110 EGUIEDM_RESIZE_BL,
111 EGUIEDM_RESIZE_L 111 EGUIEDM_RESIZE_L
112 }; 112 };
113 113
114 enum EGUIEDIT_MENUCOMMANDS 114 enum EGUIEDIT_MENUCOMMANDS
115 { 115 {
116 //! file commands 116 //! file commands
117 EGUIEDMC_FILE_NEW, 117 EGUIEDMC_FILE_NEW,
118 EGUIEDMC_FILE_LOAD, 118 EGUIEDMC_FILE_LOAD,
119 EGUIEDMC_FILE_SAVE, 119 EGUIEDMC_FILE_SAVE,
120 //! edit menu 120 //! edit menu
121 EGUIEDMC_CUT_ELEMENT, 121 EGUIEDMC_CUT_ELEMENT,
122 EGUIEDMC_COPY_ELEMENT, 122 EGUIEDMC_COPY_ELEMENT,
123 EGUIEDMC_PASTE_ELEMENT, 123 EGUIEDMC_PASTE_ELEMENT,
124 EGUIEDMC_DELETE_ELEMENT, 124 EGUIEDMC_DELETE_ELEMENT,
125 EGUIEDMC_SET_PARENT, 125 EGUIEDMC_SET_PARENT,
126 EGUIEDMC_BRING_TO_FRONT, 126 EGUIEDMC_BRING_TO_FRONT,
127 EGUIEDMC_SAVE_ELEMENT, 127 EGUIEDMC_SAVE_ELEMENT,
128 //! grid 128 //! grid
129 EGUIEDMC_TOGGLE_EDITOR, 129 EGUIEDMC_TOGGLE_EDITOR,
130 130
131 EGUIEDMC_INSERT_XML, 131 EGUIEDMC_INSERT_XML,
132 132
133 //! number of menu options 133 //! number of menu options
134 EGUIEDMC_COUNT 134 EGUIEDMC_COUNT
135 }; 135 };
136 136
137 EGUIEDIT_MODE getModeFromPos(core::position2di p); 137 EGUIEDIT_MODE getModeFromPos(core::position2di p);
138 138
139 EGUIEDIT_MODE CurrentMode; 139 EGUIEDIT_MODE CurrentMode;
140 EGUIEDIT_MODE MouseOverMode; 140 EGUIEDIT_MODE MouseOverMode;
141 core::position2di DragStart; 141 core::position2di DragStart;
142 core::position2di StartMovePos; 142 core::position2di StartMovePos;
143 core::rect<s32> SelectedArea; 143 core::rect<s32> SelectedArea;
144 144
145 core::dimension2di GridSize; 145 core::dimension2di GridSize;
146 s32 MenuCommandStart; 146 s32 MenuCommandStart;
147 bool DrawGrid, UseGrid; 147 bool DrawGrid, UseGrid;
148 148
149 IGUIElement *MouseOverElement, 149 IGUIElement *MouseOverElement,
150 *SelectedElement; 150 *SelectedElement;
151 CGUIEditWindow *EditorWindow; 151 CGUIEditWindow *EditorWindow;
152 152
153 core::rect<s32> TLRect; 153 core::rect<s32> TLRect;
154 core::rect<s32> TRRect; 154 core::rect<s32> TRRect;
155 core::rect<s32> TopRect; 155 core::rect<s32> TopRect;
156 core::rect<s32> BLRect; 156 core::rect<s32> BLRect;
157 core::rect<s32> LRect; 157 core::rect<s32> LRect;
158 core::rect<s32> RRect; 158 core::rect<s32> RRect;
159 core::rect<s32> BRRect; 159 core::rect<s32> BRRect;
160 core::rect<s32> BRect; 160 core::rect<s32> BRect;
161 }; 161 };
162 162
163 163
164} // end namespace gui 164} // end namespace gui
165} // end namespace irr 165} // end namespace irr
166 166
167#endif 167#endif
168 168
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEnumAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEnumAttribute.h
index 9e3958d..31951e5 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEnumAttribute.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEnumAttribute.h
@@ -1,114 +1,114 @@
1#ifndef __C_GUI_ENUM_ATTRIBUTE_H_INCLUDED__ 1#ifndef __C_GUI_ENUM_ATTRIBUTE_H_INCLUDED__
2#define __C_GUI_ENUM_ATTRIBUTE_H_INCLUDED__ 2#define __C_GUI_ENUM_ATTRIBUTE_H_INCLUDED__
3 3
4#include "CGUIAttribute.h" 4#include "CGUIAttribute.h"
5#include "IGUIComboBox.h" 5#include "IGUIComboBox.h"
6#include "IGUIEditBox.h" 6#include "IGUIEditBox.h"
7#include "EGUIEditTypes.h" 7#include "EGUIEditTypes.h"
8 8
9namespace irr 9namespace irr
10{ 10{
11namespace gui 11namespace gui
12{ 12{
13 13
14 class CGUIEnumAttribute : public CGUIAttribute 14 class CGUIEnumAttribute : public CGUIAttribute
15 { 15 {
16 public: 16 public:
17 // 17 //
18 CGUIEnumAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : 18 CGUIEnumAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) :
19 CGUIAttribute(environment, parent, myParentID), 19 CGUIAttribute(environment, parent, myParentID),
20 AttribComboBox(0), AttribEditBox(0) 20 AttribComboBox(0), AttribEditBox(0)
21 { 21 {
22 22
23 } 23 }
24 24
25 virtual ~CGUIEnumAttribute() 25 virtual ~CGUIEnumAttribute()
26 { 26 {
27 if (AttribComboBox) 27 if (AttribComboBox)
28 AttribComboBox->drop(); 28 AttribComboBox->drop();
29 if (AttribEditBox) 29 if (AttribEditBox)
30 AttribEditBox->drop(); 30 AttribEditBox->drop();
31 } 31 }
32 32
33 // save the attribute and possibly post the event to its parent 33 // save the attribute and possibly post the event to its parent
34 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) 34 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex)
35 { 35 {
36 36
37 if (AttribComboBox) 37 if (AttribComboBox)
38 { 38 {
39 AttribComboBox->remove(); 39 AttribComboBox->remove();
40 AttribComboBox->drop(); 40 AttribComboBox->drop();
41 AttribComboBox = 0; 41 AttribComboBox = 0;
42 } 42 }
43 43
44 if (AttribEditBox) 44 if (AttribEditBox)
45 { 45 {
46 AttribEditBox->remove(); 46 AttribEditBox->remove();
47 AttribEditBox->drop(); 47 AttribEditBox->drop();
48 AttribEditBox = 0; 48 AttribEditBox = 0;
49 } 49 }
50 50
51 core::array<core::stringc> outLiterals; 51 core::array<core::stringc> outLiterals;
52 attribs->getAttributeEnumerationLiteralsOfEnumeration(attribIndex, outLiterals); 52 attribs->getAttributeEnumerationLiteralsOfEnumeration(attribIndex, outLiterals);
53 53
54 core::rect<s32> r = getAbsolutePosition(); 54 core::rect<s32> r = getAbsolutePosition();
55 core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, 55 core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10,
56 r.getWidth() - 5, 56 r.getWidth() - 5,
57 Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 20 ); 57 Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 20 );
58 58
59 if (outLiterals.size() > 0) 59 if (outLiterals.size() > 0)
60 { 60 {
61 AttribComboBox = Environment->addComboBox(r2, this, -1); 61 AttribComboBox = Environment->addComboBox(r2, this, -1);
62 for (u32 i=0; i<outLiterals.size(); ++i) 62 for (u32 i=0; i<outLiterals.size(); ++i)
63 AttribComboBox->addItem( core::stringw(outLiterals[i].c_str()).c_str()); 63 AttribComboBox->addItem( core::stringw(outLiterals[i].c_str()).c_str());
64 64
65 AttribComboBox->setSelected( attribs->getAttributeAsInt(attribIndex) ); 65 AttribComboBox->setSelected( attribs->getAttributeAsInt(attribIndex) );
66 66
67 AttribComboBox->grab(); 67 AttribComboBox->grab();
68 AttribComboBox->setSubElement(true); 68 AttribComboBox->setSubElement(true);
69 AttribComboBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 69 AttribComboBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
70 } 70 }
71 else 71 else
72 { 72 {
73 73
74 AttribEditBox = Environment->addEditBox( 74 AttribEditBox = Environment->addEditBox(
75 attribs->getAttributeAsStringW(attribIndex).c_str(), 75 attribs->getAttributeAsStringW(attribIndex).c_str(),
76 r2, true, this, -1); 76 r2, true, this, -1);
77 AttribEditBox->grab(); 77 AttribEditBox->grab();
78 AttribEditBox->setSubElement(true); 78 AttribEditBox->setSubElement(true);
79 AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 79 AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
80 } 80 }
81 81
82 CGUIAttribute::setAttrib(attribs, attribIndex); 82 CGUIAttribute::setAttrib(attribs, attribIndex);
83 } 83 }
84 84
85 //! save the attribute and possibly post the event to its parent 85 //! save the attribute and possibly post the event to its parent
86 virtual bool updateAttrib(bool sendEvent=true) 86 virtual bool updateAttrib(bool sendEvent=true)
87 { 87 {
88 if (!Attribs) 88 if (!Attribs)
89 return true; 89 return true;
90 90
91 if (AttribComboBox) 91 if (AttribComboBox)
92 Attribs->setAttribute(Index, AttribComboBox->getText()); 92 Attribs->setAttribute(Index, AttribComboBox->getText());
93 else if (AttribEditBox) 93 else if (AttribEditBox)
94 Attribs->setAttribute(Index, AttribEditBox->getText()); 94 Attribs->setAttribute(Index, AttribEditBox->getText());
95 95
96 return CGUIAttribute::updateAttrib(sendEvent); 96 return CGUIAttribute::updateAttrib(sendEvent);
97 } 97 }
98 98
99 //! Returns the type name of the gui element. 99 //! Returns the type name of the gui element.
100 virtual const c8* getTypeName() const 100 virtual const c8* getTypeName() const
101 { 101 {
102 return GUIEditElementTypeNames[EGUIEDIT_ENUMATTRIBUTE]; 102 return GUIEditElementTypeNames[EGUIEDIT_ENUMATTRIBUTE];
103 } 103 }
104 104
105 private: 105 private:
106 IGUIComboBox* AttribComboBox; 106 IGUIComboBox* AttribComboBox;
107 IGUIEditBox* AttribEditBox; 107 IGUIEditBox* AttribEditBox;
108 }; 108 };
109 109
110} // namespace gui 110} // namespace gui
111} // namespace irr 111} // namespace irr
112 112
113#endif 113#endif
114 114
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.cpp
index 4135b7a..0ef1f36 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.cpp
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.cpp
@@ -1,340 +1,340 @@
1// Copyright 2006-2012 Asger Feldthaus 1// Copyright 2006-2012 Asger Feldthaus
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5/* 5/*
6 Originally Klasker's but I've messed around with it lots - Gaz 6 Originally Klasker's but I've messed around with it lots - Gaz
7*/ 7*/
8 8
9#include "CGUIPanel.h" 9#include "CGUIPanel.h"
10#include "IGUIEnvironment.h" 10#include "IGUIEnvironment.h"
11#include "IGUIScrollBar.h" 11#include "IGUIScrollBar.h"
12#include "IGUITabControl.h" 12#include "IGUITabControl.h"
13#include "IVideoDriver.h" 13#include "IVideoDriver.h"
14 14
15const int SCROLL_BAR_SIZE = 16; // Scroll bars are 16 pixels wide 15const int SCROLL_BAR_SIZE = 16; // Scroll bars are 16 pixels wide
16const int BORDER_WIDTH = 2; 16const int BORDER_WIDTH = 2;
17 17
18namespace irr 18namespace irr
19{ 19{
20namespace gui 20namespace gui
21{ 21{
22 22
23CGUIPanel::CGUIPanel(IGUIEnvironment* environment, IGUIElement* parent, s32 id, const core::rect<s32>& rectangle, 23CGUIPanel::CGUIPanel(IGUIEnvironment* environment, IGUIElement* parent, s32 id, const core::rect<s32>& rectangle,
24 bool border, E_SCROLL_BAR_MODE vMode, E_SCROLL_BAR_MODE hMode) 24 bool border, E_SCROLL_BAR_MODE vMode, E_SCROLL_BAR_MODE hMode)
25 : IGUIElement(EGUIET_ELEMENT, environment, parent, id, rectangle), 25 : IGUIElement(EGUIET_ELEMENT, environment, parent, id, rectangle),
26 VScrollBar(0), HScrollBar(0), ClipPane(0), InnerPane(0), 26 VScrollBar(0), HScrollBar(0), ClipPane(0), InnerPane(0),
27 VScrollBarMode(vMode), HScrollBarMode(hMode), NeedsUpdate(true), Border(border) 27 VScrollBarMode(vMode), HScrollBarMode(hMode), NeedsUpdate(true), Border(border)
28{ 28{
29 #ifdef _DEBUG 29 #ifdef _DEBUG
30 setDebugName("CGUIPanel"); 30 setDebugName("CGUIPanel");
31 #endif 31 #endif
32 32
33 s32 width = rectangle.getWidth(); 33 s32 width = rectangle.getWidth();
34 s32 height = rectangle.getHeight(); 34 s32 height = rectangle.getHeight();
35 35
36 core::rect<s32> rct = core::rect<s32>(width - SCROLL_BAR_SIZE,0, width, height); 36 core::rect<s32> rct = core::rect<s32>(width - SCROLL_BAR_SIZE,0, width, height);
37 37
38 VScrollBar = environment->addScrollBar(false, rct, 0, id); 38 VScrollBar = environment->addScrollBar(false, rct, 0, id);
39 VScrollBar->setSubElement(true); 39 VScrollBar->setSubElement(true);
40 VScrollBar->setTabStop(false); 40 VScrollBar->setTabStop(false);
41 VScrollBar->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); 41 VScrollBar->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
42 VScrollBar->grab(); 42 VScrollBar->grab();
43 IGUIElement::addChild(VScrollBar); 43 IGUIElement::addChild(VScrollBar);
44 44
45 rct = core::rect<s32>(0, height - SCROLL_BAR_SIZE, width - SCROLL_BAR_SIZE,height ); 45 rct = core::rect<s32>(0, height - SCROLL_BAR_SIZE, width - SCROLL_BAR_SIZE,height );
46 46
47 HScrollBar = environment->addScrollBar(true, rct, 0, id); 47 HScrollBar = environment->addScrollBar(true, rct, 0, id);
48 HScrollBar->setSubElement(true); 48 HScrollBar->setSubElement(true);
49 HScrollBar->setTabStop(false); 49 HScrollBar->setTabStop(false);
50 HScrollBar->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); 50 HScrollBar->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT);
51 HScrollBar->grab(); 51 HScrollBar->grab();
52 IGUIElement::addChild(HScrollBar); 52 IGUIElement::addChild(HScrollBar);
53 53
54 rct = core::rect<s32>(0,0, width - SCROLL_BAR_SIZE, height - SCROLL_BAR_SIZE); 54 rct = core::rect<s32>(0,0, width - SCROLL_BAR_SIZE, height - SCROLL_BAR_SIZE);
55 55
56 ClipPane = environment->addTab( rct, 0, -1); 56 ClipPane = environment->addTab( rct, 0, -1);
57 ClipPane->setSubElement(true); 57 ClipPane->setSubElement(true);
58 ClipPane->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); 58 ClipPane->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
59 ClipPane->grab(); 59 ClipPane->grab();
60 IGUIElement::addChild(ClipPane); 60 IGUIElement::addChild(ClipPane);
61 61
62 InnerPane = environment->addTab(rct, ClipPane, -1); 62 InnerPane = environment->addTab(rct, ClipPane, -1);
63 InnerPane->setSubElement(true); 63 InnerPane->setSubElement(true);
64 InnerPane->grab(); 64 InnerPane->grab();
65 65
66 calculateClientArea(); 66 calculateClientArea();
67 resizeInnerPane(); 67 resizeInnerPane();
68} 68}
69 69
70CGUIPanel::~CGUIPanel() 70CGUIPanel::~CGUIPanel()
71{ 71{
72 // because the inner pane has the list of children, we need to remove the outer ones manually 72 // because the inner pane has the list of children, we need to remove the outer ones manually
73 IGUIElement::removeChild(VScrollBar); 73 IGUIElement::removeChild(VScrollBar);
74 IGUIElement::removeChild(HScrollBar); 74 IGUIElement::removeChild(HScrollBar);
75 IGUIElement::removeChild(ClipPane); 75 IGUIElement::removeChild(ClipPane);
76 76
77 // now we can drop the others 77 // now we can drop the others
78 VScrollBar->drop(); 78 VScrollBar->drop();
79 HScrollBar->drop(); 79 HScrollBar->drop();
80 ClipPane->drop(); 80 ClipPane->drop();
81 InnerPane->drop(); 81 InnerPane->drop();
82} 82}
83 83
84 84
85void CGUIPanel::draw() 85void CGUIPanel::draw()
86{ 86{
87 if (NeedsUpdate) 87 if (NeedsUpdate)
88 { 88 {
89 calculateClientArea(); 89 calculateClientArea();
90 resizeInnerPane(); 90 resizeInnerPane();
91 NeedsUpdate = false; 91 NeedsUpdate = false;
92 } 92 }
93 93
94 IGUISkin* skin = Environment->getSkin(); 94 IGUISkin* skin = Environment->getSkin();
95 if (Border && skin) 95 if (Border && skin)
96 { 96 {
97 skin->draw3DSunkenPane( this, skin->getColor( EGDC_APP_WORKSPACE), false, true, AbsoluteRect, &AbsoluteClippingRect ); 97 skin->draw3DSunkenPane( this, skin->getColor( EGDC_APP_WORKSPACE), false, true, AbsoluteRect, &AbsoluteClippingRect );
98 } 98 }
99 99
100 IGUIElement::draw(); 100 IGUIElement::draw();
101} 101}
102 102
103void CGUIPanel::addChild(IGUIElement *child) 103void CGUIPanel::addChild(IGUIElement *child)
104{ 104{
105 // add the child to the inner pane 105 // add the child to the inner pane
106 InnerPane->addChild(child); 106 InnerPane->addChild(child);
107 107
108 NeedsUpdate = true; 108 NeedsUpdate = true;
109} 109}
110 110
111void CGUIPanel::removeChild(IGUIElement *child) 111void CGUIPanel::removeChild(IGUIElement *child)
112{ 112{
113 InnerPane->removeChild(child); 113 InnerPane->removeChild(child);
114 114
115 NeedsUpdate = true; 115 NeedsUpdate = true;
116} 116}
117 117
118//! returns children of the inner pane 118//! returns children of the inner pane
119const core::list<IGUIElement*>& CGUIPanel::getChildren() 119const core::list<IGUIElement*>& CGUIPanel::getChildren()
120{ 120{
121 return InnerPane->getChildren(); 121 return InnerPane->getChildren();
122} 122}
123 123
124bool CGUIPanel::hasBorder() const 124bool CGUIPanel::hasBorder() const
125{ 125{
126 return Border; 126 return Border;
127} 127}
128 128
129void CGUIPanel::setBorder( bool enabled ) 129void CGUIPanel::setBorder( bool enabled )
130{ 130{
131 Border = enabled; 131 Border = enabled;
132} 132}
133 133
134IGUIScrollBar* CGUIPanel::getVScrollBar() const 134IGUIScrollBar* CGUIPanel::getVScrollBar() const
135{ 135{
136 return VScrollBar; 136 return VScrollBar;
137} 137}
138 138
139IGUIScrollBar* CGUIPanel::getHScrollBar() const 139IGUIScrollBar* CGUIPanel::getHScrollBar() const
140{ 140{
141 return HScrollBar; 141 return HScrollBar;
142} 142}
143 143
144E_SCROLL_BAR_MODE CGUIPanel::getVScrollBarMode() const 144E_SCROLL_BAR_MODE CGUIPanel::getVScrollBarMode() const
145{ 145{
146 return VScrollBarMode; 146 return VScrollBarMode;
147} 147}
148 148
149void CGUIPanel::setVScrollBarMode( E_SCROLL_BAR_MODE mode ) 149void CGUIPanel::setVScrollBarMode( E_SCROLL_BAR_MODE mode )
150{ 150{
151 VScrollBarMode = mode; 151 VScrollBarMode = mode;
152 NeedsUpdate = true; 152 NeedsUpdate = true;
153} 153}
154 154
155E_SCROLL_BAR_MODE CGUIPanel::getHScrollBarMode() const 155E_SCROLL_BAR_MODE CGUIPanel::getHScrollBarMode() const
156{ 156{
157 return HScrollBarMode; 157 return HScrollBarMode;
158} 158}
159 159
160void CGUIPanel::setHScrollBarMode(E_SCROLL_BAR_MODE mode) 160void CGUIPanel::setHScrollBarMode(E_SCROLL_BAR_MODE mode)
161{ 161{
162 HScrollBarMode = mode; 162 HScrollBarMode = mode;
163 NeedsUpdate = true; 163 NeedsUpdate = true;
164} 164}
165 165
166bool CGUIPanel::OnEvent(const SEvent &event) 166bool CGUIPanel::OnEvent(const SEvent &event)
167{ 167{
168 // Redirect mouse wheel to scrollbar 168 // Redirect mouse wheel to scrollbar
169 if (event.EventType == EET_MOUSE_INPUT_EVENT && event.MouseInput.Event == EMIE_MOUSE_WHEEL) 169 if (event.EventType == EET_MOUSE_INPUT_EVENT && event.MouseInput.Event == EMIE_MOUSE_WHEEL)
170 { 170 {
171 if (VScrollBar->isVisible()) 171 if (VScrollBar->isVisible())
172 { 172 {
173 Environment->setFocus(VScrollBar); 173 Environment->setFocus(VScrollBar);
174 VScrollBar->OnEvent(event); 174 VScrollBar->OnEvent(event);
175 return true; 175 return true;
176 } 176 }
177 else if (VScrollBar->isVisible()) 177 else if (VScrollBar->isVisible())
178 { 178 {
179 Environment->setFocus(HScrollBar); 179 Environment->setFocus(HScrollBar);
180 HScrollBar->OnEvent(event); 180 HScrollBar->OnEvent(event);
181 return true; 181 return true;
182 } 182 }
183 } 183 }
184 else 184 else
185 { 185 {
186 if (event.EventType == EET_GUI_EVENT && event.GUIEvent.EventType == EGET_SCROLL_BAR_CHANGED && 186 if (event.EventType == EET_GUI_EVENT && event.GUIEvent.EventType == EGET_SCROLL_BAR_CHANGED &&
187 (event.GUIEvent.Caller == HScrollBar || event.GUIEvent.Caller == VScrollBar) ) 187 (event.GUIEvent.Caller == HScrollBar || event.GUIEvent.Caller == VScrollBar) )
188 { 188 {
189 moveInnerPane(); 189 moveInnerPane();
190 190
191 return true; 191 return true;
192 } 192 }
193 } 193 }
194 194
195 return IGUIElement::OnEvent(event); 195 return IGUIElement::OnEvent(event);
196} 196}
197 197
198void CGUIPanel::moveInnerPane() 198void CGUIPanel::moveInnerPane()
199{ 199{
200 core::dimension2d<s32> dim = InnerPane->getAbsolutePosition().getSize(); 200 core::dimension2d<s32> dim = InnerPane->getAbsolutePosition().getSize();
201 core::position2d<s32> newpos(HScrollBar->isVisible() ? -HScrollBar->getPos() : 0 , VScrollBar->isVisible() ? -VScrollBar->getPos() : 0); 201 core::position2d<s32> newpos(HScrollBar->isVisible() ? -HScrollBar->getPos() : 0 , VScrollBar->isVisible() ? -VScrollBar->getPos() : 0);
202 core::rect<s32> r(newpos, newpos + dim); 202 core::rect<s32> r(newpos, newpos + dim);
203 InnerPane->setRelativePosition(r); 203 InnerPane->setRelativePosition(r);
204} 204}
205 205
206 206
207void CGUIPanel::updateAbsolutePosition() 207void CGUIPanel::updateAbsolutePosition()
208{ 208{
209 IGUIElement::updateAbsolutePosition(); 209 IGUIElement::updateAbsolutePosition();
210 calculateClientArea(); 210 calculateClientArea();
211 resizeInnerPane(); 211 resizeInnerPane();
212} 212}
213 213
214 214
215void CGUIPanel::resizeInnerPane() 215void CGUIPanel::resizeInnerPane()
216{ 216{
217 if (!HScrollBar || !VScrollBar || !InnerPane || !ClipPane) 217 if (!HScrollBar || !VScrollBar || !InnerPane || !ClipPane)
218 return; 218 return;
219 219
220 // get outer pane size 220 // get outer pane size
221 core::rect<s32> outerRect = ClipPane->getRelativePosition(); 221 core::rect<s32> outerRect = ClipPane->getRelativePosition();
222 222
223 // resize flexible children depending on outer pane 223 // resize flexible children depending on outer pane
224 InnerPane->setRelativePosition(outerRect); 224 InnerPane->setRelativePosition(outerRect);
225 225
226 // get desired size (total size of all children) 226 // get desired size (total size of all children)
227 core::rect<s32> totalRect(0, 0, 0, 0); 227 core::rect<s32> totalRect(0, 0, 0, 0);
228 228
229 core::list<IGUIElement*>::ConstIterator it; 229 core::list<IGUIElement*>::ConstIterator it;
230 230
231 for (it = InnerPane->getChildren().begin(); 231 for (it = InnerPane->getChildren().begin();
232 it != InnerPane->getChildren().end(); ++it) 232 it != InnerPane->getChildren().end(); ++it)
233 { 233 {
234 core::rect<s32> rct = (*it)->getRelativePosition(); 234 core::rect<s32> rct = (*it)->getRelativePosition();
235 totalRect.addInternalPoint(rct.UpperLeftCorner); 235 totalRect.addInternalPoint(rct.UpperLeftCorner);
236 totalRect.addInternalPoint(rct.LowerRightCorner); 236 totalRect.addInternalPoint(rct.LowerRightCorner);
237 } 237 }
238 238
239 // move children if pane needs to grow 239 // move children if pane needs to grow
240 core::position2di adjustedMovement(0,0); 240 core::position2di adjustedMovement(0,0);
241 241
242 if (totalRect.UpperLeftCorner.X < 0) 242 if (totalRect.UpperLeftCorner.X < 0)
243 adjustedMovement.X = -totalRect.UpperLeftCorner.X; 243 adjustedMovement.X = -totalRect.UpperLeftCorner.X;
244 if (totalRect.UpperLeftCorner.Y < 0) 244 if (totalRect.UpperLeftCorner.Y < 0)
245 adjustedMovement.Y = -totalRect.UpperLeftCorner.Y; 245 adjustedMovement.Y = -totalRect.UpperLeftCorner.Y;
246 246
247 if (adjustedMovement.X > 0 || adjustedMovement.Y > 0) 247 if (adjustedMovement.X > 0 || adjustedMovement.Y > 0)
248 { 248 {
249 totalRect += adjustedMovement; 249 totalRect += adjustedMovement;
250 250
251 for (it = InnerPane->getChildren().begin(); 251 for (it = InnerPane->getChildren().begin();
252 it != InnerPane->getChildren().end(); ++it ) 252 it != InnerPane->getChildren().end(); ++it )
253 { 253 {
254 (*it)->move(adjustedMovement); 254 (*it)->move(adjustedMovement);
255 } 255 }
256 } 256 }
257 257
258 // make sure the inner pane is at least as big as the outer 258 // make sure the inner pane is at least as big as the outer
259 if (totalRect.getWidth() < outerRect.getWidth()) 259 if (totalRect.getWidth() < outerRect.getWidth())
260 { 260 {
261 totalRect.UpperLeftCorner.X = 0; 261 totalRect.UpperLeftCorner.X = 0;
262 totalRect.LowerRightCorner.X = outerRect.getWidth(); 262 totalRect.LowerRightCorner.X = outerRect.getWidth();
263 } 263 }
264 if (totalRect.getHeight() < outerRect.getHeight()) 264 if (totalRect.getHeight() < outerRect.getHeight())
265 { 265 {
266 totalRect.UpperLeftCorner.Y = 0; 266 totalRect.UpperLeftCorner.Y = 0;
267 totalRect.LowerRightCorner.Y = outerRect.getHeight(); 267 totalRect.LowerRightCorner.Y = outerRect.getHeight();
268 } 268 }
269 269
270 InnerPane->setRelativePosition(totalRect); 270 InnerPane->setRelativePosition(totalRect);
271 271
272 // scrollbars 272 // scrollbars
273 if ( HScrollBarMode != ESBM_ALWAYS_INVISIBLE && 273 if ( HScrollBarMode != ESBM_ALWAYS_INVISIBLE &&
274 (totalRect.getWidth() > outerRect.getWidth() || HScrollBarMode == ESBM_ALWAYS_VISIBLE) ) 274 (totalRect.getWidth() > outerRect.getWidth() || HScrollBarMode == ESBM_ALWAYS_VISIBLE) )
275 { 275 {
276 HScrollBar->setVisible(true); 276 HScrollBar->setVisible(true);
277 HScrollBar->setMax(totalRect.getWidth() - outerRect.getWidth()); 277 HScrollBar->setMax(totalRect.getWidth() - outerRect.getWidth());
278 bringToFront(HScrollBar); 278 bringToFront(HScrollBar);
279 } 279 }
280 else 280 else
281 HScrollBar->setVisible(false); 281 HScrollBar->setVisible(false);
282 282
283 if ( VScrollBarMode != ESBM_ALWAYS_INVISIBLE && 283 if ( VScrollBarMode != ESBM_ALWAYS_INVISIBLE &&
284 (totalRect.getHeight() > outerRect.getHeight() || VScrollBarMode == ESBM_ALWAYS_VISIBLE) ) 284 (totalRect.getHeight() > outerRect.getHeight() || VScrollBarMode == ESBM_ALWAYS_VISIBLE) )
285 { 285 {
286 VScrollBar->setVisible(true); 286 VScrollBar->setVisible(true);
287 VScrollBar->setMax(totalRect.getHeight() - outerRect.getHeight()); 287 VScrollBar->setMax(totalRect.getHeight() - outerRect.getHeight());
288 bringToFront(VScrollBar); 288 bringToFront(VScrollBar);
289 } 289 }
290 else 290 else
291 VScrollBar->setVisible(false); 291 VScrollBar->setVisible(false);
292 292
293 // move to adjust for scrollbar pos 293 // move to adjust for scrollbar pos
294 moveInnerPane(); 294 moveInnerPane();
295} 295}
296 296
297void CGUIPanel::calculateClientArea() 297void CGUIPanel::calculateClientArea()
298{ 298{
299 core::rect<s32> ClientArea(0,0, AbsoluteRect.getWidth(),AbsoluteRect.getHeight()); 299 core::rect<s32> ClientArea(0,0, AbsoluteRect.getWidth(),AbsoluteRect.getHeight());
300 300
301 if (VScrollBar->isVisible()) 301 if (VScrollBar->isVisible())
302 ClientArea.LowerRightCorner.X -= VScrollBar->getRelativePosition().getWidth(); 302 ClientArea.LowerRightCorner.X -= VScrollBar->getRelativePosition().getWidth();
303 303
304 if (HScrollBar->isVisible()) 304 if (HScrollBar->isVisible())
305 ClientArea.LowerRightCorner.Y -= HScrollBar->getRelativePosition().getHeight(); 305 ClientArea.LowerRightCorner.Y -= HScrollBar->getRelativePosition().getHeight();
306 306
307 if (Border) 307 if (Border)
308 { 308 {
309 ClientArea.UpperLeftCorner += core::position2d<s32>( BORDER_WIDTH, BORDER_WIDTH ); 309 ClientArea.UpperLeftCorner += core::position2d<s32>( BORDER_WIDTH, BORDER_WIDTH );
310 ClientArea.LowerRightCorner -= core::position2d<s32>( BORDER_WIDTH, BORDER_WIDTH ); 310 ClientArea.LowerRightCorner -= core::position2d<s32>( BORDER_WIDTH, BORDER_WIDTH );
311 } 311 }
312 312
313 ClipPane->setRelativePosition(ClientArea); 313 ClipPane->setRelativePosition(ClientArea);
314} 314}
315 315
316core::rect<s32> CGUIPanel::getClientArea() const 316core::rect<s32> CGUIPanel::getClientArea() const
317{ 317{
318 return ClipPane->getRelativePosition(); 318 return ClipPane->getRelativePosition();
319} 319}
320 320
321void CGUIPanel::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) 321void CGUIPanel::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options)
322{ 322{
323 IGUIElement::serializeAttributes(out, options); 323 IGUIElement::serializeAttributes(out, options);
324 324
325 out->addBool("border", Border); 325 out->addBool("border", Border);
326 out->addEnum("horizontalScrollBar", HScrollBarMode, GUIScrollBarModeNames ); 326 out->addEnum("horizontalScrollBar", HScrollBarMode, GUIScrollBarModeNames );
327 out->addEnum("verticalScrollBar", VScrollBarMode, GUIScrollBarModeNames ); 327 out->addEnum("verticalScrollBar", VScrollBarMode, GUIScrollBarModeNames );
328} 328}
329 329
330void CGUIPanel::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) 330void CGUIPanel::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)
331{ 331{
332 IGUIElement::deserializeAttributes(in, options); 332 IGUIElement::deserializeAttributes(in, options);
333 333
334 setBorder(in->getAttributeAsBool("border")); 334 setBorder(in->getAttributeAsBool("border"));
335 setHScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("horizontalScrollBar", GUIScrollBarModeNames)); 335 setHScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("horizontalScrollBar", GUIScrollBarModeNames));
336 setVScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("verticalScrollBar", GUIScrollBarModeNames)); 336 setVScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("verticalScrollBar", GUIScrollBarModeNames));
337} 337}
338 338
339} // namespace gui 339} // namespace gui
340} // namespace irr 340} // namespace irr
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h
index cb6f79a..87609c9 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h
@@ -1,128 +1,128 @@
1// Copyright 2006-2012 Asger Feldthaus 1// Copyright 2006-2012 Asger Feldthaus
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef _C_GUI_PANEL_H_ 5#ifndef _C_GUI_PANEL_H_
6#define _C_GUI_PANEL_H_ 6#define _C_GUI_PANEL_H_
7 7
8#include "IGUIElement.h" 8#include "IGUIElement.h"
9#include "EGUIEditTypes.h" 9#include "EGUIEditTypes.h"
10 10
11namespace irr 11namespace irr
12{ 12{
13namespace gui 13namespace gui
14{ 14{
15 15
16class IGUIScrollBar; 16class IGUIScrollBar;
17class IGUITab; 17class IGUITab;
18 18
19enum E_SCROLL_BAR_MODE 19enum E_SCROLL_BAR_MODE
20{ 20{
21 //! The scrollbar will only show up when needed. 21 //! The scrollbar will only show up when needed.
22 ESBM_AUTOMATIC = 0, 22 ESBM_AUTOMATIC = 0,
23 23
24 //! The scrollbar will never be visible. 24 //! The scrollbar will never be visible.
25 ESBM_ALWAYS_INVISIBLE, 25 ESBM_ALWAYS_INVISIBLE,
26 26
27 //! The scrollbar will always the visible. 27 //! The scrollbar will always the visible.
28 ESBM_ALWAYS_VISIBLE, 28 ESBM_ALWAYS_VISIBLE,
29 29
30 //! just a count of how many are in this enum 30 //! just a count of how many are in this enum
31 ESBM_COUNT 31 ESBM_COUNT
32}; 32};
33 33
34const c8* const GUIScrollBarModeNames[] = 34const c8* const GUIScrollBarModeNames[] =
35{ 35{
36 "automatic", 36 "automatic",
37 "alwaysInvisible", 37 "alwaysInvisible",
38 "alwaysVisible", 38 "alwaysVisible",
39 0 39 0
40}; 40};
41 41
42class CGUIPanel : public IGUIElement 42class CGUIPanel : public IGUIElement
43{ 43{
44public: 44public:
45 CGUIPanel( IGUIEnvironment* environment, IGUIElement* parent, s32 id=-1, 45 CGUIPanel( IGUIEnvironment* environment, IGUIElement* parent, s32 id=-1,
46 const core::rect<s32>& rectangle = core::rect<s32>(0,0,100,100), 46 const core::rect<s32>& rectangle = core::rect<s32>(0,0,100,100),
47 bool border=false, 47 bool border=false,
48 E_SCROLL_BAR_MODE vMode=ESBM_AUTOMATIC, 48 E_SCROLL_BAR_MODE vMode=ESBM_AUTOMATIC,
49 E_SCROLL_BAR_MODE hMode=ESBM_ALWAYS_INVISIBLE ); 49 E_SCROLL_BAR_MODE hMode=ESBM_ALWAYS_INVISIBLE );
50 50
51 virtual ~CGUIPanel(); 51 virtual ~CGUIPanel();
52 52
53 //! draws the panel and its children 53 //! draws the panel and its children
54 virtual void draw(); 54 virtual void draw();
55 55
56 //! returns true if it has a border, false if not 56 //! returns true if it has a border, false if not
57 bool hasBorder() const; 57 bool hasBorder() const;
58 58
59 //! sets whether the element draws a border 59 //! sets whether the element draws a border
60 void setBorder(bool enabled); 60 void setBorder(bool enabled);
61 61
62 //! returns a pointer to the vertical scrollbar 62 //! returns a pointer to the vertical scrollbar
63 IGUIScrollBar* getVScrollBar() const; 63 IGUIScrollBar* getVScrollBar() const;
64 64
65 //! returns a pointer to the horizontal scrollbar 65 //! returns a pointer to the horizontal scrollbar
66 IGUIScrollBar* getHScrollBar() const; 66 IGUIScrollBar* getHScrollBar() const;
67 67
68 //! returns the vertical scrollbar visibility rule 68 //! returns the vertical scrollbar visibility rule
69 E_SCROLL_BAR_MODE getVScrollBarMode() const; 69 E_SCROLL_BAR_MODE getVScrollBarMode() const;
70 70
71 //! sets the vertical scrollbar visibility rule 71 //! sets the vertical scrollbar visibility rule
72 void setVScrollBarMode(E_SCROLL_BAR_MODE mode); 72 void setVScrollBarMode(E_SCROLL_BAR_MODE mode);
73 73
74 //! returns the horizontal scrollbar visibility rule 74 //! returns the horizontal scrollbar visibility rule
75 E_SCROLL_BAR_MODE getHScrollBarMode() const; 75 E_SCROLL_BAR_MODE getHScrollBarMode() const;
76 76
77 //! sets the horizontal scrollbar visibility rule 77 //! sets the horizontal scrollbar visibility rule
78 void setHScrollBarMode(E_SCROLL_BAR_MODE mode); 78 void setHScrollBarMode(E_SCROLL_BAR_MODE mode);
79 79
80 //! returns the visible area inside the panel, excluding scrollbar and border 80 //! returns the visible area inside the panel, excluding scrollbar and border
81 core::rect<s32> getClientArea() const; 81 core::rect<s32> getClientArea() const;
82 82
83 virtual bool OnEvent(const SEvent &event); 83 virtual bool OnEvent(const SEvent &event);
84 84
85 //! adds a child to the panel 85 //! adds a child to the panel
86 virtual void addChild(IGUIElement* child); 86 virtual void addChild(IGUIElement* child);
87 87
88 //! removes a child from the panel 88 //! removes a child from the panel
89 virtual void removeChild(IGUIElement* child); 89 virtual void removeChild(IGUIElement* child);
90 90
91 //! updates the absolute position 91 //! updates the absolute position
92 virtual void updateAbsolutePosition(); 92 virtual void updateAbsolutePosition();
93 93
94 //! returns children of the inner pane 94 //! returns children of the inner pane
95 virtual const core::list<IGUIElement*>& getChildren(); 95 virtual const core::list<IGUIElement*>& getChildren();
96 96
97 //! Returns the type name of the gui element. 97 //! Returns the type name of the gui element.
98 virtual const c8* getTypeName() const 98 virtual const c8* getTypeName() const
99 { 99 {
100 return GUIEditElementTypeNames[EGUIEDIT_GUIPANEL]; 100 return GUIEditElementTypeNames[EGUIEDIT_GUIPANEL];
101 } 101 }
102 102
103 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0); 103 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0);
104 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); 104 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
105 105
106protected: 106protected:
107 void moveInnerPane(); 107 void moveInnerPane();
108 void resizeInnerPane(); 108 void resizeInnerPane();
109 void calculateClientArea(); 109 void calculateClientArea();
110 110
111private: 111private:
112 112
113 IGUIScrollBar* VScrollBar; 113 IGUIScrollBar* VScrollBar;
114 IGUIScrollBar* HScrollBar; 114 IGUIScrollBar* HScrollBar;
115 IGUITab* ClipPane; 115 IGUITab* ClipPane;
116 IGUITab* InnerPane; 116 IGUITab* InnerPane;
117 117
118 E_SCROLL_BAR_MODE VScrollBarMode; 118 E_SCROLL_BAR_MODE VScrollBarMode;
119 E_SCROLL_BAR_MODE HScrollBarMode; 119 E_SCROLL_BAR_MODE HScrollBarMode;
120 120
121 bool NeedsUpdate; 121 bool NeedsUpdate;
122 bool Border; 122 bool Border;
123}; 123};
124 124
125} // namespace gui 125} // namespace gui
126} // namespace irr 126} // namespace irr
127 127
128#endif 128#endif
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIStringAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIStringAttribute.h
index af9ac03..36cac56 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIStringAttribute.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIStringAttribute.h
@@ -1,70 +1,70 @@
1#ifndef __C_GUI_STRING_ATTRIBUTE_H_INCLUDED__ 1#ifndef __C_GUI_STRING_ATTRIBUTE_H_INCLUDED__
2#define __C_GUI_STRING_ATTRIBUTE_H_INCLUDED__ 2#define __C_GUI_STRING_ATTRIBUTE_H_INCLUDED__
3 3
4#include "CGUIAttribute.h" 4#include "CGUIAttribute.h"
5#include "IGUIEditBox.h" 5#include "IGUIEditBox.h"
6#include "EGUIEditTypes.h" 6#include "EGUIEditTypes.h"
7 7
8namespace irr 8namespace irr
9{ 9{
10namespace gui 10namespace gui
11{ 11{
12 12
13 class CGUIStringAttribute : public CGUIAttribute 13 class CGUIStringAttribute : public CGUIAttribute
14 { 14 {
15 public: 15 public:
16 // 16 //
17 CGUIStringAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : 17 CGUIStringAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) :
18 CGUIAttribute(environment, parent, myParentID), 18 CGUIAttribute(environment, parent, myParentID),
19 AttribEditBox(0) 19 AttribEditBox(0)
20 { 20 {
21 core::rect<s32> r = getAbsolutePosition(); 21 core::rect<s32> r = getAbsolutePosition();
22 core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, 22 core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10,
23 r.getWidth() - 5, 23 r.getWidth() - 5,
24 Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 15 ); 24 Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 15 );
25 25
26 AttribEditBox = environment->addEditBox(0, r2, true, this, -1); 26 AttribEditBox = environment->addEditBox(0, r2, true, this, -1);
27 AttribEditBox->grab(); 27 AttribEditBox->grab();
28 AttribEditBox->setSubElement(true); 28 AttribEditBox->setSubElement(true);
29 AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 29 AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
30 30
31 } 31 }
32 32
33 virtual ~CGUIStringAttribute() 33 virtual ~CGUIStringAttribute()
34 { 34 {
35 if (AttribEditBox) 35 if (AttribEditBox)
36 AttribEditBox->drop(); 36 AttribEditBox->drop();
37 } 37 }
38 38
39 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) 39 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex)
40 { 40 {
41 AttribEditBox->setText(attribs->getAttributeAsStringW(attribIndex).c_str()); 41 AttribEditBox->setText(attribs->getAttributeAsStringW(attribIndex).c_str());
42 CGUIAttribute::setAttrib(attribs, attribIndex); 42 CGUIAttribute::setAttrib(attribs, attribIndex);
43 } 43 }
44 44
45 //! save the attribute and possibly post the event to its parent 45 //! save the attribute and possibly post the event to its parent
46 virtual bool updateAttrib(bool sendEvent=true) 46 virtual bool updateAttrib(bool sendEvent=true)
47 { 47 {
48 if (!Attribs) 48 if (!Attribs)
49 return true; 49 return true;
50 50
51 Attribs->setAttribute(Index, AttribEditBox->getText()); 51 Attribs->setAttribute(Index, AttribEditBox->getText());
52 AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); 52 AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str());
53 53
54 return CGUIAttribute::updateAttrib(sendEvent); 54 return CGUIAttribute::updateAttrib(sendEvent);
55 } 55 }
56 56
57 //! Returns the type name of the gui element. 57 //! Returns the type name of the gui element.
58 virtual const c8* getTypeName() const 58 virtual const c8* getTypeName() const
59 { 59 {
60 return GUIEditElementTypeNames[EGUIEDIT_STRINGATTRIBUTE]; 60 return GUIEditElementTypeNames[EGUIEDIT_STRINGATTRIBUTE];
61 } 61 }
62 62
63 private: 63 private:
64 IGUIEditBox* AttribEditBox; 64 IGUIEditBox* AttribEditBox;
65 }; 65 };
66 66
67} // namespace gui 67} // namespace gui
68} // namespace irr 68} // namespace irr
69 69
70#endif 70#endif
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureAttribute.h
index 6a4fef2..bee43a9 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureAttribute.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureAttribute.h
@@ -1,140 +1,140 @@
1#ifndef __C_GUI_TEXTURE_ATTRIBUTE_H_INCLUDED__ 1#ifndef __C_GUI_TEXTURE_ATTRIBUTE_H_INCLUDED__
2#define __C_GUI_TEXTURE_ATTRIBUTE_H_INCLUDED__ 2#define __C_GUI_TEXTURE_ATTRIBUTE_H_INCLUDED__
3 3
4#include "CGUIAttribute.h" 4#include "CGUIAttribute.h"
5#include "IGUIEditBox.h" 5#include "IGUIEditBox.h"
6#include "IGUIImage.h" 6#include "IGUIImage.h"
7#include "IGUIButton.h" 7#include "IGUIButton.h"
8#include "EGUIEditTypes.h" 8#include "EGUIEditTypes.h"
9 9
10namespace irr 10namespace irr
11{ 11{
12namespace gui 12namespace gui
13{ 13{
14 14
15 class CGUITextureAttribute : public CGUIAttribute 15 class CGUITextureAttribute : public CGUIAttribute
16 { 16 {
17 public: 17 public:
18 // 18 //
19 CGUITextureAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : 19 CGUITextureAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) :
20 CGUIAttribute(environment, parent, myParentID), 20 CGUIAttribute(environment, parent, myParentID),
21 AttribEditBox(0), AttribImage(0), AttribButton(0) 21 AttribEditBox(0), AttribImage(0), AttribButton(0)
22 { 22 {
23 IGUISkin* skin = Environment->getSkin(); 23 IGUISkin* skin = Environment->getSkin();
24 24
25 core::rect<s32> r = getAbsolutePosition(); 25 core::rect<s32> r = getAbsolutePosition();
26 s32 topy = skin->getFont()->getDimension(L"A").Height + 10; 26 s32 topy = skin->getFont()->getDimension(L"A").Height + 10;
27 s32 h = skin->getFont()->getDimension(L"A").Height + 5; 27 s32 h = skin->getFont()->getDimension(L"A").Height + 5;
28 28
29 AttribImage = environment->addImage(0, core::position2di(0, topy), false, this); 29 AttribImage = environment->addImage(0, core::position2di(0, topy), false, this);
30 AttribImage->setRelativePosition( core::rect<s32>(0,topy, r.getWidth() - 5, 100+topy)); 30 AttribImage->setRelativePosition( core::rect<s32>(0,topy, r.getWidth() - 5, 100+topy));
31 AttribImage->grab(); 31 AttribImage->grab();
32 AttribImage->setSubElement(true); 32 AttribImage->setSubElement(true);
33 AttribImage->setScaleImage(true); 33 AttribImage->setScaleImage(true);
34 AttribImage->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 34 AttribImage->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
35 35
36 topy += 105; 36 topy += 105;
37 37
38 core::rect<s32> r2(0, topy, r.getWidth() - 15 - skin->getSize(EGDS_CHECK_BOX_WIDTH), topy + h); 38 core::rect<s32> r2(0, topy, r.getWidth() - 15 - skin->getSize(EGDS_CHECK_BOX_WIDTH), topy + h);
39 core::rect<s32> br(r.getWidth() - 10 - skin->getSize(EGDS_CHECK_BOX_WIDTH), topy, r.getWidth(), topy + h); 39 core::rect<s32> br(r.getWidth() - 10 - skin->getSize(EGDS_CHECK_BOX_WIDTH), topy, r.getWidth(), topy + h);
40 40
41 AttribEditBox = environment->addEditBox(0, r2, true, this, -1); 41 AttribEditBox = environment->addEditBox(0, r2, true, this, -1);
42 AttribEditBox->grab(); 42 AttribEditBox->grab();
43 AttribEditBox->setSubElement(true); 43 AttribEditBox->setSubElement(true);
44 AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 44 AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
45 45
46 AttribButton = environment->addButton(br, this, -1, L"..."); 46 AttribButton = environment->addButton(br, this, -1, L"...");
47 AttribButton->grab(); 47 AttribButton->grab();
48 AttribButton->setSubElement(true); 48 AttribButton->setSubElement(true);
49 AttribButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 49 AttribButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
50 //AttribButton->setSpriteBank(skin->getSpriteBank()); 50 //AttribButton->setSpriteBank(skin->getSpriteBank());
51 //AttribButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_FILE), skin->getColor(EGDC_WINDOW_SYMBOL)); 51 //AttribButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_FILE), skin->getColor(EGDC_WINDOW_SYMBOL));
52 //AttribButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_FILE), skin->getColor(EGDC_WINDOW_SYMBOL), true); 52 //AttribButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_FILE), skin->getColor(EGDC_WINDOW_SYMBOL), true);
53 } 53 }
54 54
55 virtual ~CGUITextureAttribute() 55 virtual ~CGUITextureAttribute()
56 { 56 {
57 if (AttribEditBox) 57 if (AttribEditBox)
58 AttribEditBox->drop(); 58 AttribEditBox->drop();
59 if (AttribImage) 59 if (AttribImage)
60 AttribImage->drop(); 60 AttribImage->drop();
61 if (AttribButton) 61 if (AttribButton)
62 AttribButton->drop(); 62 AttribButton->drop();
63 } 63 }
64 64
65 virtual bool OnEvent(const SEvent &e) 65 virtual bool OnEvent(const SEvent &e)
66 { 66 {
67 67
68 if (IsEnabled) 68 if (IsEnabled)
69 { 69 {
70 switch (e.EventType) 70 switch (e.EventType)
71 { 71 {
72 case EET_GUI_EVENT: 72 case EET_GUI_EVENT:
73 switch (e.GUIEvent.EventType) 73 switch (e.GUIEvent.EventType)
74 { 74 {
75 case EGET_BUTTON_CLICKED: 75 case EGET_BUTTON_CLICKED:
76 // button click: open file dialog 76 // button click: open file dialog
77 if (e.GUIEvent.Caller == AttribButton) 77 if (e.GUIEvent.Caller == AttribButton)
78 { 78 {
79 //Environment->addGUIElement("textureBrowser", Environment->getRootGUIElement()); 79 //Environment->addGUIElement("textureBrowser", Environment->getRootGUIElement());
80 return true; 80 return true;
81 } 81 }
82 break; 82 break;
83 case EGET_FILE_SELECTED: 83 case EGET_FILE_SELECTED:
84 // file selected: change editbox value and set event 84 // file selected: change editbox value and set event
85 85
86 return true; 86 return true;
87 case EGET_FILE_CHOOSE_DIALOG_CANCELLED: 87 case EGET_FILE_CHOOSE_DIALOG_CANCELLED:
88 88
89 return true; 89 return true;
90 default: 90 default:
91 break; 91 break;
92 } 92 }
93 break; 93 break;
94 case EET_KEY_INPUT_EVENT: 94 case EET_KEY_INPUT_EVENT:
95 return true; 95 return true;
96 default: 96 default:
97 break; 97 break;
98 } 98 }
99 } 99 }
100 return CGUIAttribute::OnEvent(e); 100 return CGUIAttribute::OnEvent(e);
101 } 101 }
102 102
103 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) 103 virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex)
104 { 104 {
105 AttribEditBox->setText(attribs->getAttributeAsStringW(attribIndex).c_str()); 105 AttribEditBox->setText(attribs->getAttributeAsStringW(attribIndex).c_str());
106 AttribImage->setImage(attribs->getAttributeAsTexture(Index)); 106 AttribImage->setImage(attribs->getAttributeAsTexture(Index));
107 107
108 CGUIAttribute::setAttrib(attribs, attribIndex); 108 CGUIAttribute::setAttrib(attribs, attribIndex);
109 } 109 }
110 110
111 //! save the attribute and possibly post the event to its parent 111 //! save the attribute and possibly post the event to its parent
112 virtual bool updateAttrib(bool sendEvent=true) 112 virtual bool updateAttrib(bool sendEvent=true)
113 { 113 {
114 if (!Attribs) 114 if (!Attribs)
115 return true; 115 return true;
116 116
117 Attribs->setAttribute(Index, AttribEditBox->getText()); 117 Attribs->setAttribute(Index, AttribEditBox->getText());
118 core::stringw tmp = Attribs->getAttributeAsStringW(Index); 118 core::stringw tmp = Attribs->getAttributeAsStringW(Index);
119 AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); 119 AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str());
120 AttribImage->setImage(Attribs->getAttributeAsTexture(Index)); 120 AttribImage->setImage(Attribs->getAttributeAsTexture(Index));
121 121
122 return CGUIAttribute::updateAttrib(sendEvent); 122 return CGUIAttribute::updateAttrib(sendEvent);
123 } 123 }
124 124
125 //! Returns the type name of the gui element. 125 //! Returns the type name of the gui element.
126 virtual const c8* getTypeName() const 126 virtual const c8* getTypeName() const
127 { 127 {
128 return GUIEditElementTypeNames[EGUIEDIT_TEXTUREATTRIBUTE]; 128 return GUIEditElementTypeNames[EGUIEDIT_TEXTUREATTRIBUTE];
129 } 129 }
130 130
131 private: 131 private:
132 IGUIEditBox* AttribEditBox; 132 IGUIEditBox* AttribEditBox;
133 IGUIImage* AttribImage; 133 IGUIImage* AttribImage;
134 IGUIButton* AttribButton; 134 IGUIButton* AttribButton;
135 }; 135 };
136 136
137} // namespace gui 137} // namespace gui
138} // namespace irr 138} // namespace irr
139 139
140#endif 140#endif
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.cpp
index bac5233..6c80626 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.cpp
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.cpp
@@ -1,336 +1,336 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson 1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#include "CGUITextureCacheBrowser.h" 5#include "CGUITextureCacheBrowser.h"
6#include "IGUIEnvironment.h" 6#include "IGUIEnvironment.h"
7#include "IGUIButton.h" 7#include "IGUIButton.h"
8#include "IGUISkin.h" 8#include "IGUISkin.h"
9#include "IGUIFont.h" 9#include "IGUIFont.h"
10#include "IVideoDriver.h" 10#include "IVideoDriver.h"
11 11
12namespace irr 12namespace irr
13{ 13{
14namespace gui 14namespace gui
15{ 15{
16 16
17CGUITextureCacheBrowser::CGUITextureCacheBrowser(IGUIEnvironment* environment, s32 id, IGUIElement *parent) 17CGUITextureCacheBrowser::CGUITextureCacheBrowser(IGUIEnvironment* environment, s32 id, IGUIElement *parent)
18: IGUIWindow(environment, parent, id, core::rect<s32>(0,0,300,200)), 18: IGUIWindow(environment, parent, id, core::rect<s32>(0,0,300,200)),
19 CloseButton(0), Panel(0), SelectedTexture(-1), Dragging(false), IsDraggable(true) 19 CloseButton(0), Panel(0), SelectedTexture(-1), Dragging(false), IsDraggable(true)
20{ 20{
21 #ifdef _DEBUG 21 #ifdef _DEBUG
22 setDebugName("CGUITextureCacheBrowser"); 22 setDebugName("CGUITextureCacheBrowser");
23 #endif 23 #endif
24 24
25 IGUISkin* skin = 0; 25 IGUISkin* skin = 0;
26 IGUISpriteBank* sprites = 0; 26 IGUISpriteBank* sprites = 0;
27 video::SColor color(255,255,255,255); 27 video::SColor color(255,255,255,255);
28 28
29 if (environment) 29 if (environment)
30 skin = environment->getSkin(); 30 skin = environment->getSkin();
31 31
32 s32 buttonw = 15; 32 s32 buttonw = 15;
33 if (skin) 33 if (skin)
34 { 34 {
35 buttonw = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); 35 buttonw = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH);
36 sprites = skin->getSpriteBank(); 36 sprites = skin->getSpriteBank();
37 color = skin->getColor(EGDC_WINDOW_SYMBOL); 37 color = skin->getColor(EGDC_WINDOW_SYMBOL);
38 } 38 }
39 s32 posx = RelativeRect.getWidth() - buttonw - 4; 39 s32 posx = RelativeRect.getWidth() - buttonw - 4;
40 40
41 CloseButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1, 41 CloseButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1,
42 L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close" ); 42 L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close" );
43 CloseButton->setSubElement(true); 43 CloseButton->setSubElement(true);
44 CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); 44 CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
45 if (sprites) 45 if (sprites)
46 { 46 {
47 CloseButton->setSpriteBank(sprites); 47 CloseButton->setSpriteBank(sprites);
48 CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), color); 48 CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), color);
49 CloseButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_CLOSE), color); 49 CloseButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_CLOSE), color);
50 } 50 }
51 51
52 CloseButton->grab(); 52 CloseButton->grab();
53 53
54 // window title 54 // window title
55 Text = L"Texture Browser"; 55 Text = L"Texture Browser";
56 56
57 // panel element 57 // panel element
58 Panel = new CGUIPanel(environment, this); 58 Panel = new CGUIPanel(environment, this);
59 Panel->setRelativePosition( core::rect<s32>(1, buttonw + 5, 151, RelativeRect.getHeight() - 1)); 59 Panel->setRelativePosition( core::rect<s32>(1, buttonw + 5, 151, RelativeRect.getHeight() - 1));
60 Panel->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); 60 Panel->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
61 Panel->setBorder(true); 61 Panel->setBorder(true);
62 Panel->setSubElement(true); 62 Panel->setSubElement(true);
63 63
64 // some buttons 64 // some buttons
65 65
66 66
67 // add images from texture cache 67 // add images from texture cache
68 updateImageList(); 68 updateImageList();
69 69
70} 70}
71 71
72CGUITextureCacheBrowser::~CGUITextureCacheBrowser() 72CGUITextureCacheBrowser::~CGUITextureCacheBrowser()
73{ 73{
74 if (CloseButton) 74 if (CloseButton)
75 CloseButton->drop(); 75 CloseButton->drop();
76 if (Panel) 76 if (Panel)
77 Panel->drop(); 77 Panel->drop();
78 78
79 // drop images 79 // drop images
80 u32 i; 80 u32 i;
81 for (i=0; i<Images.size(); ++i) 81 for (i=0; i<Images.size(); ++i)
82 { 82 {
83 Images[i]->drop(); 83 Images[i]->drop();
84 Images[i]->remove(); 84 Images[i]->remove();
85 } 85 }
86 Images.clear(); 86 Images.clear();
87} 87}
88void CGUITextureCacheBrowser::updateImageList() 88void CGUITextureCacheBrowser::updateImageList()
89{ 89{
90 if (!Panel) 90 if (!Panel)
91 return; 91 return;
92 92
93 video::IVideoDriver* Driver = Environment->getVideoDriver(); 93 video::IVideoDriver* Driver = Environment->getVideoDriver();
94 94
95 // clear images 95 // clear images
96 u32 i; 96 u32 i;
97 for (i=0; i<Images.size(); ++i) 97 for (i=0; i<Images.size(); ++i)
98 { 98 {
99 Images[i]->drop(); 99 Images[i]->drop();
100 Images[i]->remove(); 100 Images[i]->remove();
101 } 101 }
102 Images.clear(); 102 Images.clear();
103 103
104 u32 count = (u32)Driver->getTextureCount(); 104 u32 count = (u32)Driver->getTextureCount();
105 105
106 s32 h = Panel->getClientArea().getWidth()-10; 106 s32 h = Panel->getClientArea().getWidth()-10;
107 s32 hw = h/2; 107 s32 hw = h/2;
108 core::rect<s32> pos(Panel->getClientArea().getCenter().X - Panel->getAbsolutePosition().UpperLeftCorner.X - hw, 5, 108 core::rect<s32> pos(Panel->getClientArea().getCenter().X - Panel->getAbsolutePosition().UpperLeftCorner.X - hw, 5,
109 Panel->getClientArea().getCenter().X - Panel->getAbsolutePosition().UpperLeftCorner.X + hw, h+5); 109 Panel->getClientArea().getCenter().X - Panel->getAbsolutePosition().UpperLeftCorner.X + hw, h+5);
110 110
111 core::position2di moveDist(0, h+5); 111 core::position2di moveDist(0, h+5);
112 112
113 for (u32 i=0; i<count; ++i) 113 for (u32 i=0; i<count; ++i)
114 { 114 {
115 core::stringw details; 115 core::stringw details;
116 video::ITexture* tex = Driver->getTextureByIndex(i); 116 video::ITexture* tex = Driver->getTextureByIndex(i);
117 details = L"File name: "; 117 details = L"File name: ";
118 details += tex->getName(); 118 details += tex->getName();
119 details += L"\nFormat: "; 119 details += L"\nFormat: ";
120 video::ECOLOR_FORMAT cf = tex->getColorFormat(); 120 video::ECOLOR_FORMAT cf = tex->getColorFormat();
121 121
122 bool alpha = false; 122 bool alpha = false;
123 123
124 switch (cf) 124 switch (cf)
125 { 125 {
126 case video::ECF_A1R5G5B5: 126 case video::ECF_A1R5G5B5:
127 details += L"A1R5G5B5 (16-bit with 1-bit alpha channel)\n"; 127 details += L"A1R5G5B5 (16-bit with 1-bit alpha channel)\n";
128 alpha = true; 128 alpha = true;
129 break; 129 break;
130 case video::ECF_R5G6B5: 130 case video::ECF_R5G6B5:
131 details += L"R5G6B5 (16-bit, no alpha channel)\n"; 131 details += L"R5G6B5 (16-bit, no alpha channel)\n";
132 break; 132 break;
133 case video::ECF_R8G8B8: 133 case video::ECF_R8G8B8:
134 details += L"R8G8B8 (16-bit, no alpha channel)\n"; 134 details += L"R8G8B8 (16-bit, no alpha channel)\n";
135 break; 135 break;
136 case video::ECF_A8R8G8B8: 136 case video::ECF_A8R8G8B8:
137 details += L"R8G8B8 (32-bit with 8-bit alpha channel)\n"; 137 details += L"R8G8B8 (32-bit with 8-bit alpha channel)\n";
138 alpha = true; 138 alpha = true;
139 break; 139 break;
140 default: 140 default:
141 details += L"Unknown\n"; 141 details += L"Unknown\n";
142 } 142 }
143 143
144 core::dimension2du osize = tex->getOriginalSize(); 144 core::dimension2du osize = tex->getOriginalSize();
145 core::dimension2du size = tex->getOriginalSize(); 145 core::dimension2du size = tex->getOriginalSize();
146 146
147 details += "Size: "; 147 details += "Size: ";
148 details += size.Width; 148 details += size.Width;
149 details += "x"; 149 details += "x";
150 details += size.Height; 150 details += size.Height;
151 151
152 if (osize != size) 152 if (osize != size)
153 { 153 {
154 details += "\nOriginal Size: "; 154 details += "\nOriginal Size: ";
155 details += osize.Width; 155 details += osize.Width;
156 details += "x"; 156 details += "x";
157 details += osize.Height; 157 details += osize.Height;
158 } 158 }
159 159
160 details += L"\nMip-maps: "; 160 details += L"\nMip-maps: ";
161 161
162 if (tex->hasMipMaps()) 162 if (tex->hasMipMaps())
163 details += L"Yes\n"; 163 details += L"Yes\n";
164 else 164 else
165 details += L"No\n"; 165 details += L"No\n";
166 166
167 IGUIImage* img = Environment->addImage(tex, core::position2di(1,1), alpha, Panel, i); 167 IGUIImage* img = Environment->addImage(tex, core::position2di(1,1), alpha, Panel, i);
168 img->grab(); 168 img->grab();
169 Images.push_back(img); 169 Images.push_back(img);
170 img->setRelativePosition(pos); 170 img->setRelativePosition(pos);
171 img->setToolTipText(details.c_str()); 171 img->setToolTipText(details.c_str());
172 img->setScaleImage(true); 172 img->setScaleImage(true);
173 img->setColor( SelectedTexture == (s32)i ? video::SColor(255,255,255,255) : video::SColor(128,128,128,128) ); 173 img->setColor( SelectedTexture == (s32)i ? video::SColor(255,255,255,255) : video::SColor(128,128,128,128) );
174 174
175 pos = pos + moveDist; 175 pos = pos + moveDist;
176 } 176 }
177} 177}
178 178
179void CGUITextureCacheBrowser::updateAbsolutePosition() 179void CGUITextureCacheBrowser::updateAbsolutePosition()
180{ 180{
181 IGUIWindow::updateAbsolutePosition(); 181 IGUIWindow::updateAbsolutePosition();
182 updateImageList(); 182 updateImageList();
183} 183}
184 184
185//! called if an event happened. 185//! called if an event happened.
186bool CGUITextureCacheBrowser::OnEvent(const SEvent &event) 186bool CGUITextureCacheBrowser::OnEvent(const SEvent &event)
187{ 187{
188 switch(event.EventType) 188 switch(event.EventType)
189 { 189 {
190 case EET_GUI_EVENT: 190 case EET_GUI_EVENT:
191 if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) 191 if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST)
192 { 192 {
193 if (event.GUIEvent.Caller == (IGUIElement*)this) 193 if (event.GUIEvent.Caller == (IGUIElement*)this)
194 Dragging = false; 194 Dragging = false;
195 return true; 195 return true;
196 } 196 }
197 else 197 else
198 if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED) 198 if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED)
199 { 199 {
200 if (event.GUIEvent.Caller == CloseButton) 200 if (event.GUIEvent.Caller == CloseButton)
201 { 201 {
202 remove(); 202 remove();
203 return true; 203 return true;
204 } 204 }
205 } 205 }
206 break; 206 break;
207 case EET_MOUSE_INPUT_EVENT: 207 case EET_MOUSE_INPUT_EVENT:
208 switch(event.MouseInput.Event) 208 switch(event.MouseInput.Event)
209 { 209 {
210 case EMIE_LMOUSE_PRESSED_DOWN: 210 case EMIE_LMOUSE_PRESSED_DOWN:
211 DragStart.X = event.MouseInput.X; 211 DragStart.X = event.MouseInput.X;
212 DragStart.Y = event.MouseInput.Y; 212 DragStart.Y = event.MouseInput.Y;
213 213
214 if (getElementFromPoint(DragStart) == this) 214 if (getElementFromPoint(DragStart) == this)
215 { 215 {
216 if (!Environment->hasFocus(this)) 216 if (!Environment->hasFocus(this))
217 { 217 {
218 Dragging = IsDraggable; 218 Dragging = IsDraggable;
219 //Environment->setFocus(this); 219 //Environment->setFocus(this);
220 if (Parent) 220 if (Parent)
221 Parent->bringToFront(this); 221 Parent->bringToFront(this);
222 } 222 }
223 return true; 223 return true;
224 } 224 }
225 else 225 else
226 { 226 {
227 if (Panel->getAbsolutePosition().isPointInside(DragStart)) 227 if (Panel->getAbsolutePosition().isPointInside(DragStart))
228 { 228 {
229 // select an image 229 // select an image
230 IGUIElement* el = Panel->getElementFromPoint(DragStart); 230 IGUIElement* el = Panel->getElementFromPoint(DragStart);
231 if (el && el != Panel) 231 if (el && el != Panel)
232 { 232 {
233 if (el->getType() == EGUIET_IMAGE) 233 if (el->getType() == EGUIET_IMAGE)
234 { 234 {
235 setSelected(el->getID()); 235 setSelected(el->getID());
236 } 236 }
237 } 237 }
238 else 238 else
239 { 239 {
240 setSelected(); 240 setSelected();
241 } 241 }
242 } 242 }
243 } 243 }
244 break; 244 break;
245 case EMIE_LMOUSE_LEFT_UP: 245 case EMIE_LMOUSE_LEFT_UP:
246 Dragging = false; 246 Dragging = false;
247 //Environment->removeFocus(this); 247 //Environment->removeFocus(this);
248 return true; 248 return true;
249 case EMIE_MOUSE_MOVED: 249 case EMIE_MOUSE_MOVED:
250 if (Dragging) 250 if (Dragging)
251 { 251 {
252 // gui window should not be dragged outside its parent 252 // gui window should not be dragged outside its parent
253 if (Parent) 253 if (Parent)
254 if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || 254 if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 ||
255 event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || 255 event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 ||
256 event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || 256 event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 ||
257 event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1) 257 event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1)
258 258
259 return true; 259 return true;
260 260
261 261
262 move(core::position2d<s32>(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y)); 262 move(core::position2d<s32>(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y));
263 DragStart.X = event.MouseInput.X; 263 DragStart.X = event.MouseInput.X;
264 DragStart.Y = event.MouseInput.Y; 264 DragStart.Y = event.MouseInput.Y;
265 return true; 265 return true;
266 } 266 }
267 break; 267 break;
268 default: 268 default:
269 break; 269 break;
270 } 270 }
271 default: 271 default:
272 break; 272 break;
273 } 273 }
274 274
275 return Parent ? Parent->OnEvent(event) : false; 275 return Parent ? Parent->OnEvent(event) : false;
276} 276}
277 277
278void CGUITextureCacheBrowser::setSelected(s32 index) 278void CGUITextureCacheBrowser::setSelected(s32 index)
279{ 279{
280 SelectedTexture = index; 280 SelectedTexture = index;
281 updateImageList(); 281 updateImageList();
282 printf("Texture %d selected\n", index); 282 printf("Texture %d selected\n", index);
283} 283}
284 284
285void CGUITextureCacheBrowser::draw() 285void CGUITextureCacheBrowser::draw()
286{ 286{
287 if (!IsVisible) 287 if (!IsVisible)
288 return; 288 return;
289 289
290 IGUISkin* skin = Environment->getSkin(); 290 IGUISkin* skin = Environment->getSkin();
291 291
292 core::rect<s32> rect = AbsoluteRect; 292 core::rect<s32> rect = AbsoluteRect;
293 core::rect<s32> *cl = &AbsoluteClippingRect; 293 core::rect<s32> *cl = &AbsoluteClippingRect;
294 294
295 // draw body fast 295 // draw body fast
296 rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER), 296 rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER),
297 AbsoluteRect, &AbsoluteClippingRect); 297 AbsoluteRect, &AbsoluteClippingRect);
298 298
299 // draw window text 299 // draw window text
300 if (Text.size()) 300 if (Text.size())
301 { 301 {
302 rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X); 302 rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X);
303 rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y); 303 rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y);
304 rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; 304 rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5;
305 305
306 IGUIFont* font = skin->getFont(); 306 IGUIFont* font = skin->getFont();
307 if (font) 307 if (font)
308 font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, cl); 308 font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, cl);
309 } 309 }
310 310
311 IGUIElement::draw(); 311 IGUIElement::draw();
312} 312}
313 313
314 314
315bool CGUITextureCacheBrowser::isDraggable() const 315bool CGUITextureCacheBrowser::isDraggable() const
316{ 316{
317 return IsDraggable; 317 return IsDraggable;
318} 318}
319 319
320void CGUITextureCacheBrowser::setDraggable(bool draggable) 320void CGUITextureCacheBrowser::setDraggable(bool draggable)
321{ 321{
322 IsDraggable = draggable; 322 IsDraggable = draggable;
323 323
324 if (Dragging && !IsDraggable) 324 if (Dragging && !IsDraggable)
325 Dragging = false; 325 Dragging = false;
326} 326}
327 327
328 328
329//! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars) 329//! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars)
330core::rect<s32> CGUITextureCacheBrowser::getClientRect() const 330core::rect<s32> CGUITextureCacheBrowser::getClientRect() const
331{ 331{
332 return core::recti(); 332 return core::recti();
333} 333}
334 334
335} // namespace gui 335} // namespace gui
336} // namespace irr 336} // namespace irr
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.h
index 108d4d6..afe84f1 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.h
@@ -1,88 +1,88 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson 1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_GUI_TEXTURE_CACHE_BROWSER_H_INCLUDED__ 5#ifndef __C_GUI_TEXTURE_CACHE_BROWSER_H_INCLUDED__
6#define __C_GUI_TEXTURE_CACHE_BROWSER_H_INCLUDED__ 6#define __C_GUI_TEXTURE_CACHE_BROWSER_H_INCLUDED__
7 7
8#include "IGUIWindow.h" 8#include "IGUIWindow.h"
9#include "CGUIPanel.h" 9#include "CGUIPanel.h"
10#include "IGUIImage.h" 10#include "IGUIImage.h"
11#include "EGUIEditTypes.h" 11#include "EGUIEditTypes.h"
12 12
13namespace irr 13namespace irr
14{ 14{
15namespace gui 15namespace gui
16{ 16{
17 17
18 //! Texture cache browser 18 //! Texture cache browser
19 19
20 const u32 TEXTURE_BROWSER_TEXTURE_SELECTED = 0x5E1EC7ED; // custom event number for texture selected 20 const u32 TEXTURE_BROWSER_TEXTURE_SELECTED = 0x5E1EC7ED; // custom event number for texture selected
21 21
22 class CGUITextureCacheBrowser : public IGUIWindow 22 class CGUITextureCacheBrowser : public IGUIWindow
23 { 23 {
24 public: 24 public:
25 25
26 //! constructor 26 //! constructor
27 CGUITextureCacheBrowser(IGUIEnvironment* environment, s32 id=-1, IGUIElement *parent=0); 27 CGUITextureCacheBrowser(IGUIEnvironment* environment, s32 id=-1, IGUIElement *parent=0);
28 28
29 //! destructor 29 //! destructor
30 ~CGUITextureCacheBrowser(); 30 ~CGUITextureCacheBrowser();
31 31
32 //! event handler 32 //! event handler
33 virtual bool OnEvent(const SEvent &event); 33 virtual bool OnEvent(const SEvent &event);
34 34
35 //! draws the element 35 //! draws the element
36 virtual void draw(); 36 virtual void draw();
37 37
38 //! update absolute position 38 //! update absolute position
39 virtual void updateAbsolutePosition(); 39 virtual void updateAbsolutePosition();
40 40
41 //! this shoudln't be serialized, but this is included as it's an example 41 //! this shoudln't be serialized, but this is included as it's an example
42 virtual const c8* getTypeName() const { return "textureCacheBrowser"; } 42 virtual const c8* getTypeName() const { return "textureCacheBrowser"; }
43 43
44 //! Returns pointer to the close button 44 //! Returns pointer to the close button
45 virtual IGUIButton* getCloseButton() const { return CloseButton; } 45 virtual IGUIButton* getCloseButton() const { return CloseButton; }
46 46
47 //! Returns pointer to the minimize button 47 //! Returns pointer to the minimize button
48 virtual IGUIButton* getMinimizeButton() const { return 0;} 48 virtual IGUIButton* getMinimizeButton() const { return 0;}
49 49
50 //! Returns pointer to the maximize button 50 //! Returns pointer to the maximize button
51 virtual IGUIButton* getMaximizeButton() const { return 0;} 51 virtual IGUIButton* getMaximizeButton() const { return 0;}
52 52
53 //! get draggable 53 //! get draggable
54 virtual bool isDraggable() const; 54 virtual bool isDraggable() const;
55 55
56 //! get draggable 56 //! get draggable
57 virtual void setDraggable(bool draggable); 57 virtual void setDraggable(bool draggable);
58 58
59 //! not used 59 //! not used
60 virtual core::rect<s32> getClientRect() const; 60 virtual core::rect<s32> getClientRect() const;
61 virtual void setDrawBackground(bool draw) { } 61 virtual void setDrawBackground(bool draw) { }
62 virtual bool getDrawBackground() const { return true; } 62 virtual bool getDrawBackground() const { return true; }
63 virtual void setDrawTitlebar(bool draw) { } 63 virtual void setDrawTitlebar(bool draw) { }
64 virtual bool getDrawTitlebar() const { return true; } 64 virtual bool getDrawTitlebar() const { return true; }
65 65
66 66
67 void setSelected(s32 index=-1); 67 void setSelected(s32 index=-1);
68 68
69 private: 69 private:
70 70
71 void updateImageList(); 71 void updateImageList();
72 72
73 core::array<IGUIImage*> Images; 73 core::array<IGUIImage*> Images;
74 core::position2d<s32> DragStart; 74 core::position2d<s32> DragStart;
75 75
76 IGUIButton* CloseButton; 76 IGUIButton* CloseButton;
77 CGUIPanel* Panel; 77 CGUIPanel* Panel;
78 s32 SelectedTexture; 78 s32 SelectedTexture;
79 bool Dragging; 79 bool Dragging;
80 bool IsDraggable; 80 bool IsDraggable;
81 }; 81 };
82 82
83 83
84} // end namespace gui 84} // end namespace gui
85} // end namespace irr 85} // end namespace irr
86 86
87#endif 87#endif
88 88
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.cpp
index 0a69587..af46b15 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.cpp
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.cpp
@@ -1,95 +1,95 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#include "CMemoryReadWriteFile.h" 5#include "CMemoryReadWriteFile.h"
6 6
7using namespace irr; 7using namespace irr;
8using namespace io; 8using namespace io;
9 9
10CMemoryReadWriteFile::CMemoryReadWriteFile(const c8* filename) 10CMemoryReadWriteFile::CMemoryReadWriteFile(const c8* filename)
11: Data(), FileName(filename), Pos(0) 11: Data(), FileName(filename), Pos(0)
12{ 12{
13} 13}
14 14
15 15
16s32 CMemoryReadWriteFile::write(const void* buffer, u32 sizeToWrite) 16s32 CMemoryReadWriteFile::write(const void* buffer, u32 sizeToWrite)
17{ 17{
18 // no point in writing 0 bytes 18 // no point in writing 0 bytes
19 if (sizeToWrite < 1) 19 if (sizeToWrite < 1)
20 return 0; 20 return 0;
21 21
22 // expand size 22 // expand size
23 if (Pos + sizeToWrite > Data.size()) 23 if (Pos + sizeToWrite > Data.size())
24 Data.set_used(Pos+sizeToWrite); 24 Data.set_used(Pos+sizeToWrite);
25 25
26 // copy data 26 // copy data
27 memcpy( (void*) &Data[Pos], buffer, (size_t) sizeToWrite); 27 memcpy( (void*) &Data[Pos], buffer, (size_t) sizeToWrite);
28 28
29 Pos += sizeToWrite; 29 Pos += sizeToWrite;
30 30
31 return sizeToWrite; 31 return sizeToWrite;
32 32
33} 33}
34 34
35bool CMemoryReadWriteFile::seek(long finalPos, bool relativeMovement) 35bool CMemoryReadWriteFile::seek(long finalPos, bool relativeMovement)
36{ 36{
37 if (relativeMovement) 37 if (relativeMovement)
38 { 38 {
39 if (finalPos + Pos < 0) 39 if (finalPos + Pos < 0)
40 return 0; 40 return 0;
41 else 41 else
42 Pos += finalPos; 42 Pos += finalPos;
43 } 43 }
44 else 44 else
45 { 45 {
46 Pos = finalPos; 46 Pos = finalPos;
47 } 47 }
48 48
49 if (Pos > (s32)Data.size()) 49 if (Pos > (s32)Data.size())
50 Data.set_used(Pos+1); 50 Data.set_used(Pos+1);
51 51
52 return true; 52 return true;
53 53
54} 54}
55 55
56const io::path& CMemoryReadWriteFile::getFileName() const 56const io::path& CMemoryReadWriteFile::getFileName() const
57{ 57{
58 return FileName; 58 return FileName;
59} 59}
60 60
61long CMemoryReadWriteFile::getPos() const 61long CMemoryReadWriteFile::getPos() const
62{ 62{
63 return Pos; 63 return Pos;
64} 64}
65 65
66core::array<c8>& CMemoryReadWriteFile::getData() 66core::array<c8>& CMemoryReadWriteFile::getData()
67{ 67{
68 return Data; 68 return Data;
69} 69}
70 70
71 71
72long CMemoryReadWriteFile::getSize() const 72long CMemoryReadWriteFile::getSize() const
73{ 73{
74 return Data.size(); 74 return Data.size();
75} 75}
76 76
77 77
78s32 CMemoryReadWriteFile::read(void* buffer, u32 sizeToRead) 78s32 CMemoryReadWriteFile::read(void* buffer, u32 sizeToRead)
79{ 79{
80 // cant read past the end 80 // cant read past the end
81 if (Pos + sizeToRead >= Data.size()) 81 if (Pos + sizeToRead >= Data.size())
82 sizeToRead = Data.size() - Pos; 82 sizeToRead = Data.size() - Pos;
83 83
84 // cant read 0 bytes 84 // cant read 0 bytes
85 if (!sizeToRead) 85 if (!sizeToRead)
86 return 0; 86 return 0;
87 87
88 // copy data 88 // copy data
89 memcpy( buffer, (void*) &Data[Pos], (size_t) sizeToRead); 89 memcpy( buffer, (void*) &Data[Pos], (size_t) sizeToRead);
90 90
91 Pos += sizeToRead; 91 Pos += sizeToRead;
92 92
93 return sizeToRead; 93 return sizeToRead;
94} 94}
95 95
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h b/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h
index de20ae7..e0fa06e 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h
@@ -1,73 +1,73 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ 5#ifndef __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__
6#define __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ 6#define __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__
7 7
8#include "IWriteFile.h" 8#include "IWriteFile.h"
9#include "IReadFile.h" 9#include "IReadFile.h"
10#include "irrArray.h" 10#include "irrArray.h"
11#include "irrString.h" 11#include "irrString.h"
12#include "memory.h" 12#include "memory.h"
13 13
14namespace irr 14namespace irr
15{ 15{
16namespace io 16namespace io
17{ 17{
18 18
19 //! Provides write acess to an array as if it is a file. 19 //! Provides write acess to an array as if it is a file.
20 class CMemoryReadWriteFile : public virtual IWriteFile, public virtual IReadFile 20 class CMemoryReadWriteFile : public virtual IWriteFile, public virtual IReadFile
21 { 21 {
22 public: 22 public:
23 23
24 CMemoryReadWriteFile(const c8* filename=0); 24 CMemoryReadWriteFile(const c8* filename=0);
25 25
26 //! Reads an amount of bytes from the file. 26 //! Reads an amount of bytes from the file.
27 //! \param buffer: Pointer to buffer of bytes to write. 27 //! \param buffer: Pointer to buffer of bytes to write.
28 //! \param sizeToWrite: Amount of bytes to wrtie to the file. 28 //! \param sizeToWrite: Amount of bytes to wrtie to the file.
29 //! \return Returns how much bytes were written. 29 //! \return Returns how much bytes were written.
30 virtual s32 write(const void* buffer, u32 sizeToWrite); 30 virtual s32 write(const void* buffer, u32 sizeToWrite);
31 31
32 //! Changes position in file, returns true if successful. 32 //! Changes position in file, returns true if successful.
33 //! \param finalPos: Destination position in the file. 33 //! \param finalPos: Destination position in the file.
34 //! \param relativeMovement: If set to true, the position in the file is 34 //! \param relativeMovement: If set to true, the position in the file is
35 //! changed relative to current position. Otherwise the position is changed 35 //! changed relative to current position. Otherwise the position is changed
36 //! from begin of file. 36 //! from begin of file.
37 //! \return Returns true if successful, otherwise false. 37 //! \return Returns true if successful, otherwise false.
38 virtual bool seek(long finalPos, bool relativeMovement = false); 38 virtual bool seek(long finalPos, bool relativeMovement = false);
39 39
40 //! Returns size of file. 40 //! Returns size of file.
41 //! \return Returns the size of the file in bytes. 41 //! \return Returns the size of the file in bytes.
42 virtual long getSize() const; 42 virtual long getSize() const;
43 43
44 //! Reads an amount of bytes from the file. 44 //! Reads an amount of bytes from the file.
45 //! \param buffer: Pointer to buffer where to read bytes will be written to. 45 //! \param buffer: Pointer to buffer where to read bytes will be written to.
46 //! \param sizeToRead: Amount of bytes to read from the file. 46 //! \param sizeToRead: Amount of bytes to read from the file.
47 //! \return Returns how much bytes were read. 47 //! \return Returns how much bytes were read.
48 virtual s32 read(void* buffer, u32 sizeToRead); 48 virtual s32 read(void* buffer, u32 sizeToRead);
49 49
50 //! Returns the current position in the file. 50 //! Returns the current position in the file.
51 //! \return Returns the current position in the file in bytes. 51 //! \return Returns the current position in the file in bytes.
52 virtual long getPos() const; 52 virtual long getPos() const;
53 53
54 //! Returns name of file. 54 //! Returns name of file.
55 //! \return Returns the file name as zero terminated character string. 55 //! \return Returns the file name as zero terminated character string.
56 virtual const io::path& getFileName() const; 56 virtual const io::path& getFileName() const;
57 57
58 //! Returns file data as an array 58 //! Returns file data as an array
59 core::array<c8>& getData(); 59 core::array<c8>& getData();
60 60
61 private: 61 private:
62 62
63 core::array<c8> Data; 63 core::array<c8> Data;
64 io::path FileName; 64 io::path FileName;
65 long Pos; 65 long Pos;
66 }; 66 };
67 67
68 68
69 69
70} // end namespace io 70} // end namespace io
71} // end namespace irr 71} // end namespace irr
72 72
73#endif // __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ 73#endif // __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/EGUIEditTypes.h b/libraries/irrlicht-1.8/tools/GUIEditor/EGUIEditTypes.h
index 88d119e..fe56726 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/EGUIEditTypes.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/EGUIEditTypes.h
@@ -1,61 +1,61 @@
1#ifndef __C_GUIEDIT_TYPES_H_INCLUDED__ 1#ifndef __C_GUIEDIT_TYPES_H_INCLUDED__
2#define __C_GUIEDIT_TYPES_H_INCLUDED__ 2#define __C_GUIEDIT_TYPES_H_INCLUDED__
3 3
4#include "irrTypes.h" 4#include "irrTypes.h"
5 5
6namespace irr { 6namespace irr {
7namespace gui { 7namespace gui {
8 8
9enum EGUIEDIT_ELEMENT_TYPES 9enum EGUIEDIT_ELEMENT_TYPES
10{ 10{
11 // GUI Editor 11 // GUI Editor
12 EGUIEDIT_GUIEDIT=0, 12 EGUIEDIT_GUIEDIT=0,
13 EGUIEDIT_GUIEDITWINDOW, 13 EGUIEDIT_GUIEDITWINDOW,
14 // Generic 14 // Generic
15 EGUIEDIT_GUIPANEL, 15 EGUIEDIT_GUIPANEL,
16 EGUIEDIT_TEXTUREBROWSER, 16 EGUIEDIT_TEXTUREBROWSER,
17 // Attribute editors 17 // Attribute editors
18 EGUIEDIT_ATTRIBUTEEDITOR, 18 EGUIEDIT_ATTRIBUTEEDITOR,
19 EGUIEDIT_STRINGATTRIBUTE, 19 EGUIEDIT_STRINGATTRIBUTE,
20 EGUIEDIT_BOOLATTRIBUTE, 20 EGUIEDIT_BOOLATTRIBUTE,
21 EGUIEDIT_ENUMATTRIBUTE, 21 EGUIEDIT_ENUMATTRIBUTE,
22 EGUIEDIT_COLORATTRIBUTE, 22 EGUIEDIT_COLORATTRIBUTE,
23 EGUIEDIT_COLORFATTRIBUTE, 23 EGUIEDIT_COLORFATTRIBUTE,
24 EGUIEDIT_TEXTUREATTRIBUTE, 24 EGUIEDIT_TEXTUREATTRIBUTE,
25 // Dummy editor stubs 25 // Dummy editor stubs
26 EGUIEDIT_CONTEXTMENUEDITOR, 26 EGUIEDIT_CONTEXTMENUEDITOR,
27 EGUIEDIT_MENUEDITOR, 27 EGUIEDIT_MENUEDITOR,
28 EGUIEDIT_FILEDIALOGEDITOR, 28 EGUIEDIT_FILEDIALOGEDITOR,
29 EGUIEDIT_COLORDIALOGEDITOR, 29 EGUIEDIT_COLORDIALOGEDITOR,
30 EGUIEDIT_MODALSCREENEDITOR, 30 EGUIEDIT_MODALSCREENEDITOR,
31 // Count 31 // Count
32 EGUIEDIT_COUNT 32 EGUIEDIT_COUNT
33}; 33};
34 34
35const c8* const GUIEditElementTypeNames[] = 35const c8* const GUIEditElementTypeNames[] =
36{ 36{
37 "GUIEditor", 37 "GUIEditor",
38 "GUIEditWindow", 38 "GUIEditWindow",
39 "panel", 39 "panel",
40 "textureCacheBrowser", 40 "textureCacheBrowser",
41 "attributeEditor", 41 "attributeEditor",
42 "string_attribute", 42 "string_attribute",
43 "bool_attribute", 43 "bool_attribute",
44 "enum_attribute", 44 "enum_attribute",
45 "color_attribute", 45 "color_attribute",
46 "colorf_attribute", 46 "colorf_attribute",
47 "texture_attribute", 47 "texture_attribute",
48 // dummy editors 48 // dummy editors
49 "contextMenu_editor", 49 "contextMenu_editor",
50 "menu_editor", 50 "menu_editor",
51 "fileOpenDialog_editor", 51 "fileOpenDialog_editor",
52 "colorSelectDialog_editor", 52 "colorSelectDialog_editor",
53 "modalScreen_editor", 53 "modalScreen_editor",
54 0 54 0
55}; 55};
56 56
57} // gui 57} // gui
58} // irr 58} // irr
59 59
60#endif 60#endif
61 61
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.sln b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.sln
index 6f76269..659854d 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.sln
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.sln
@@ -1,20 +1,20 @@
1 1
2Microsoft Visual Studio Solution File, Format Version 9.00 2Microsoft Visual Studio Solution File, Format Version 9.00
3# Visual C++ Express 2005 3# Visual C++ Express 2005
4Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor", "GUI Editor.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" 4Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor", "GUI Editor.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}"
5EndProject 5EndProject
6Global 6Global
7 GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 Debug|Win32 = Debug|Win32 8 Debug|Win32 = Debug|Win32
9 Release|Win32 = Release|Win32 9 Release|Win32 = Release|Win32
10 EndGlobalSection 10 EndGlobalSection
11 GlobalSection(ProjectConfigurationPlatforms) = postSolution 11 GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 12 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32
13 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 13 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32
14 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 14 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32
15 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 15 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32
16 EndGlobalSection 16 EndGlobalSection
17 GlobalSection(SolutionProperties) = preSolution 17 GlobalSection(SolutionProperties) = preSolution
18 HideSolutionNode = FALSE 18 HideSolutionNode = FALSE
19 EndGlobalSection 19 EndGlobalSection
20EndGlobal 20EndGlobal
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.vcproj b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.vcproj
index 81c6fa9..e28c5fa 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.vcproj
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.vcproj
@@ -1,295 +1,295 @@
1<?xml version="1.0" encoding="Windows-1252"?> 1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject 2<VisualStudioProject
3 ProjectType="Visual C++" 3 ProjectType="Visual C++"
4 Version="8.00" 4 Version="8.00"
5 Name="GUI Editor" 5 Name="GUI Editor"
6 ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" 6 ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}"
7 RootNamespace="GUI Editor" 7 RootNamespace="GUI Editor"
8 Keyword="Win32Proj" 8 Keyword="Win32Proj"
9 > 9 >
10 <Platforms> 10 <Platforms>
11 <Platform 11 <Platform
12 Name="Win32" 12 Name="Win32"
13 /> 13 />
14 </Platforms> 14 </Platforms>
15 <ToolFiles> 15 <ToolFiles>
16 </ToolFiles> 16 </ToolFiles>
17 <Configurations> 17 <Configurations>
18 <Configuration 18 <Configuration
19 Name="Debug|Win32" 19 Name="Debug|Win32"
20 OutputDirectory="Debug" 20 OutputDirectory="Debug"
21 IntermediateDirectory="Debug" 21 IntermediateDirectory="Debug"
22 ConfigurationType="1" 22 ConfigurationType="1"
23 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 23 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
24 CharacterSet="2" 24 CharacterSet="2"
25 > 25 >
26 <Tool 26 <Tool
27 Name="VCPreBuildEventTool" 27 Name="VCPreBuildEventTool"
28 /> 28 />
29 <Tool 29 <Tool
30 Name="VCCustomBuildTool" 30 Name="VCCustomBuildTool"
31 /> 31 />
32 <Tool 32 <Tool
33 Name="VCXMLDataGeneratorTool" 33 Name="VCXMLDataGeneratorTool"
34 /> 34 />
35 <Tool 35 <Tool
36 Name="VCWebServiceProxyGeneratorTool" 36 Name="VCWebServiceProxyGeneratorTool"
37 /> 37 />
38 <Tool 38 <Tool
39 Name="VCMIDLTool" 39 Name="VCMIDLTool"
40 /> 40 />
41 <Tool 41 <Tool
42 Name="VCCLCompilerTool" 42 Name="VCCLCompilerTool"
43 Optimization="0" 43 Optimization="0"
44 FavorSizeOrSpeed="0" 44 FavorSizeOrSpeed="0"
45 WholeProgramOptimization="false" 45 WholeProgramOptimization="false"
46 AdditionalIncludeDirectories="..\..\include" 46 AdditionalIncludeDirectories="..\..\include"
47 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" 47 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
48 MinimalRebuild="true" 48 MinimalRebuild="true"
49 BasicRuntimeChecks="3" 49 BasicRuntimeChecks="3"
50 RuntimeLibrary="1" 50 RuntimeLibrary="1"
51 UsePrecompiledHeader="0" 51 UsePrecompiledHeader="0"
52 WarningLevel="3" 52 WarningLevel="3"
53 Detect64BitPortabilityProblems="true" 53 Detect64BitPortabilityProblems="true"
54 DebugInformationFormat="4" 54 DebugInformationFormat="4"
55 /> 55 />
56 <Tool 56 <Tool
57 Name="VCManagedResourceCompilerTool" 57 Name="VCManagedResourceCompilerTool"
58 /> 58 />
59 <Tool 59 <Tool
60 Name="VCResourceCompilerTool" 60 Name="VCResourceCompilerTool"
61 /> 61 />
62 <Tool 62 <Tool
63 Name="VCPreLinkEventTool" 63 Name="VCPreLinkEventTool"
64 /> 64 />
65 <Tool 65 <Tool
66 Name="VCLinkerTool" 66 Name="VCLinkerTool"
67 AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " 67 AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib "
68 OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" 68 OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe"
69 LinkIncremental="2" 69 LinkIncremental="2"
70 AdditionalLibraryDirectories="&quot;..\..\lib\Win32-visualstudio&quot;" 70 AdditionalLibraryDirectories="&quot;..\..\lib\Win32-visualstudio&quot;"
71 GenerateDebugInformation="true" 71 GenerateDebugInformation="true"
72 ProgramDatabaseFile="$(OutDir)/GUIEditor.pdb" 72 ProgramDatabaseFile="$(OutDir)/GUIEditor.pdb"
73 SubSystem="1" 73 SubSystem="1"
74 TargetMachine="1" 74 TargetMachine="1"
75 /> 75 />
76 <Tool 76 <Tool
77 Name="VCALinkTool" 77 Name="VCALinkTool"
78 /> 78 />
79 <Tool 79 <Tool
80 Name="VCManifestTool" 80 Name="VCManifestTool"
81 /> 81 />
82 <Tool 82 <Tool
83 Name="VCXDCMakeTool" 83 Name="VCXDCMakeTool"
84 /> 84 />
85 <Tool 85 <Tool
86 Name="VCBscMakeTool" 86 Name="VCBscMakeTool"
87 /> 87 />
88 <Tool 88 <Tool
89 Name="VCFxCopTool" 89 Name="VCFxCopTool"
90 /> 90 />
91 <Tool 91 <Tool
92 Name="VCAppVerifierTool" 92 Name="VCAppVerifierTool"
93 /> 93 />
94 <Tool 94 <Tool
95 Name="VCWebDeploymentTool" 95 Name="VCWebDeploymentTool"
96 /> 96 />
97 <Tool 97 <Tool
98 Name="VCPostBuildEventTool" 98 Name="VCPostBuildEventTool"
99 /> 99 />
100 </Configuration> 100 </Configuration>
101 <Configuration 101 <Configuration
102 Name="Release|Win32" 102 Name="Release|Win32"
103 OutputDirectory="Release" 103 OutputDirectory="Release"
104 IntermediateDirectory="Release" 104 IntermediateDirectory="Release"
105 ConfigurationType="1" 105 ConfigurationType="1"
106 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 106 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
107 CharacterSet="2" 107 CharacterSet="2"
108 > 108 >
109 <Tool 109 <Tool
110 Name="VCPreBuildEventTool" 110 Name="VCPreBuildEventTool"
111 /> 111 />
112 <Tool 112 <Tool
113 Name="VCCustomBuildTool" 113 Name="VCCustomBuildTool"
114 /> 114 />
115 <Tool 115 <Tool
116 Name="VCXMLDataGeneratorTool" 116 Name="VCXMLDataGeneratorTool"
117 /> 117 />
118 <Tool 118 <Tool
119 Name="VCWebServiceProxyGeneratorTool" 119 Name="VCWebServiceProxyGeneratorTool"
120 /> 120 />
121 <Tool 121 <Tool
122 Name="VCMIDLTool" 122 Name="VCMIDLTool"
123 /> 123 />
124 <Tool 124 <Tool
125 Name="VCCLCompilerTool" 125 Name="VCCLCompilerTool"
126 Optimization="3" 126 Optimization="3"
127 WholeProgramOptimization="true" 127 WholeProgramOptimization="true"
128 AdditionalIncludeDirectories="..\..\include" 128 AdditionalIncludeDirectories="..\..\include"
129 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 129 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
130 RuntimeLibrary="0" 130 RuntimeLibrary="0"
131 UsePrecompiledHeader="0" 131 UsePrecompiledHeader="0"
132 WarningLevel="3" 132 WarningLevel="3"
133 Detect64BitPortabilityProblems="true" 133 Detect64BitPortabilityProblems="true"
134 DebugInformationFormat="3" 134 DebugInformationFormat="3"
135 /> 135 />
136 <Tool 136 <Tool
137 Name="VCManagedResourceCompilerTool" 137 Name="VCManagedResourceCompilerTool"
138 /> 138 />
139 <Tool 139 <Tool
140 Name="VCResourceCompilerTool" 140 Name="VCResourceCompilerTool"
141 /> 141 />
142 <Tool 142 <Tool
143 Name="VCPreLinkEventTool" 143 Name="VCPreLinkEventTool"
144 /> 144 />
145 <Tool 145 <Tool
146 Name="VCLinkerTool" 146 Name="VCLinkerTool"
147 OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" 147 OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe"
148 LinkIncremental="1" 148 LinkIncremental="1"
149 GenerateDebugInformation="true" 149 GenerateDebugInformation="true"
150 SubSystem="1" 150 SubSystem="1"
151 OptimizeReferences="2" 151 OptimizeReferences="2"
152 EnableCOMDATFolding="2" 152 EnableCOMDATFolding="2"
153 TargetMachine="1" 153 TargetMachine="1"
154 /> 154 />
155 <Tool 155 <Tool
156 Name="VCALinkTool" 156 Name="VCALinkTool"
157 /> 157 />
158 <Tool 158 <Tool
159 Name="VCManifestTool" 159 Name="VCManifestTool"
160 /> 160 />
161 <Tool 161 <Tool
162 Name="VCXDCMakeTool" 162 Name="VCXDCMakeTool"
163 /> 163 />
164 <Tool 164 <Tool
165 Name="VCBscMakeTool" 165 Name="VCBscMakeTool"
166 /> 166 />
167 <Tool 167 <Tool
168 Name="VCFxCopTool" 168 Name="VCFxCopTool"
169 /> 169 />
170 <Tool 170 <Tool
171 Name="VCAppVerifierTool" 171 Name="VCAppVerifierTool"
172 /> 172 />
173 <Tool 173 <Tool
174 Name="VCWebDeploymentTool" 174 Name="VCWebDeploymentTool"
175 /> 175 />
176 <Tool 176 <Tool
177 Name="VCPostBuildEventTool" 177 Name="VCPostBuildEventTool"
178 /> 178 />
179 </Configuration> 179 </Configuration>
180 </Configurations> 180 </Configurations>
181 <References> 181 <References>
182 </References> 182 </References>
183 <Files> 183 <Files>
184 <Filter 184 <Filter
185 Name="gui" 185 Name="gui"
186 > 186 >
187 <File 187 <File
188 RelativePath=".\CGUIEditFactory.cpp" 188 RelativePath=".\CGUIEditFactory.cpp"
189 > 189 >
190 </File> 190 </File>
191 <File 191 <File
192 RelativePath=".\CGUIEditFactory.h" 192 RelativePath=".\CGUIEditFactory.h"
193 > 193 >
194 </File> 194 </File>
195 <File 195 <File
196 RelativePath=".\CGUIEditWindow.cpp" 196 RelativePath=".\CGUIEditWindow.cpp"
197 > 197 >
198 </File> 198 </File>
199 <File 199 <File
200 RelativePath=".\CGUIEditWindow.h" 200 RelativePath=".\CGUIEditWindow.h"
201 > 201 >
202 </File> 202 </File>
203 <File 203 <File
204 RelativePath=".\CGUIEditWorkspace.cpp" 204 RelativePath=".\CGUIEditWorkspace.cpp"
205 > 205 >
206 </File> 206 </File>
207 <File 207 <File
208 RelativePath=".\CGUIEditWorkspace.h" 208 RelativePath=".\CGUIEditWorkspace.h"
209 > 209 >
210 </File> 210 </File>
211 <File 211 <File
212 RelativePath=".\CGUITextureCacheBrowser.cpp" 212 RelativePath=".\CGUITextureCacheBrowser.cpp"
213 > 213 >
214 </File> 214 </File>
215 <File 215 <File
216 RelativePath=".\CGUITextureCacheBrowser.h" 216 RelativePath=".\CGUITextureCacheBrowser.h"
217 > 217 >
218 </File> 218 </File>
219 <Filter 219 <Filter
220 Name="GUIAttributes" 220 Name="GUIAttributes"
221 > 221 >
222 <File 222 <File
223 RelativePath=".\CGUIAttribute.h" 223 RelativePath=".\CGUIAttribute.h"
224 > 224 >
225 </File> 225 </File>
226 <File 226 <File
227 RelativePath=".\CGUIAttributeEditor.cpp" 227 RelativePath=".\CGUIAttributeEditor.cpp"
228 > 228 >
229 </File> 229 </File>
230 <File 230 <File
231 RelativePath=".\CGUIAttributeEditor.h" 231 RelativePath=".\CGUIAttributeEditor.h"
232 > 232 >
233 </File> 233 </File>
234 <File 234 <File
235 RelativePath=".\CGUIBoolAttribute.h" 235 RelativePath=".\CGUIBoolAttribute.h"
236 > 236 >
237 </File> 237 </File>
238 <File 238 <File
239 RelativePath=".\CGUIColorAttribute.h" 239 RelativePath=".\CGUIColorAttribute.h"
240 > 240 >
241 </File> 241 </File>
242 <File 242 <File
243 RelativePath=".\CGUIEnumAttribute.h" 243 RelativePath=".\CGUIEnumAttribute.h"
244 > 244 >
245 </File> 245 </File>
246 <File 246 <File
247 RelativePath=".\CGUIStringAttribute.h" 247 RelativePath=".\CGUIStringAttribute.h"
248 > 248 >
249 </File> 249 </File>
250 <File 250 <File
251 RelativePath=".\CGUITextureAttribute.h" 251 RelativePath=".\CGUITextureAttribute.h"
252 > 252 >
253 </File> 253 </File>
254 </Filter> 254 </Filter>
255 <Filter 255 <Filter
256 Name="Useful GUI Elements" 256 Name="Useful GUI Elements"
257 > 257 >
258 <File 258 <File
259 RelativePath=".\CGUIPanel.cpp" 259 RelativePath=".\CGUIPanel.cpp"
260 > 260 >
261 </File> 261 </File>
262 <File 262 <File
263 RelativePath=".\CGUIPanel.h" 263 RelativePath=".\CGUIPanel.h"
264 > 264 >
265 </File> 265 </File>
266 </Filter> 266 </Filter>
267 <Filter 267 <Filter
268 Name="Element Editors" 268 Name="Element Editors"
269 > 269 >
270 <File 270 <File
271 RelativePath=".\CGUIDummyEditorStub.h" 271 RelativePath=".\CGUIDummyEditorStub.h"
272 > 272 >
273 </File> 273 </File>
274 </Filter> 274 </Filter>
275 </Filter> 275 </Filter>
276 <Filter 276 <Filter
277 Name="io" 277 Name="io"
278 > 278 >
279 <File 279 <File
280 RelativePath=".\CMemoryReadWriteFile.cpp" 280 RelativePath=".\CMemoryReadWriteFile.cpp"
281 > 281 >
282 </File> 282 </File>
283 <File 283 <File
284 RelativePath=".\CMemoryReadWriteFile.h" 284 RelativePath=".\CMemoryReadWriteFile.h"
285 > 285 >
286 </File> 286 </File>
287 </Filter> 287 </Filter>
288 <File 288 <File
289 RelativePath=".\main.cpp" 289 RelativePath=".\main.cpp"
290 > 290 >
291 </File> 291 </File>
292 </Files> 292 </Files>
293 <Globals> 293 <Globals>
294 </Globals> 294 </Globals>
295</VisualStudioProject> 295</VisualStudioProject>
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.sln b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.sln
index 0acf300..82a8b56 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.sln
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.sln
@@ -1,20 +1,20 @@
1 1
2Microsoft Visual Studio Solution File, Format Version 10.00 2Microsoft Visual Studio Solution File, Format Version 10.00
3# Visual C++ Express 2008 3# Visual C++ Express 2008
4Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor_v9", "GUI Editor_v9.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" 4Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor_v9", "GUI Editor_v9.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}"
5EndProject 5EndProject
6Global 6Global
7 GlobalSection(SolutionConfigurationPlatforms) = preSolution 7 GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 Debug|Win32 = Debug|Win32 8 Debug|Win32 = Debug|Win32
9 Release|Win32 = Release|Win32 9 Release|Win32 = Release|Win32
10 EndGlobalSection 10 EndGlobalSection
11 GlobalSection(ProjectConfigurationPlatforms) = postSolution 11 GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 12 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32
13 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 13 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32
14 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 14 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32
15 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 15 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32
16 EndGlobalSection 16 EndGlobalSection
17 GlobalSection(SolutionProperties) = preSolution 17 GlobalSection(SolutionProperties) = preSolution
18 HideSolutionNode = FALSE 18 HideSolutionNode = FALSE
19 EndGlobalSection 19 EndGlobalSection
20EndGlobal 20EndGlobal
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.vcproj b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.vcproj
index 6d73d03..79ba177 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.vcproj
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.vcproj
@@ -1,293 +1,293 @@
1<?xml version="1.0" encoding="Windows-1252"?> 1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject 2<VisualStudioProject
3 ProjectType="Visual C++" 3 ProjectType="Visual C++"
4 Version="9,00" 4 Version="9,00"
5 Name="GUI Editor_v9" 5 Name="GUI Editor_v9"
6 ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" 6 ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}"
7 RootNamespace="GUI Editor" 7 RootNamespace="GUI Editor"
8 Keyword="Win32Proj" 8 Keyword="Win32Proj"
9 TargetFrameworkVersion="131072" 9 TargetFrameworkVersion="131072"
10 > 10 >
11 <Platforms> 11 <Platforms>
12 <Platform 12 <Platform
13 Name="Win32" 13 Name="Win32"
14 /> 14 />
15 </Platforms> 15 </Platforms>
16 <ToolFiles> 16 <ToolFiles>
17 </ToolFiles> 17 </ToolFiles>
18 <Configurations> 18 <Configurations>
19 <Configuration 19 <Configuration
20 Name="Debug|Win32" 20 Name="Debug|Win32"
21 OutputDirectory="Debug" 21 OutputDirectory="Debug"
22 IntermediateDirectory="Debug" 22 IntermediateDirectory="Debug"
23 ConfigurationType="1" 23 ConfigurationType="1"
24 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 24 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
25 CharacterSet="2" 25 CharacterSet="2"
26 > 26 >
27 <Tool 27 <Tool
28 Name="VCPreBuildEventTool" 28 Name="VCPreBuildEventTool"
29 /> 29 />
30 <Tool 30 <Tool
31 Name="VCCustomBuildTool" 31 Name="VCCustomBuildTool"
32 /> 32 />
33 <Tool 33 <Tool
34 Name="VCXMLDataGeneratorTool" 34 Name="VCXMLDataGeneratorTool"
35 /> 35 />
36 <Tool 36 <Tool
37 Name="VCWebServiceProxyGeneratorTool" 37 Name="VCWebServiceProxyGeneratorTool"
38 /> 38 />
39 <Tool 39 <Tool
40 Name="VCMIDLTool" 40 Name="VCMIDLTool"
41 /> 41 />
42 <Tool 42 <Tool
43 Name="VCCLCompilerTool" 43 Name="VCCLCompilerTool"
44 Optimization="0" 44 Optimization="0"
45 FavorSizeOrSpeed="0" 45 FavorSizeOrSpeed="0"
46 WholeProgramOptimization="false" 46 WholeProgramOptimization="false"
47 AdditionalIncludeDirectories="..\..\include" 47 AdditionalIncludeDirectories="..\..\include"
48 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" 48 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
49 MinimalRebuild="true" 49 MinimalRebuild="true"
50 BasicRuntimeChecks="3" 50 BasicRuntimeChecks="3"
51 RuntimeLibrary="1" 51 RuntimeLibrary="1"
52 UsePrecompiledHeader="0" 52 UsePrecompiledHeader="0"
53 WarningLevel="3" 53 WarningLevel="3"
54 DebugInformationFormat="4" 54 DebugInformationFormat="4"
55 /> 55 />
56 <Tool 56 <Tool
57 Name="VCManagedResourceCompilerTool" 57 Name="VCManagedResourceCompilerTool"
58 /> 58 />
59 <Tool 59 <Tool
60 Name="VCResourceCompilerTool" 60 Name="VCResourceCompilerTool"
61 /> 61 />
62 <Tool 62 <Tool
63 Name="VCPreLinkEventTool" 63 Name="VCPreLinkEventTool"
64 /> 64 />
65 <Tool 65 <Tool
66 Name="VCLinkerTool" 66 Name="VCLinkerTool"
67 AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " 67 AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib "
68 OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" 68 OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe"
69 LinkIncremental="2" 69 LinkIncremental="2"
70 AdditionalLibraryDirectories="&quot;..\..\lib\Win32-visualstudio&quot;" 70 AdditionalLibraryDirectories="&quot;..\..\lib\Win32-visualstudio&quot;"
71 GenerateDebugInformation="true" 71 GenerateDebugInformation="true"
72 ProgramDatabaseFile="$(OutDir)/GUIEditor.pdb" 72 ProgramDatabaseFile="$(OutDir)/GUIEditor.pdb"
73 SubSystem="1" 73 SubSystem="1"
74 RandomizedBaseAddress="1" 74 RandomizedBaseAddress="1"
75 DataExecutionPrevention="0" 75 DataExecutionPrevention="0"
76 TargetMachine="1" 76 TargetMachine="1"
77 /> 77 />
78 <Tool 78 <Tool
79 Name="VCALinkTool" 79 Name="VCALinkTool"
80 /> 80 />
81 <Tool 81 <Tool
82 Name="VCManifestTool" 82 Name="VCManifestTool"
83 /> 83 />
84 <Tool 84 <Tool
85 Name="VCXDCMakeTool" 85 Name="VCXDCMakeTool"
86 /> 86 />
87 <Tool 87 <Tool
88 Name="VCBscMakeTool" 88 Name="VCBscMakeTool"
89 /> 89 />
90 <Tool 90 <Tool
91 Name="VCFxCopTool" 91 Name="VCFxCopTool"
92 /> 92 />
93 <Tool 93 <Tool
94 Name="VCAppVerifierTool" 94 Name="VCAppVerifierTool"
95 /> 95 />
96 <Tool 96 <Tool
97 Name="VCPostBuildEventTool" 97 Name="VCPostBuildEventTool"
98 /> 98 />
99 </Configuration> 99 </Configuration>
100 <Configuration 100 <Configuration
101 Name="Release|Win32" 101 Name="Release|Win32"
102 OutputDirectory="Release" 102 OutputDirectory="Release"
103 IntermediateDirectory="Release" 103 IntermediateDirectory="Release"
104 ConfigurationType="1" 104 ConfigurationType="1"
105 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 105 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
106 CharacterSet="2" 106 CharacterSet="2"
107 > 107 >
108 <Tool 108 <Tool
109 Name="VCPreBuildEventTool" 109 Name="VCPreBuildEventTool"
110 /> 110 />
111 <Tool 111 <Tool
112 Name="VCCustomBuildTool" 112 Name="VCCustomBuildTool"
113 /> 113 />
114 <Tool 114 <Tool
115 Name="VCXMLDataGeneratorTool" 115 Name="VCXMLDataGeneratorTool"
116 /> 116 />
117 <Tool 117 <Tool
118 Name="VCWebServiceProxyGeneratorTool" 118 Name="VCWebServiceProxyGeneratorTool"
119 /> 119 />
120 <Tool 120 <Tool
121 Name="VCMIDLTool" 121 Name="VCMIDLTool"
122 /> 122 />
123 <Tool 123 <Tool
124 Name="VCCLCompilerTool" 124 Name="VCCLCompilerTool"
125 Optimization="3" 125 Optimization="3"
126 AdditionalIncludeDirectories="..\..\include" 126 AdditionalIncludeDirectories="..\..\include"
127 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 127 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
128 RuntimeLibrary="0" 128 RuntimeLibrary="0"
129 UsePrecompiledHeader="0" 129 UsePrecompiledHeader="0"
130 WarningLevel="3" 130 WarningLevel="3"
131 Detect64BitPortabilityProblems="false" 131 Detect64BitPortabilityProblems="false"
132 DebugInformationFormat="3" 132 DebugInformationFormat="3"
133 /> 133 />
134 <Tool 134 <Tool
135 Name="VCManagedResourceCompilerTool" 135 Name="VCManagedResourceCompilerTool"
136 /> 136 />
137 <Tool 137 <Tool
138 Name="VCResourceCompilerTool" 138 Name="VCResourceCompilerTool"
139 /> 139 />
140 <Tool 140 <Tool
141 Name="VCPreLinkEventTool" 141 Name="VCPreLinkEventTool"
142 /> 142 />
143 <Tool 143 <Tool
144 Name="VCLinkerTool" 144 Name="VCLinkerTool"
145 OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" 145 OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe"
146 LinkIncremental="1" 146 LinkIncremental="1"
147 AdditionalLibraryDirectories="../../lib/Win32-Visualstudio" 147 AdditionalLibraryDirectories="../../lib/Win32-Visualstudio"
148 GenerateDebugInformation="true" 148 GenerateDebugInformation="true"
149 SubSystem="1" 149 SubSystem="1"
150 OptimizeReferences="2" 150 OptimizeReferences="2"
151 EnableCOMDATFolding="2" 151 EnableCOMDATFolding="2"
152 RandomizedBaseAddress="1" 152 RandomizedBaseAddress="1"
153 DataExecutionPrevention="0" 153 DataExecutionPrevention="0"
154 TargetMachine="1" 154 TargetMachine="1"
155 /> 155 />
156 <Tool 156 <Tool
157 Name="VCALinkTool" 157 Name="VCALinkTool"
158 /> 158 />
159 <Tool 159 <Tool
160 Name="VCManifestTool" 160 Name="VCManifestTool"
161 /> 161 />
162 <Tool 162 <Tool
163 Name="VCXDCMakeTool" 163 Name="VCXDCMakeTool"
164 /> 164 />
165 <Tool 165 <Tool
166 Name="VCBscMakeTool" 166 Name="VCBscMakeTool"
167 /> 167 />
168 <Tool 168 <Tool
169 Name="VCFxCopTool" 169 Name="VCFxCopTool"
170 /> 170 />
171 <Tool 171 <Tool
172 Name="VCAppVerifierTool" 172 Name="VCAppVerifierTool"
173 /> 173 />
174 <Tool 174 <Tool
175 Name="VCPostBuildEventTool" 175 Name="VCPostBuildEventTool"
176 /> 176 />
177 </Configuration> 177 </Configuration>
178 </Configurations> 178 </Configurations>
179 <References> 179 <References>
180 </References> 180 </References>
181 <Files> 181 <Files>
182 <Filter 182 <Filter
183 Name="gui" 183 Name="gui"
184 > 184 >
185 <File 185 <File
186 RelativePath=".\CGUIEditFactory.cpp" 186 RelativePath=".\CGUIEditFactory.cpp"
187 > 187 >
188 </File> 188 </File>
189 <File 189 <File
190 RelativePath=".\CGUIEditFactory.h" 190 RelativePath=".\CGUIEditFactory.h"
191 > 191 >
192 </File> 192 </File>
193 <File 193 <File
194 RelativePath=".\CGUIEditWindow.cpp" 194 RelativePath=".\CGUIEditWindow.cpp"
195 > 195 >
196 </File> 196 </File>
197 <File 197 <File
198 RelativePath=".\CGUIEditWindow.h" 198 RelativePath=".\CGUIEditWindow.h"
199 > 199 >
200 </File> 200 </File>
201 <File 201 <File
202 RelativePath=".\CGUIEditWorkspace.cpp" 202 RelativePath=".\CGUIEditWorkspace.cpp"
203 > 203 >
204 </File> 204 </File>
205 <File 205 <File
206 RelativePath=".\CGUIEditWorkspace.h" 206 RelativePath=".\CGUIEditWorkspace.h"
207 > 207 >
208 </File> 208 </File>
209 <File 209 <File
210 RelativePath=".\CGUITextureCacheBrowser.cpp" 210 RelativePath=".\CGUITextureCacheBrowser.cpp"
211 > 211 >
212 </File> 212 </File>
213 <File 213 <File
214 RelativePath=".\CGUITextureCacheBrowser.h" 214 RelativePath=".\CGUITextureCacheBrowser.h"
215 > 215 >
216 </File> 216 </File>
217 <Filter 217 <Filter
218 Name="GUIAttributes" 218 Name="GUIAttributes"
219 > 219 >
220 <File 220 <File
221 RelativePath=".\CGUIAttribute.h" 221 RelativePath=".\CGUIAttribute.h"
222 > 222 >
223 </File> 223 </File>
224 <File 224 <File
225 RelativePath=".\CGUIAttributeEditor.cpp" 225 RelativePath=".\CGUIAttributeEditor.cpp"
226 > 226 >
227 </File> 227 </File>
228 <File 228 <File
229 RelativePath=".\CGUIAttributeEditor.h" 229 RelativePath=".\CGUIAttributeEditor.h"
230 > 230 >
231 </File> 231 </File>
232 <File 232 <File
233 RelativePath=".\CGUIBoolAttribute.h" 233 RelativePath=".\CGUIBoolAttribute.h"
234 > 234 >
235 </File> 235 </File>
236 <File 236 <File
237 RelativePath=".\CGUIColorAttribute.h" 237 RelativePath=".\CGUIColorAttribute.h"
238 > 238 >
239 </File> 239 </File>
240 <File 240 <File
241 RelativePath=".\CGUIEnumAttribute.h" 241 RelativePath=".\CGUIEnumAttribute.h"
242 > 242 >
243 </File> 243 </File>
244 <File 244 <File
245 RelativePath=".\CGUIStringAttribute.h" 245 RelativePath=".\CGUIStringAttribute.h"
246 > 246 >
247 </File> 247 </File>
248 <File 248 <File
249 RelativePath=".\CGUITextureAttribute.h" 249 RelativePath=".\CGUITextureAttribute.h"
250 > 250 >
251 </File> 251 </File>
252 </Filter> 252 </Filter>
253 <Filter 253 <Filter
254 Name="Useful GUI Elements" 254 Name="Useful GUI Elements"
255 > 255 >
256 <File 256 <File
257 RelativePath=".\CGUIPanel.cpp" 257 RelativePath=".\CGUIPanel.cpp"
258 > 258 >
259 </File> 259 </File>
260 <File 260 <File
261 RelativePath=".\CGUIPanel.h" 261 RelativePath=".\CGUIPanel.h"
262 > 262 >
263 </File> 263 </File>
264 </Filter> 264 </Filter>
265 <Filter 265 <Filter
266 Name="Element Editors" 266 Name="Element Editors"
267 > 267 >
268 <File 268 <File
269 RelativePath=".\CGUIDummyEditorStub.h" 269 RelativePath=".\CGUIDummyEditorStub.h"
270 > 270 >
271 </File> 271 </File>
272 </Filter> 272 </Filter>
273 </Filter> 273 </Filter>
274 <Filter 274 <Filter
275 Name="io" 275 Name="io"
276 > 276 >
277 <File 277 <File
278 RelativePath=".\CMemoryReadWriteFile.cpp" 278 RelativePath=".\CMemoryReadWriteFile.cpp"
279 > 279 >
280 </File> 280 </File>
281 <File 281 <File
282 RelativePath=".\CMemoryReadWriteFile.h" 282 RelativePath=".\CMemoryReadWriteFile.h"
283 > 283 >
284 </File> 284 </File>
285 </Filter> 285 </Filter>
286 <File 286 <File
287 RelativePath=".\main.cpp" 287 RelativePath=".\main.cpp"
288 > 288 >
289 </File> 289 </File>
290 </Files> 290 </Files>
291 <Globals> 291 <Globals>
292 </Globals> 292 </Globals>
293</VisualStudioProject> 293</VisualStudioProject>
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj
index 7022876..5c85f4b 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj
@@ -1,213 +1,213 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 2<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup Label="ProjectConfigurations"> 3 <ItemGroup Label="ProjectConfigurations">
4 <ProjectConfiguration Include="Debug|Win32"> 4 <ProjectConfiguration Include="Debug|Win32">
5 <Configuration>Debug</Configuration> 5 <Configuration>Debug</Configuration>
6 <Platform>Win32</Platform> 6 <Platform>Win32</Platform>
7 </ProjectConfiguration> 7 </ProjectConfiguration>
8 <ProjectConfiguration Include="Debug|x64"> 8 <ProjectConfiguration Include="Debug|x64">
9 <Configuration>Debug</Configuration> 9 <Configuration>Debug</Configuration>
10 <Platform>x64</Platform> 10 <Platform>x64</Platform>
11 </ProjectConfiguration> 11 </ProjectConfiguration>
12 <ProjectConfiguration Include="Release|Win32"> 12 <ProjectConfiguration Include="Release|Win32">
13 <Configuration>Release</Configuration> 13 <Configuration>Release</Configuration>
14 <Platform>Win32</Platform> 14 <Platform>Win32</Platform>
15 </ProjectConfiguration> 15 </ProjectConfiguration>
16 <ProjectConfiguration Include="Release|x64"> 16 <ProjectConfiguration Include="Release|x64">
17 <Configuration>Release</Configuration> 17 <Configuration>Release</Configuration>
18 <Platform>x64</Platform> 18 <Platform>x64</Platform>
19 </ProjectConfiguration> 19 </ProjectConfiguration>
20 </ItemGroup> 20 </ItemGroup>
21 <PropertyGroup Label="Globals"> 21 <PropertyGroup Label="Globals">
22 <ProjectGuid>{853A396E-C031-4C26-A716-5B4E176BE11D}</ProjectGuid> 22 <ProjectGuid>{853A396E-C031-4C26-A716-5B4E176BE11D}</ProjectGuid>
23 <RootNamespace>GUI Editor</RootNamespace> 23 <RootNamespace>GUI Editor</RootNamespace>
24 <Keyword>Win32Proj</Keyword> 24 <Keyword>Win32Proj</Keyword>
25 <ProjectName>GUIEditor</ProjectName> 25 <ProjectName>GUIEditor</ProjectName>
26 </PropertyGroup> 26 </PropertyGroup>
27 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> 27 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> 28 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
29 <ConfigurationType>Application</ConfigurationType> 29 <ConfigurationType>Application</ConfigurationType>
30 <CharacterSet>MultiByte</CharacterSet> 30 <CharacterSet>MultiByte</CharacterSet>
31 </PropertyGroup> 31 </PropertyGroup>
32 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> 32 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
33 <ConfigurationType>Application</ConfigurationType> 33 <ConfigurationType>Application</ConfigurationType>
34 <CharacterSet>MultiByte</CharacterSet> 34 <CharacterSet>MultiByte</CharacterSet>
35 </PropertyGroup> 35 </PropertyGroup>
36 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> 36 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
37 <ConfigurationType>Application</ConfigurationType> 37 <ConfigurationType>Application</ConfigurationType>
38 <CharacterSet>MultiByte</CharacterSet> 38 <CharacterSet>MultiByte</CharacterSet>
39 </PropertyGroup> 39 </PropertyGroup>
40 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> 40 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
41 <ConfigurationType>Application</ConfigurationType> 41 <ConfigurationType>Application</ConfigurationType>
42 <CharacterSet>MultiByte</CharacterSet> 42 <CharacterSet>MultiByte</CharacterSet>
43 </PropertyGroup> 43 </PropertyGroup>
44 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> 44 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
45 <ImportGroup Label="ExtensionSettings"> 45 <ImportGroup Label="ExtensionSettings">
46 </ImportGroup> 46 </ImportGroup>
47 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> 47 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
48 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 48 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
49 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> 49 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
50 </ImportGroup> 50 </ImportGroup>
51 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> 51 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
52 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 52 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
53 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> 53 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
54 </ImportGroup> 54 </ImportGroup>
55 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> 55 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
56 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 56 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
57 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> 57 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
58 </ImportGroup> 58 </ImportGroup>
59 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> 59 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
60 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 60 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
61 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> 61 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
62 </ImportGroup> 62 </ImportGroup>
63 <PropertyGroup Label="UserMacros" /> 63 <PropertyGroup Label="UserMacros" />
64 <PropertyGroup> 64 <PropertyGroup>
65 <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> 65 <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
66 <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> 66 <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
67 <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> 67 <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
68 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> 68 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
69 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> 69 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
70 <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> 70 <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
71 <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> 71 <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
72 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> 72 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
73 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> 73 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
74 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> 74 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
75 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> 75 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
76 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> 76 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
77 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> 77 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
78 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> 78 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
79 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> 79 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
80 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> 80 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
81 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> 81 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
82 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> 82 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
83 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> 83 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
84 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> 84 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
85 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> 85 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
86 </PropertyGroup> 86 </PropertyGroup>
87 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> 87 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
88 <ClCompile> 88 <ClCompile>
89 <Optimization>Disabled</Optimization> 89 <Optimization>Disabled</Optimization>
90 <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> 90 <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
91 <WholeProgramOptimization>false</WholeProgramOptimization> 91 <WholeProgramOptimization>false</WholeProgramOptimization>
92 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 92 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
93 <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 93 <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
94 <MinimalRebuild>true</MinimalRebuild> 94 <MinimalRebuild>true</MinimalRebuild>
95 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> 95 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
96 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> 96 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
97 <PrecompiledHeader> 97 <PrecompiledHeader>
98 </PrecompiledHeader> 98 </PrecompiledHeader>
99 <WarningLevel>Level3</WarningLevel> 99 <WarningLevel>Level3</WarningLevel>
100 <DebugInformationFormat>EditAndContinue</DebugInformationFormat> 100 <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
101 </ClCompile> 101 </ClCompile>
102 <Link> 102 <Link>
103 <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> 103 <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions>
104 <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 104 <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
105 <GenerateDebugInformation>true</GenerateDebugInformation> 105 <GenerateDebugInformation>true</GenerateDebugInformation>
106 <SubSystem>Console</SubSystem> 106 <SubSystem>Console</SubSystem>
107 <DataExecutionPrevention> 107 <DataExecutionPrevention>
108 </DataExecutionPrevention> 108 </DataExecutionPrevention>
109 </Link> 109 </Link>
110 </ItemDefinitionGroup> 110 </ItemDefinitionGroup>
111 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> 111 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
112 <ClCompile> 112 <ClCompile>
113 <Optimization>Disabled</Optimization> 113 <Optimization>Disabled</Optimization>
114 <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> 114 <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
115 <WholeProgramOptimization>false</WholeProgramOptimization> 115 <WholeProgramOptimization>false</WholeProgramOptimization>
116 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 116 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
117 <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 117 <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
118 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> 118 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
119 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> 119 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
120 <PrecompiledHeader> 120 <PrecompiledHeader>
121 </PrecompiledHeader> 121 </PrecompiledHeader>
122 <WarningLevel>Level3</WarningLevel> 122 <WarningLevel>Level3</WarningLevel>
123 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> 123 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
124 </ClCompile> 124 </ClCompile>
125 <Link> 125 <Link>
126 <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> 126 <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions>
127 <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 127 <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
128 <GenerateDebugInformation>true</GenerateDebugInformation> 128 <GenerateDebugInformation>true</GenerateDebugInformation>
129 <SubSystem>Console</SubSystem> 129 <SubSystem>Console</SubSystem>
130 <DataExecutionPrevention> 130 <DataExecutionPrevention>
131 </DataExecutionPrevention> 131 </DataExecutionPrevention>
132 </Link> 132 </Link>
133 </ItemDefinitionGroup> 133 </ItemDefinitionGroup>
134 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> 134 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
135 <ClCompile> 135 <ClCompile>
136 <Optimization>Full</Optimization> 136 <Optimization>Full</Optimization>
137 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 137 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
138 <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 138 <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
139 <RuntimeLibrary>MultiThreaded</RuntimeLibrary> 139 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
140 <PrecompiledHeader> 140 <PrecompiledHeader>
141 </PrecompiledHeader> 141 </PrecompiledHeader>
142 <WarningLevel>Level3</WarningLevel> 142 <WarningLevel>Level3</WarningLevel>
143 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> 143 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
144 </ClCompile> 144 </ClCompile>
145 <Link> 145 <Link>
146 <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> 146 <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile>
147 <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 147 <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
148 <GenerateDebugInformation>true</GenerateDebugInformation> 148 <GenerateDebugInformation>true</GenerateDebugInformation>
149 <SubSystem>Console</SubSystem> 149 <SubSystem>Console</SubSystem>
150 <OptimizeReferences>true</OptimizeReferences> 150 <OptimizeReferences>true</OptimizeReferences>
151 <EnableCOMDATFolding>true</EnableCOMDATFolding> 151 <EnableCOMDATFolding>true</EnableCOMDATFolding>
152 <DataExecutionPrevention> 152 <DataExecutionPrevention>
153 </DataExecutionPrevention> 153 </DataExecutionPrevention>
154 </Link> 154 </Link>
155 </ItemDefinitionGroup> 155 </ItemDefinitionGroup>
156 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> 156 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
157 <ClCompile> 157 <ClCompile>
158 <Optimization>Full</Optimization> 158 <Optimization>Full</Optimization>
159 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 159 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
160 <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 160 <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
161 <RuntimeLibrary>MultiThreaded</RuntimeLibrary> 161 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
162 <PrecompiledHeader> 162 <PrecompiledHeader>
163 </PrecompiledHeader> 163 </PrecompiledHeader>
164 <WarningLevel>Level3</WarningLevel> 164 <WarningLevel>Level3</WarningLevel>
165 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> 165 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
166 </ClCompile> 166 </ClCompile>
167 <Link> 167 <Link>
168 <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> 168 <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile>
169 <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 169 <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
170 <GenerateDebugInformation>true</GenerateDebugInformation> 170 <GenerateDebugInformation>true</GenerateDebugInformation>
171 <SubSystem>Console</SubSystem> 171 <SubSystem>Console</SubSystem>
172 <OptimizeReferences>true</OptimizeReferences> 172 <OptimizeReferences>true</OptimizeReferences>
173 <EnableCOMDATFolding>true</EnableCOMDATFolding> 173 <EnableCOMDATFolding>true</EnableCOMDATFolding>
174 <DataExecutionPrevention> 174 <DataExecutionPrevention>
175 </DataExecutionPrevention> 175 </DataExecutionPrevention>
176 </Link> 176 </Link>
177 </ItemDefinitionGroup> 177 </ItemDefinitionGroup>
178 <ItemGroup> 178 <ItemGroup>
179 <ClCompile Include="CGUIEditFactory.cpp" /> 179 <ClCompile Include="CGUIEditFactory.cpp" />
180 <ClCompile Include="CGUIEditWindow.cpp" /> 180 <ClCompile Include="CGUIEditWindow.cpp" />
181 <ClCompile Include="CGUIEditWorkspace.cpp" /> 181 <ClCompile Include="CGUIEditWorkspace.cpp" />
182 <ClCompile Include="CGUITextureCacheBrowser.cpp" /> 182 <ClCompile Include="CGUITextureCacheBrowser.cpp" />
183 <ClCompile Include="CGUIAttributeEditor.cpp" /> 183 <ClCompile Include="CGUIAttributeEditor.cpp" />
184 <ClCompile Include="CGUIPanel.cpp" /> 184 <ClCompile Include="CGUIPanel.cpp" />
185 <ClCompile Include="CMemoryReadWriteFile.cpp" /> 185 <ClCompile Include="CMemoryReadWriteFile.cpp" />
186 <ClCompile Include="main.cpp" /> 186 <ClCompile Include="main.cpp" />
187 </ItemGroup> 187 </ItemGroup>
188 <ItemGroup> 188 <ItemGroup>
189 <ClInclude Include="CGUIEditFactory.h" /> 189 <ClInclude Include="CGUIEditFactory.h" />
190 <ClInclude Include="CGUIEditWindow.h" /> 190 <ClInclude Include="CGUIEditWindow.h" />
191 <ClInclude Include="CGUIEditWorkspace.h" /> 191 <ClInclude Include="CGUIEditWorkspace.h" />
192 <ClInclude Include="CGUITextureCacheBrowser.h" /> 192 <ClInclude Include="CGUITextureCacheBrowser.h" />
193 <ClInclude Include="CGUIAttribute.h" /> 193 <ClInclude Include="CGUIAttribute.h" />
194 <ClInclude Include="CGUIAttributeEditor.h" /> 194 <ClInclude Include="CGUIAttributeEditor.h" />
195 <ClInclude Include="CGUIBoolAttribute.h" /> 195 <ClInclude Include="CGUIBoolAttribute.h" />
196 <ClInclude Include="CGUIColorAttribute.h" /> 196 <ClInclude Include="CGUIColorAttribute.h" />
197 <ClInclude Include="CGUIEnumAttribute.h" /> 197 <ClInclude Include="CGUIEnumAttribute.h" />
198 <ClInclude Include="CGUIStringAttribute.h" /> 198 <ClInclude Include="CGUIStringAttribute.h" />
199 <ClInclude Include="CGUITextureAttribute.h" /> 199 <ClInclude Include="CGUITextureAttribute.h" />
200 <ClInclude Include="CGUIPanel.h" /> 200 <ClInclude Include="CGUIPanel.h" />
201 <ClInclude Include="CGUIDummyEditorStub.h" /> 201 <ClInclude Include="CGUIDummyEditorStub.h" />
202 <ClInclude Include="CMemoryReadWriteFile.h" /> 202 <ClInclude Include="CMemoryReadWriteFile.h" />
203 </ItemGroup> 203 </ItemGroup>
204 <ItemGroup> 204 <ItemGroup>
205 <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> 205 <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj">
206 <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> 206 <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project>
207 <ReferenceOutputAssembly>false</ReferenceOutputAssembly> 207 <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
208 </ProjectReference> 208 </ProjectReference>
209 </ItemGroup> 209 </ItemGroup>
210 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> 210 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
211 <ImportGroup Label="ExtensionTargets"> 211 <ImportGroup Label="ExtensionTargets">
212 </ImportGroup> 212 </ImportGroup>
213</Project> \ No newline at end of file 213</Project> \ No newline at end of file
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters
index 1d06fa4..3644f98 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters
@@ -1,88 +1,88 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup> 3 <ItemGroup>
4 <Filter Include="gui"> 4 <Filter Include="gui">
5 <UniqueIdentifier>{f6ad9df9-ebaa-4c0f-997b-c8101c1fc669}</UniqueIdentifier> 5 <UniqueIdentifier>{f6ad9df9-ebaa-4c0f-997b-c8101c1fc669}</UniqueIdentifier>
6 </Filter> 6 </Filter>
7 <Filter Include="gui\GUIAttributes"> 7 <Filter Include="gui\GUIAttributes">
8 <UniqueIdentifier>{7fd14cb1-d2e7-4fd0-85c1-68fc9d1249f7}</UniqueIdentifier> 8 <UniqueIdentifier>{7fd14cb1-d2e7-4fd0-85c1-68fc9d1249f7}</UniqueIdentifier>
9 </Filter> 9 </Filter>
10 <Filter Include="gui\Useful GUI Elements"> 10 <Filter Include="gui\Useful GUI Elements">
11 <UniqueIdentifier>{ab2c3f3a-1d99-4619-b5df-47fdd9449f3f}</UniqueIdentifier> 11 <UniqueIdentifier>{ab2c3f3a-1d99-4619-b5df-47fdd9449f3f}</UniqueIdentifier>
12 </Filter> 12 </Filter>
13 <Filter Include="gui\Element Editors"> 13 <Filter Include="gui\Element Editors">
14 <UniqueIdentifier>{740a4255-37cc-4ac4-94e9-f2f0970491a8}</UniqueIdentifier> 14 <UniqueIdentifier>{740a4255-37cc-4ac4-94e9-f2f0970491a8}</UniqueIdentifier>
15 </Filter> 15 </Filter>
16 <Filter Include="io"> 16 <Filter Include="io">
17 <UniqueIdentifier>{a28a0b21-3336-432f-9759-ff2dc064874a}</UniqueIdentifier> 17 <UniqueIdentifier>{a28a0b21-3336-432f-9759-ff2dc064874a}</UniqueIdentifier>
18 </Filter> 18 </Filter>
19 </ItemGroup> 19 </ItemGroup>
20 <ItemGroup> 20 <ItemGroup>
21 <ClCompile Include="CGUIEditFactory.cpp"> 21 <ClCompile Include="CGUIEditFactory.cpp">
22 <Filter>gui</Filter> 22 <Filter>gui</Filter>
23 </ClCompile> 23 </ClCompile>
24 <ClCompile Include="CGUIEditWindow.cpp"> 24 <ClCompile Include="CGUIEditWindow.cpp">
25 <Filter>gui</Filter> 25 <Filter>gui</Filter>
26 </ClCompile> 26 </ClCompile>
27 <ClCompile Include="CGUIEditWorkspace.cpp"> 27 <ClCompile Include="CGUIEditWorkspace.cpp">
28 <Filter>gui</Filter> 28 <Filter>gui</Filter>
29 </ClCompile> 29 </ClCompile>
30 <ClCompile Include="CGUITextureCacheBrowser.cpp"> 30 <ClCompile Include="CGUITextureCacheBrowser.cpp">
31 <Filter>gui</Filter> 31 <Filter>gui</Filter>
32 </ClCompile> 32 </ClCompile>
33 <ClCompile Include="CGUIAttributeEditor.cpp"> 33 <ClCompile Include="CGUIAttributeEditor.cpp">
34 <Filter>gui\GUIAttributes</Filter> 34 <Filter>gui\GUIAttributes</Filter>
35 </ClCompile> 35 </ClCompile>
36 <ClCompile Include="CGUIPanel.cpp"> 36 <ClCompile Include="CGUIPanel.cpp">
37 <Filter>gui\Useful GUI Elements</Filter> 37 <Filter>gui\Useful GUI Elements</Filter>
38 </ClCompile> 38 </ClCompile>
39 <ClCompile Include="CMemoryReadWriteFile.cpp"> 39 <ClCompile Include="CMemoryReadWriteFile.cpp">
40 <Filter>io</Filter> 40 <Filter>io</Filter>
41 </ClCompile> 41 </ClCompile>
42 <ClCompile Include="main.cpp" /> 42 <ClCompile Include="main.cpp" />
43 </ItemGroup> 43 </ItemGroup>
44 <ItemGroup> 44 <ItemGroup>
45 <ClInclude Include="CGUIEditFactory.h"> 45 <ClInclude Include="CGUIEditFactory.h">
46 <Filter>gui</Filter> 46 <Filter>gui</Filter>
47 </ClInclude> 47 </ClInclude>
48 <ClInclude Include="CGUIEditWindow.h"> 48 <ClInclude Include="CGUIEditWindow.h">
49 <Filter>gui</Filter> 49 <Filter>gui</Filter>
50 </ClInclude> 50 </ClInclude>
51 <ClInclude Include="CGUIEditWorkspace.h"> 51 <ClInclude Include="CGUIEditWorkspace.h">
52 <Filter>gui</Filter> 52 <Filter>gui</Filter>
53 </ClInclude> 53 </ClInclude>
54 <ClInclude Include="CGUITextureCacheBrowser.h"> 54 <ClInclude Include="CGUITextureCacheBrowser.h">
55 <Filter>gui</Filter> 55 <Filter>gui</Filter>
56 </ClInclude> 56 </ClInclude>
57 <ClInclude Include="CGUIAttribute.h"> 57 <ClInclude Include="CGUIAttribute.h">
58 <Filter>gui\GUIAttributes</Filter> 58 <Filter>gui\GUIAttributes</Filter>
59 </ClInclude> 59 </ClInclude>
60 <ClInclude Include="CGUIAttributeEditor.h"> 60 <ClInclude Include="CGUIAttributeEditor.h">
61 <Filter>gui\GUIAttributes</Filter> 61 <Filter>gui\GUIAttributes</Filter>
62 </ClInclude> 62 </ClInclude>
63 <ClInclude Include="CGUIBoolAttribute.h"> 63 <ClInclude Include="CGUIBoolAttribute.h">
64 <Filter>gui\GUIAttributes</Filter> 64 <Filter>gui\GUIAttributes</Filter>
65 </ClInclude> 65 </ClInclude>
66 <ClInclude Include="CGUIColorAttribute.h"> 66 <ClInclude Include="CGUIColorAttribute.h">
67 <Filter>gui\GUIAttributes</Filter> 67 <Filter>gui\GUIAttributes</Filter>
68 </ClInclude> 68 </ClInclude>
69 <ClInclude Include="CGUIEnumAttribute.h"> 69 <ClInclude Include="CGUIEnumAttribute.h">
70 <Filter>gui\GUIAttributes</Filter> 70 <Filter>gui\GUIAttributes</Filter>
71 </ClInclude> 71 </ClInclude>
72 <ClInclude Include="CGUIStringAttribute.h"> 72 <ClInclude Include="CGUIStringAttribute.h">
73 <Filter>gui\GUIAttributes</Filter> 73 <Filter>gui\GUIAttributes</Filter>
74 </ClInclude> 74 </ClInclude>
75 <ClInclude Include="CGUITextureAttribute.h"> 75 <ClInclude Include="CGUITextureAttribute.h">
76 <Filter>gui\GUIAttributes</Filter> 76 <Filter>gui\GUIAttributes</Filter>
77 </ClInclude> 77 </ClInclude>
78 <ClInclude Include="CGUIPanel.h"> 78 <ClInclude Include="CGUIPanel.h">
79 <Filter>gui\Useful GUI Elements</Filter> 79 <Filter>gui\Useful GUI Elements</Filter>
80 </ClInclude> 80 </ClInclude>
81 <ClInclude Include="CGUIDummyEditorStub.h"> 81 <ClInclude Include="CGUIDummyEditorStub.h">
82 <Filter>gui\Element Editors</Filter> 82 <Filter>gui\Element Editors</Filter>
83 </ClInclude> 83 </ClInclude>
84 <ClInclude Include="CMemoryReadWriteFile.h"> 84 <ClInclude Include="CMemoryReadWriteFile.h">
85 <Filter>io</Filter> 85 <Filter>io</Filter>
86 </ClInclude> 86 </ClInclude>
87 </ItemGroup> 87 </ItemGroup>
88</Project> \ No newline at end of file 88</Project> \ No newline at end of file
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj
index 6c6f28b..d2dc2e3 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj
@@ -1,217 +1,217 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 2<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup Label="ProjectConfigurations"> 3 <ItemGroup Label="ProjectConfigurations">
4 <ProjectConfiguration Include="Debug|Win32"> 4 <ProjectConfiguration Include="Debug|Win32">
5 <Configuration>Debug</Configuration> 5 <Configuration>Debug</Configuration>
6 <Platform>Win32</Platform> 6 <Platform>Win32</Platform>
7 </ProjectConfiguration> 7 </ProjectConfiguration>
8 <ProjectConfiguration Include="Debug|x64"> 8 <ProjectConfiguration Include="Debug|x64">
9 <Configuration>Debug</Configuration> 9 <Configuration>Debug</Configuration>
10 <Platform>x64</Platform> 10 <Platform>x64</Platform>
11 </ProjectConfiguration> 11 </ProjectConfiguration>
12 <ProjectConfiguration Include="Release|Win32"> 12 <ProjectConfiguration Include="Release|Win32">
13 <Configuration>Release</Configuration> 13 <Configuration>Release</Configuration>
14 <Platform>Win32</Platform> 14 <Platform>Win32</Platform>
15 </ProjectConfiguration> 15 </ProjectConfiguration>
16 <ProjectConfiguration Include="Release|x64"> 16 <ProjectConfiguration Include="Release|x64">
17 <Configuration>Release</Configuration> 17 <Configuration>Release</Configuration>
18 <Platform>x64</Platform> 18 <Platform>x64</Platform>
19 </ProjectConfiguration> 19 </ProjectConfiguration>
20 </ItemGroup> 20 </ItemGroup>
21 <PropertyGroup Label="Globals"> 21 <PropertyGroup Label="Globals">
22 <ProjectGuid>{853A396E-C031-4C26-A716-5B4E176BE11D}</ProjectGuid> 22 <ProjectGuid>{853A396E-C031-4C26-A716-5B4E176BE11D}</ProjectGuid>
23 <RootNamespace>GUI Editor</RootNamespace> 23 <RootNamespace>GUI Editor</RootNamespace>
24 <Keyword>Win32Proj</Keyword> 24 <Keyword>Win32Proj</Keyword>
25 <ProjectName>GUIEditor</ProjectName> 25 <ProjectName>GUIEditor</ProjectName>
26 </PropertyGroup> 26 </PropertyGroup>
27 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> 27 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> 28 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
29 <ConfigurationType>Application</ConfigurationType> 29 <ConfigurationType>Application</ConfigurationType>
30 <CharacterSet>MultiByte</CharacterSet> 30 <CharacterSet>MultiByte</CharacterSet>
31 <PlatformToolset>v110</PlatformToolset> 31 <PlatformToolset>v110</PlatformToolset>
32 </PropertyGroup> 32 </PropertyGroup>
33 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> 33 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
34 <ConfigurationType>Application</ConfigurationType> 34 <ConfigurationType>Application</ConfigurationType>
35 <CharacterSet>MultiByte</CharacterSet> 35 <CharacterSet>MultiByte</CharacterSet>
36 <PlatformToolset>v110</PlatformToolset> 36 <PlatformToolset>v110</PlatformToolset>
37 </PropertyGroup> 37 </PropertyGroup>
38 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> 38 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
39 <ConfigurationType>Application</ConfigurationType> 39 <ConfigurationType>Application</ConfigurationType>
40 <CharacterSet>MultiByte</CharacterSet> 40 <CharacterSet>MultiByte</CharacterSet>
41 <PlatformToolset>v110</PlatformToolset> 41 <PlatformToolset>v110</PlatformToolset>
42 </PropertyGroup> 42 </PropertyGroup>
43 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> 43 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
44 <ConfigurationType>Application</ConfigurationType> 44 <ConfigurationType>Application</ConfigurationType>
45 <CharacterSet>MultiByte</CharacterSet> 45 <CharacterSet>MultiByte</CharacterSet>
46 <PlatformToolset>v110</PlatformToolset> 46 <PlatformToolset>v110</PlatformToolset>
47 </PropertyGroup> 47 </PropertyGroup>
48 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> 48 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
49 <ImportGroup Label="ExtensionSettings"> 49 <ImportGroup Label="ExtensionSettings">
50 </ImportGroup> 50 </ImportGroup>
51 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> 51 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
52 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 52 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
53 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> 53 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
54 </ImportGroup> 54 </ImportGroup>
55 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> 55 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
56 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 56 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
57 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> 57 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
58 </ImportGroup> 58 </ImportGroup>
59 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> 59 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
60 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 60 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
61 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> 61 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
62 </ImportGroup> 62 </ImportGroup>
63 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> 63 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
64 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 64 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> 65 <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
66 </ImportGroup> 66 </ImportGroup>
67 <PropertyGroup Label="UserMacros" /> 67 <PropertyGroup Label="UserMacros" />
68 <PropertyGroup> 68 <PropertyGroup>
69 <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> 69 <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
70 <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> 70 <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
71 <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> 71 <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
72 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> 72 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
73 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> 73 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
74 <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> 74 <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir>
75 <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> 75 <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir>
76 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> 76 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
77 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> 77 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
78 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> 78 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
79 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> 79 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
80 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> 80 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
81 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> 81 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
82 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> 82 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
83 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> 83 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
84 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> 84 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
85 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> 85 <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
86 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> 86 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
87 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> 87 <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
88 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> 88 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
89 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> 89 <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
90 </PropertyGroup> 90 </PropertyGroup>
91 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> 91 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
92 <ClCompile> 92 <ClCompile>
93 <Optimization>Disabled</Optimization> 93 <Optimization>Disabled</Optimization>
94 <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> 94 <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
95 <WholeProgramOptimization>false</WholeProgramOptimization> 95 <WholeProgramOptimization>false</WholeProgramOptimization>
96 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 96 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
97 <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 97 <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
98 <MinimalRebuild>true</MinimalRebuild> 98 <MinimalRebuild>true</MinimalRebuild>
99 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> 99 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
100 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> 100 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
101 <PrecompiledHeader> 101 <PrecompiledHeader>
102 </PrecompiledHeader> 102 </PrecompiledHeader>
103 <WarningLevel>Level3</WarningLevel> 103 <WarningLevel>Level3</WarningLevel>
104 <DebugInformationFormat>EditAndContinue</DebugInformationFormat> 104 <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
105 </ClCompile> 105 </ClCompile>
106 <Link> 106 <Link>
107 <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> 107 <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions>
108 <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 108 <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
109 <GenerateDebugInformation>true</GenerateDebugInformation> 109 <GenerateDebugInformation>true</GenerateDebugInformation>
110 <SubSystem>Console</SubSystem> 110 <SubSystem>Console</SubSystem>
111 <DataExecutionPrevention> 111 <DataExecutionPrevention>
112 </DataExecutionPrevention> 112 </DataExecutionPrevention>
113 </Link> 113 </Link>
114 </ItemDefinitionGroup> 114 </ItemDefinitionGroup>
115 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> 115 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
116 <ClCompile> 116 <ClCompile>
117 <Optimization>Disabled</Optimization> 117 <Optimization>Disabled</Optimization>
118 <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> 118 <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
119 <WholeProgramOptimization>false</WholeProgramOptimization> 119 <WholeProgramOptimization>false</WholeProgramOptimization>
120 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 120 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
121 <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 121 <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
122 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> 122 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
123 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> 123 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
124 <PrecompiledHeader> 124 <PrecompiledHeader>
125 </PrecompiledHeader> 125 </PrecompiledHeader>
126 <WarningLevel>Level3</WarningLevel> 126 <WarningLevel>Level3</WarningLevel>
127 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> 127 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
128 </ClCompile> 128 </ClCompile>
129 <Link> 129 <Link>
130 <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> 130 <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions>
131 <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 131 <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
132 <GenerateDebugInformation>true</GenerateDebugInformation> 132 <GenerateDebugInformation>true</GenerateDebugInformation>
133 <SubSystem>Console</SubSystem> 133 <SubSystem>Console</SubSystem>
134 <DataExecutionPrevention> 134 <DataExecutionPrevention>
135 </DataExecutionPrevention> 135 </DataExecutionPrevention>
136 </Link> 136 </Link>
137 </ItemDefinitionGroup> 137 </ItemDefinitionGroup>
138 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> 138 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
139 <ClCompile> 139 <ClCompile>
140 <Optimization>Full</Optimization> 140 <Optimization>Full</Optimization>
141 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 141 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
142 <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 142 <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143 <RuntimeLibrary>MultiThreaded</RuntimeLibrary> 143 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
144 <PrecompiledHeader> 144 <PrecompiledHeader>
145 </PrecompiledHeader> 145 </PrecompiledHeader>
146 <WarningLevel>Level3</WarningLevel> 146 <WarningLevel>Level3</WarningLevel>
147 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> 147 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
148 </ClCompile> 148 </ClCompile>
149 <Link> 149 <Link>
150 <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> 150 <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile>
151 <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 151 <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
152 <GenerateDebugInformation>true</GenerateDebugInformation> 152 <GenerateDebugInformation>true</GenerateDebugInformation>
153 <SubSystem>Console</SubSystem> 153 <SubSystem>Console</SubSystem>
154 <OptimizeReferences>true</OptimizeReferences> 154 <OptimizeReferences>true</OptimizeReferences>
155 <EnableCOMDATFolding>true</EnableCOMDATFolding> 155 <EnableCOMDATFolding>true</EnableCOMDATFolding>
156 <DataExecutionPrevention> 156 <DataExecutionPrevention>
157 </DataExecutionPrevention> 157 </DataExecutionPrevention>
158 </Link> 158 </Link>
159 </ItemDefinitionGroup> 159 </ItemDefinitionGroup>
160 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> 160 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
161 <ClCompile> 161 <ClCompile>
162 <Optimization>Full</Optimization> 162 <Optimization>Full</Optimization>
163 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 163 <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
164 <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 164 <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
165 <RuntimeLibrary>MultiThreaded</RuntimeLibrary> 165 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
166 <PrecompiledHeader> 166 <PrecompiledHeader>
167 </PrecompiledHeader> 167 </PrecompiledHeader>
168 <WarningLevel>Level3</WarningLevel> 168 <WarningLevel>Level3</WarningLevel>
169 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> 169 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
170 </ClCompile> 170 </ClCompile>
171 <Link> 171 <Link>
172 <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> 172 <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile>
173 <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 173 <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
174 <GenerateDebugInformation>true</GenerateDebugInformation> 174 <GenerateDebugInformation>true</GenerateDebugInformation>
175 <SubSystem>Console</SubSystem> 175 <SubSystem>Console</SubSystem>
176 <OptimizeReferences>true</OptimizeReferences> 176 <OptimizeReferences>true</OptimizeReferences>
177 <EnableCOMDATFolding>true</EnableCOMDATFolding> 177 <EnableCOMDATFolding>true</EnableCOMDATFolding>
178 <DataExecutionPrevention> 178 <DataExecutionPrevention>
179 </DataExecutionPrevention> 179 </DataExecutionPrevention>
180 </Link> 180 </Link>
181 </ItemDefinitionGroup> 181 </ItemDefinitionGroup>
182 <ItemGroup> 182 <ItemGroup>
183 <ClCompile Include="CGUIEditFactory.cpp" /> 183 <ClCompile Include="CGUIEditFactory.cpp" />
184 <ClCompile Include="CGUIEditWindow.cpp" /> 184 <ClCompile Include="CGUIEditWindow.cpp" />
185 <ClCompile Include="CGUIEditWorkspace.cpp" /> 185 <ClCompile Include="CGUIEditWorkspace.cpp" />
186 <ClCompile Include="CGUITextureCacheBrowser.cpp" /> 186 <ClCompile Include="CGUITextureCacheBrowser.cpp" />
187 <ClCompile Include="CGUIAttributeEditor.cpp" /> 187 <ClCompile Include="CGUIAttributeEditor.cpp" />
188 <ClCompile Include="CGUIPanel.cpp" /> 188 <ClCompile Include="CGUIPanel.cpp" />
189 <ClCompile Include="CMemoryReadWriteFile.cpp" /> 189 <ClCompile Include="CMemoryReadWriteFile.cpp" />
190 <ClCompile Include="main.cpp" /> 190 <ClCompile Include="main.cpp" />
191 </ItemGroup> 191 </ItemGroup>
192 <ItemGroup> 192 <ItemGroup>
193 <ClInclude Include="CGUIEditFactory.h" /> 193 <ClInclude Include="CGUIEditFactory.h" />
194 <ClInclude Include="CGUIEditWindow.h" /> 194 <ClInclude Include="CGUIEditWindow.h" />
195 <ClInclude Include="CGUIEditWorkspace.h" /> 195 <ClInclude Include="CGUIEditWorkspace.h" />
196 <ClInclude Include="CGUITextureCacheBrowser.h" /> 196 <ClInclude Include="CGUITextureCacheBrowser.h" />
197 <ClInclude Include="CGUIAttribute.h" /> 197 <ClInclude Include="CGUIAttribute.h" />
198 <ClInclude Include="CGUIAttributeEditor.h" /> 198 <ClInclude Include="CGUIAttributeEditor.h" />
199 <ClInclude Include="CGUIBoolAttribute.h" /> 199 <ClInclude Include="CGUIBoolAttribute.h" />
200 <ClInclude Include="CGUIColorAttribute.h" /> 200 <ClInclude Include="CGUIColorAttribute.h" />
201 <ClInclude Include="CGUIEnumAttribute.h" /> 201 <ClInclude Include="CGUIEnumAttribute.h" />
202 <ClInclude Include="CGUIStringAttribute.h" /> 202 <ClInclude Include="CGUIStringAttribute.h" />
203 <ClInclude Include="CGUITextureAttribute.h" /> 203 <ClInclude Include="CGUITextureAttribute.h" />
204 <ClInclude Include="CGUIPanel.h" /> 204 <ClInclude Include="CGUIPanel.h" />
205 <ClInclude Include="CGUIDummyEditorStub.h" /> 205 <ClInclude Include="CGUIDummyEditorStub.h" />
206 <ClInclude Include="CMemoryReadWriteFile.h" /> 206 <ClInclude Include="CMemoryReadWriteFile.h" />
207 </ItemGroup> 207 </ItemGroup>
208 <ItemGroup> 208 <ItemGroup>
209 <ProjectReference Include="..\..\source\Irrlicht\Irrlicht11.0.vcxproj"> 209 <ProjectReference Include="..\..\source\Irrlicht\Irrlicht11.0.vcxproj">
210 <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> 210 <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project>
211 <ReferenceOutputAssembly>false</ReferenceOutputAssembly> 211 <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
212 </ProjectReference> 212 </ProjectReference>
213 </ItemGroup> 213 </ItemGroup>
214 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> 214 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
215 <ImportGroup Label="ExtensionTargets"> 215 <ImportGroup Label="ExtensionTargets">
216 </ImportGroup> 216 </ImportGroup>
217</Project> \ No newline at end of file 217</Project> \ No newline at end of file
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters
index 1d06fa4..3644f98 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters
@@ -1,88 +1,88 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup> 3 <ItemGroup>
4 <Filter Include="gui"> 4 <Filter Include="gui">
5 <UniqueIdentifier>{f6ad9df9-ebaa-4c0f-997b-c8101c1fc669}</UniqueIdentifier> 5 <UniqueIdentifier>{f6ad9df9-ebaa-4c0f-997b-c8101c1fc669}</UniqueIdentifier>
6 </Filter> 6 </Filter>
7 <Filter Include="gui\GUIAttributes"> 7 <Filter Include="gui\GUIAttributes">
8 <UniqueIdentifier>{7fd14cb1-d2e7-4fd0-85c1-68fc9d1249f7}</UniqueIdentifier> 8 <UniqueIdentifier>{7fd14cb1-d2e7-4fd0-85c1-68fc9d1249f7}</UniqueIdentifier>
9 </Filter> 9 </Filter>
10 <Filter Include="gui\Useful GUI Elements"> 10 <Filter Include="gui\Useful GUI Elements">
11 <UniqueIdentifier>{ab2c3f3a-1d99-4619-b5df-47fdd9449f3f}</UniqueIdentifier> 11 <UniqueIdentifier>{ab2c3f3a-1d99-4619-b5df-47fdd9449f3f}</UniqueIdentifier>
12 </Filter> 12 </Filter>
13 <Filter Include="gui\Element Editors"> 13 <Filter Include="gui\Element Editors">
14 <UniqueIdentifier>{740a4255-37cc-4ac4-94e9-f2f0970491a8}</UniqueIdentifier> 14 <UniqueIdentifier>{740a4255-37cc-4ac4-94e9-f2f0970491a8}</UniqueIdentifier>
15 </Filter> 15 </Filter>
16 <Filter Include="io"> 16 <Filter Include="io">
17 <UniqueIdentifier>{a28a0b21-3336-432f-9759-ff2dc064874a}</UniqueIdentifier> 17 <UniqueIdentifier>{a28a0b21-3336-432f-9759-ff2dc064874a}</UniqueIdentifier>
18 </Filter> 18 </Filter>
19 </ItemGroup> 19 </ItemGroup>
20 <ItemGroup> 20 <ItemGroup>
21 <ClCompile Include="CGUIEditFactory.cpp"> 21 <ClCompile Include="CGUIEditFactory.cpp">
22 <Filter>gui</Filter> 22 <Filter>gui</Filter>
23 </ClCompile> 23 </ClCompile>
24 <ClCompile Include="CGUIEditWindow.cpp"> 24 <ClCompile Include="CGUIEditWindow.cpp">
25 <Filter>gui</Filter> 25 <Filter>gui</Filter>
26 </ClCompile> 26 </ClCompile>
27 <ClCompile Include="CGUIEditWorkspace.cpp"> 27 <ClCompile Include="CGUIEditWorkspace.cpp">
28 <Filter>gui</Filter> 28 <Filter>gui</Filter>
29 </ClCompile> 29 </ClCompile>
30 <ClCompile Include="CGUITextureCacheBrowser.cpp"> 30 <ClCompile Include="CGUITextureCacheBrowser.cpp">
31 <Filter>gui</Filter> 31 <Filter>gui</Filter>
32 </ClCompile> 32 </ClCompile>
33 <ClCompile Include="CGUIAttributeEditor.cpp"> 33 <ClCompile Include="CGUIAttributeEditor.cpp">
34 <Filter>gui\GUIAttributes</Filter> 34 <Filter>gui\GUIAttributes</Filter>
35 </ClCompile> 35 </ClCompile>
36 <ClCompile Include="CGUIPanel.cpp"> 36 <ClCompile Include="CGUIPanel.cpp">
37 <Filter>gui\Useful GUI Elements</Filter> 37 <Filter>gui\Useful GUI Elements</Filter>
38 </ClCompile> 38 </ClCompile>
39 <ClCompile Include="CMemoryReadWriteFile.cpp"> 39 <ClCompile Include="CMemoryReadWriteFile.cpp">
40 <Filter>io</Filter> 40 <Filter>io</Filter>
41 </ClCompile> 41 </ClCompile>
42 <ClCompile Include="main.cpp" /> 42 <ClCompile Include="main.cpp" />
43 </ItemGroup> 43 </ItemGroup>
44 <ItemGroup> 44 <ItemGroup>
45 <ClInclude Include="CGUIEditFactory.h"> 45 <ClInclude Include="CGUIEditFactory.h">
46 <Filter>gui</Filter> 46 <Filter>gui</Filter>
47 </ClInclude> 47 </ClInclude>
48 <ClInclude Include="CGUIEditWindow.h"> 48 <ClInclude Include="CGUIEditWindow.h">
49 <Filter>gui</Filter> 49 <Filter>gui</Filter>
50 </ClInclude> 50 </ClInclude>
51 <ClInclude Include="CGUIEditWorkspace.h"> 51 <ClInclude Include="CGUIEditWorkspace.h">
52 <Filter>gui</Filter> 52 <Filter>gui</Filter>
53 </ClInclude> 53 </ClInclude>
54 <ClInclude Include="CGUITextureCacheBrowser.h"> 54 <ClInclude Include="CGUITextureCacheBrowser.h">
55 <Filter>gui</Filter> 55 <Filter>gui</Filter>
56 </ClInclude> 56 </ClInclude>
57 <ClInclude Include="CGUIAttribute.h"> 57 <ClInclude Include="CGUIAttribute.h">
58 <Filter>gui\GUIAttributes</Filter> 58 <Filter>gui\GUIAttributes</Filter>
59 </ClInclude> 59 </ClInclude>
60 <ClInclude Include="CGUIAttributeEditor.h"> 60 <ClInclude Include="CGUIAttributeEditor.h">
61 <Filter>gui\GUIAttributes</Filter> 61 <Filter>gui\GUIAttributes</Filter>
62 </ClInclude> 62 </ClInclude>
63 <ClInclude Include="CGUIBoolAttribute.h"> 63 <ClInclude Include="CGUIBoolAttribute.h">
64 <Filter>gui\GUIAttributes</Filter> 64 <Filter>gui\GUIAttributes</Filter>
65 </ClInclude> 65 </ClInclude>
66 <ClInclude Include="CGUIColorAttribute.h"> 66 <ClInclude Include="CGUIColorAttribute.h">
67 <Filter>gui\GUIAttributes</Filter> 67 <Filter>gui\GUIAttributes</Filter>
68 </ClInclude> 68 </ClInclude>
69 <ClInclude Include="CGUIEnumAttribute.h"> 69 <ClInclude Include="CGUIEnumAttribute.h">
70 <Filter>gui\GUIAttributes</Filter> 70 <Filter>gui\GUIAttributes</Filter>
71 </ClInclude> 71 </ClInclude>
72 <ClInclude Include="CGUIStringAttribute.h"> 72 <ClInclude Include="CGUIStringAttribute.h">
73 <Filter>gui\GUIAttributes</Filter> 73 <Filter>gui\GUIAttributes</Filter>
74 </ClInclude> 74 </ClInclude>
75 <ClInclude Include="CGUITextureAttribute.h"> 75 <ClInclude Include="CGUITextureAttribute.h">
76 <Filter>gui\GUIAttributes</Filter> 76 <Filter>gui\GUIAttributes</Filter>
77 </ClInclude> 77 </ClInclude>
78 <ClInclude Include="CGUIPanel.h"> 78 <ClInclude Include="CGUIPanel.h">
79 <Filter>gui\Useful GUI Elements</Filter> 79 <Filter>gui\Useful GUI Elements</Filter>
80 </ClInclude> 80 </ClInclude>
81 <ClInclude Include="CGUIDummyEditorStub.h"> 81 <ClInclude Include="CGUIDummyEditorStub.h">
82 <Filter>gui\Element Editors</Filter> 82 <Filter>gui\Element Editors</Filter>
83 </ClInclude> 83 </ClInclude>
84 <ClInclude Include="CMemoryReadWriteFile.h"> 84 <ClInclude Include="CMemoryReadWriteFile.h">
85 <Filter>io</Filter> 85 <Filter>io</Filter>
86 </ClInclude> 86 </ClInclude>
87 </ItemGroup> 87 </ItemGroup>
88</Project> \ No newline at end of file 88</Project> \ No newline at end of file
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/Makefile b/libraries/irrlicht-1.8/tools/GUIEditor/Makefile
index 02f8189..6010a2d 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/Makefile
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/Makefile
@@ -1,43 +1,43 @@
1# Irrlicht Engine GUIEditor Makefile 1# Irrlicht Engine GUIEditor Makefile
2Target = GUIEditor 2Target = GUIEditor
3Sources = CGUIAttributeEditor.cpp CGUIEditFactory.cpp CGUIEditWindow.cpp CGUIEditWorkspace.cpp CGUIPanel.cpp CGUITextureCacheBrowser.cpp CMemoryReadWriteFile.cpp main.cpp 3Sources = CGUIAttributeEditor.cpp CGUIEditFactory.cpp CGUIEditWindow.cpp CGUIEditWorkspace.cpp CGUIPanel.cpp CGUITextureCacheBrowser.cpp CMemoryReadWriteFile.cpp main.cpp
4 4
5CPPFLAGS = -I../../include -I/usr/X11R6/include 5CPPFLAGS = -I../../include -I/usr/X11R6/include
6CXXFLAGS = -Wall -O3 -ffast-math 6CXXFLAGS = -Wall -O3 -ffast-math
7 7
8ifeq ($(HOSTTYPE), x86_64) 8ifeq ($(HOSTTYPE), x86_64)
9LIBSELECT=64 9LIBSELECT=64
10endif 10endif
11 11
12all: all_linux 12all: all_linux
13 13
14# target specific settings 14# target specific settings
15all_linux: SYSTEM=Linux 15all_linux: SYSTEM=Linux
16all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 16all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11
17 17
18all_win32 clean_win32: SYSTEM=Win32-gcc 18all_win32 clean_win32: SYSTEM=Win32-gcc
19all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm 19all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm
20 20
21# if you enable sound add the proper library for linking 21# if you enable sound add the proper library for linking
22#LDFLAGS += -lIrrKlang 22#LDFLAGS += -lIrrKlang
23#LDFLAGS += -laudiere 23#LDFLAGS += -laudiere
24#LDFLAGS += -lSDL_mixer -lSDL 24#LDFLAGS += -lSDL_mixer -lSDL
25 25
26all_win32 clean_win32: SUF=.exe 26all_win32 clean_win32: SUF=.exe
27# name of the binary - only valid for targets which set SYSTEM 27# name of the binary - only valid for targets which set SYSTEM
28DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) 28DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
29 29
30OBJ = $(Sources:.cpp=.o) 30OBJ = $(Sources:.cpp=.o)
31 31
32all_linux all_win32: $(OBJ) 32all_linux all_win32: $(OBJ)
33 $(warning Building...) 33 $(warning Building...)
34 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS) 34 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS)
35 35
36clean: clean_linux clean_win32 36clean: clean_linux clean_win32
37 $(warning Cleaning...) 37 $(warning Cleaning...)
38 @$(RM) $(OBJ) 38 @$(RM) $(OBJ)
39 39
40clean_linux clean_win32: 40clean_linux clean_win32:
41 @$(RM) $(DESTPATH) 41 @$(RM) $(DESTPATH)
42 42
43.PHONY: all all_win32 clean clean_linux clean_win32 43.PHONY: all all_win32 clean clean_linux clean_win32
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp
index e8434b2..1d917d3 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp
@@ -1,76 +1,76 @@
1#include <irrlicht.h> 1#include <irrlicht.h>
2#include "driverChoice.h" 2#include "driverChoice.h"
3 3
4// include the gui creator element factory 4// include the gui creator element factory
5#include "CGUIEditFactory.h" 5#include "CGUIEditFactory.h"
6 6
7using namespace irr; 7using namespace irr;
8using namespace gui; 8using namespace gui;
9 9
10#ifdef _MSC_VER 10#ifdef _MSC_VER
11#pragma comment(lib, "Irrlicht.lib") 11#pragma comment(lib, "Irrlicht.lib")
12#endif 12#endif
13 13
14int main() 14int main()
15{ 15{
16 // ask user for driver 16 // ask user for driver
17 video::E_DRIVER_TYPE driverType=driverChoiceConsole(); 17 video::E_DRIVER_TYPE driverType=driverChoiceConsole();
18 if (driverType==video::EDT_COUNT) 18 if (driverType==video::EDT_COUNT)
19 return 1; 19 return 1;
20 20
21 IrrlichtDevice *device = createDevice(driverType, core::dimension2du(800, 600)); 21 IrrlichtDevice *device = createDevice(driverType, core::dimension2du(800, 600));
22 video::IVideoDriver* driver = device->getVideoDriver(); 22 video::IVideoDriver* driver = device->getVideoDriver();
23 scene::ISceneManager* smgr = device->getSceneManager(); 23 scene::ISceneManager* smgr = device->getSceneManager();
24 gui::IGUIEnvironment *env = device->getGUIEnvironment(); 24 gui::IGUIEnvironment *env = device->getGUIEnvironment();
25 25
26 device->setResizable(true); 26 device->setResizable(true);
27 27
28 /* 28 /*
29 first we create the factory which can make new GUI elements 29 first we create the factory which can make new GUI elements
30 and register it with the gui environment. 30 and register it with the gui environment.
31 */ 31 */
32 32
33 IGUIElementFactory* factory = new CGUIEditFactory(env); 33 IGUIElementFactory* factory = new CGUIEditFactory(env);
34 env->registerGUIElementFactory(factory); 34 env->registerGUIElementFactory(factory);
35 // remember to drop since we created with a create call 35 // remember to drop since we created with a create call
36 factory->drop(); 36 factory->drop();
37 37
38 IGUISkin *skin = env->createSkin(EGST_WINDOWS_METALLIC); 38 IGUISkin *skin = env->createSkin(EGST_WINDOWS_METALLIC);
39 env->setSkin(skin); 39 env->setSkin(skin);
40 40
41 IGUIFont *font = env->getFont("../../media/lucida.xml"); 41 IGUIFont *font = env->getFont("../../media/lucida.xml");
42 if (font) 42 if (font)
43 skin->setFont(font); 43 skin->setFont(font);
44 skin->drop(); 44 skin->drop();
45 45
46 // change transparency of skin 46 // change transparency of skin
47 for (s32 i=0; i<gui::EGDC_COUNT ; ++i) 47 for (s32 i=0; i<gui::EGDC_COUNT ; ++i)
48 { 48 {
49 video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); 49 video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i);
50 col.setAlpha(250); 50 col.setAlpha(250);
51 env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col); 51 env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col);
52 } 52 }
53 53
54 /* 54 /*
55 now we add the GUI Editor Workspace 55 now we add the GUI Editor Workspace
56 */ 56 */
57 57
58 env->addGUIElement("GUIEditor"); 58 env->addGUIElement("GUIEditor");
59 59
60 while(device->run()) 60 while(device->run())
61 { 61 {
62 device->sleep(10); 62 device->sleep(10);
63 63
64 if (device->isWindowActive()) 64 if (device->isWindowActive())
65 { 65 {
66 driver->beginScene(true, true, video::SColor(0,200,200,200)); 66 driver->beginScene(true, true, video::SColor(0,200,200,200));
67 smgr->drawAll(); 67 smgr->drawAll();
68 env->drawAll(); 68 env->drawAll();
69 driver->endScene(); 69 driver->endScene();
70 } 70 }
71 } 71 }
72 72
73 device->drop(); 73 device->drop();
74 74
75 return 0; 75 return 0;
76} 76}