# HG changeset patch
# User koryspansel
# Date 1316456854 25200
# Node ID 13e53b74aed7f80d9411612b83d5df818d47a2e0
# Parent 5656c8e382fce11a8903c5684243ebfb6266137e
More drag and drop work
diff -r 5656c8e382fc -r 13e53b74aed7 LightClone/LightClone.vcproj
--- a/LightClone/LightClone.vcproj Fri Sep 16 18:21:36 2011 -0700
+++ b/LightClone/LightClone.vcproj Mon Sep 19 11:27:34 2011 -0700
@@ -181,18 +181,10 @@
>
-
-
-
-
@@ -201,38 +193,10 @@
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -245,34 +209,14 @@
>
-
-
-
-
-
-
-
-
-
-
@@ -312,6 +256,66 @@
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
@@ -347,50 +339,10 @@
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -399,38 +351,14 @@
>
-
-
-
-
-
-
-
-
-
-
-
-
@@ -474,6 +402,86 @@
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Initialize(pResourceManager);
pBackground->SetTexture("Data\\Textures\\Background01.tga", true);
pBackground->SetPosition(ScreenSizeX - pBackground->GetWidth(), 0.0f);
- //GuiImage* pToolbar = new GuiImage();
+ pToolbar = new GuiImage();
+ pToolbar->Initialize(pResourceManager);
+ pToolbar->SetTexture("Data\\Textures\\Panel.tga", true);
+ pToolbar->SetPosition(1000.0f, 100.0f);
+
+ for(uint32 i = 0; i < sizeof(pToolbarSlot) / sizeof(pToolbarSlot[0]); ++i)
+ {
+ //TODO: Use correct toolbar images
+ pToolbarSlot[i] = new GuiImage();
+ pToolbarSlot[i]->Initialize(pResourceManager);
+ pToolbarSlot[i]->SetTexture("Data\\Textures\\Slot.tga", true);
+ pToolbarSlot[i]->SetPosition(1000.0f, 100.0f); //TODO: Setup correct rows & columns
+
+ pToolbar->Add(pToolbarSlot[i]);
+ }
+
+ pFunctionMain = new GuiImage();
+ pFunctionMain->Initialize(pResourceManager);
+ pFunctionMain->SetTexture("Data\\Textures\\Panel.tga", true);
+ pFunctionMain->SetPosition(1000.0f, 100.0f);
- GuiButton* pButtonPlay = new GuiButton();
+ for(uint32 i = 0; i < sizeof(pToolbarSlot) / sizeof(pToolbarSlot[0]); ++i)
+ {
+ pFunctionMainSlot[i] = new GuiImage();
+ pFunctionMainSlot[i]->Initialize(pResourceManager);
+ pFunctionMainSlot[i]->SetTexture("Data\\Textures\\Slot.tga", true);
+ pFunctionMainSlot[i]->SetPosition(1000.0f, 100.0f); //TODO: Setup correct rows & columns
+
+ pFunctionMain->Add(pFunctionMainSlot[i]);
+ }
+
+ pFunctionA = new GuiImage();
+ pFunctionA->Initialize(pResourceManager);
+ pFunctionA->SetTexture("Data\\Textures\\Panel.tga", true);
+ pFunctionA->SetPosition(1000.0f, 400.0f);
+
+ //TODO: Add slots for function a
+
+ pFunctionB = new GuiImage();
+ pFunctionB->Initialize(pResourceManager);
+ pFunctionB->SetTexture("Data\\Textures\\Panel.tga", true);
+ pFunctionB->SetPosition(1000.0f, 600.0f);
+
+ //TODO: Add slots for function b
+
+ pButtonPlay = new GuiButton();
pButtonPlay->Initialize(pResourceManager);
pButtonPlay->SetTexture(GuiButtonState_Normal, "Data\\Textures\\Play.tga", true);
pButtonPlay->SetPosition(1023.0f + 0.0f * 54.0f, 640.0f);
pButtonPlay->Subscribe(GuiButton::EventClick, &World::OnPlay, this);
- GuiButton* pButtonStop = new GuiButton();
+ pButtonStop = new GuiButton();
pButtonStop->Initialize(pResourceManager);
pButtonStop->SetTexture(GuiButtonState_Normal, "Data\\Textures\\Stop.tga", true);
pButtonStop->SetPosition(1023.0f + 1.0f * 54.0f, 640.0f);
pButtonStop->Subscribe(GuiButton::EventClick, &World::OnStop, this);
/*
- GuiButton* pButtonReset = new GuiButton();
+ pButtonReset = new GuiButton();
pButtonReset->Initialize(pResourceManager);
pButtonReset->SetTexture(GuiButtonState_Normal, "Data\\Textures\\Reset.tga", true);
pButtonReset->SetPosition(1023.0f + 2.0f * 54.0f, 640.0f.0f);
pButtonReset->Subscribe(GuiButton::EventClick, &World::OnReset, this);
*/
- GuiButton* pButtonExit = new GuiButton();
+ pButtonExit = new GuiButton();
pButtonExit->Initialize(pResourceManager);
pButtonExit->SetTexture(GuiButtonState_Normal, "Data\\Textures\\Exit.tga", true);
pButtonExit->SetPosition(1023.0f + 3.0f * 54.0f, 640.0f);
diff -r 5656c8e382fc -r 13e53b74aed7 LightClone/Source/World.h
--- a/LightClone/Source/World.h Fri Sep 16 18:21:36 2011 -0700
+++ b/LightClone/Source/World.h Mon Sep 19 11:27:34 2011 -0700
@@ -14,10 +14,7 @@
#include "Code.h"
#include "Loader.h"
#include "CameraController.h"
-//#include "DragController.h"
#include "InputManager.h"
-//#include "ButtonPane.h"
-//#include "Dialog.h"
#include "GuiInterface.h"
#include "GuiImage.h"
#include "GuiButton.h"
@@ -88,39 +85,69 @@
GuiInterface kInterface;
/*
- * kToolbar
+ * pBackground
*/
- //ButtonPane kToolbar;
+ GuiImage* pBackground;
+
+ /*
+ * pButtonPlay
+ */
+ GuiButton* pButtonPlay;
/*
- * kMain
+ * pButtonStop
*/
- //ButtonPane kMain;
+ GuiButton* pButtonStop;
/*
- * kFunction
+ * pButtonReset
+ */
+ GuiButton* pButtonReset;
+
+ /*
+ * pButtonExit
*/
- //ButtonPane kFunction;
+ GuiButton* pButtonExit;
+
+ /*
+ * pToolbar
+ */
+ GuiImage* pToolbar;
/*
- * kArrowBounds
+ * pToolbarSlot
+ */
+ GuiImage* pToolbarSlot[8];
+
+ /*
+ * pFunctionMain
*/
- //Rectangle2 kArrowBounds[2];
+ GuiImage* pFunctionMain;
+
+ /*
+ * pFunctionMainSlot
+ */
+ GuiImage* pFunctionMainSlot[16];
/*
- * kDialog1Bounds
+ * pFunctionA
*/
- //Rectangle2 kDialog1Bounds[1];
+ GuiImage* pFunctionA;
/*
- * kDialog2Bounds
+ * pFunctionASlot
*/
- //Rectangle2 kDialog2Bounds[2];
+ GuiImage* pFunctionASlot[16];
/*
- * kDialog
+ * pFunctionB
*/
- //Dialog kDialog;
+ GuiImage* pFunctionB;
+
+ /*
+ * pFunctionBSlot
+ */
+ GuiImage* pFunctionBSlot[16];
/*
* pLevelDialog
diff -r 5656c8e382fc -r 13e53b74aed7 LightClone/ToDo.txt
--- a/LightClone/ToDo.txt Fri Sep 16 18:21:36 2011 -0700
+++ b/LightClone/ToDo.txt Mon Sep 19 11:27:34 2011 -0700
@@ -9,4 +9,5 @@
9. Add button to clear code panes
10. Implement drag and drop
a. Add drag and drop interface to GuiInterface and move handling into subclasses
+ b. Support creating a new element when dragging and destroying it when done
11. Implement gui batching
\ No newline at end of file