Initial commit of Dink Smallwood HD source. See the "Programmer readme.txt" for information on how to set it up.
git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1469 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
dfbc2348a5
commit
d4f66a5d2e
115 changed files with 37737 additions and 0 deletions
39
source/GUI/ParticleTestMenu.cpp
Normal file
39
source/GUI/ParticleTestMenu.cpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include "ParticleTestMenu.h"
|
||||
#include "Entity/EntityUtils.h"
|
||||
#include "MainMenu.h"
|
||||
#include "Component/ParticleTestComponent.h"
|
||||
|
||||
void ParticleTestOnSelect(VariantList *pVList) //0=vec2 point of click, 1=entity sent from
|
||||
{
|
||||
Entity *pEntClicked = pVList->m_variant[1].GetEntity();
|
||||
|
||||
LogMsg("Clicked %s entity at %s", pEntClicked->GetName().c_str(),pVList->m_variant[1].Print().c_str());
|
||||
|
||||
if (pEntClicked->GetName() == "Back")
|
||||
{
|
||||
SlideScreen(pEntClicked->GetParent(), false);
|
||||
GetMessageManager()->CallEntityFunction(pEntClicked->GetParent(), 500, "OnDelete", NULL);
|
||||
MainMenuCreate(pEntClicked->GetParent()->GetParent());
|
||||
}
|
||||
|
||||
GetEntityRoot()->PrintTreeAsText(); //useful for debugging
|
||||
}
|
||||
|
||||
Entity * ParticleTestCreate(Entity *pParentEnt)
|
||||
{
|
||||
Entity *pBG = CreateOverlayEntity(pParentEnt, "ParticleTest", "interface/generic_bg.rttex", 0,0);
|
||||
AddFocusIfNeeded(pBG);
|
||||
|
||||
Entity *pParticleEnt = pBG->AddEntity(new Entity(new ParticleTestComponent));
|
||||
|
||||
Entity *pButtonEntity;
|
||||
pButtonEntity = CreateTextButtonEntity(pBG, "Back", 240, 290, "Back");
|
||||
pButtonEntity->GetShared()->GetFunction("OnButtonSelected")->sig_function.connect(&ParticleTestOnSelect);
|
||||
pButtonEntity->GetVar("alignment")->Set(uint32(ALIGNMENT_CENTER));
|
||||
|
||||
SlideScreen(pBG, true);
|
||||
|
||||
|
||||
return pBG;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue