@PaTTe: Sorry, I mean PEditBox
I thought TextBox is the control that allows us to type in the box..
Also, is it possible to create an EditBox outside the PWindow?
@heyufool1: Download D3DFunc (DGDK Version)
Extract it somewhere..and then add the directory that contains D3DFunc.lib and D3DFunc.h to your VC++ Directories.
http://www.dbdepot.co.uk/downloads/D3DFuncGDK%20v3.7.1.zip
EDIT: I found some bugs..
1. if I activate an EditBox while the previous EditBox is active, both of them will be activated at the same time..
//...
gui->createEditBox("EditBox1", "", 10, 10, myWindow);
gui->createEditBox("EditBox2", "", 10, 30, myWindow);
myWindow->getEditBox("EditBox1")->setActive(true); // activated by default
//...
while(LoopGDK())
{
//...
myWindow->getEditBox("EditBox2")->setActive(true);
//...
}
2.
gui->createEditBox("EditBox1", "", 0, 0, myWindow);
the code above will override the title bar of its parent window..
3.
myWindow->getTextBox("myTextBox")->setText("Hello")
doesn't work.
4.
PWindow *myWindow = gui->createWindow(0, "myWindow", "My Window", 10, 10, 300, 200);
gui->createButton("okButton", "OK", 10, 30, myWindow);
myWindow->hide(); // hide the window by default
while(LoopGDK())
{
if(myWindow->getButton("okButton")->isClicked())
myWindow->hide();
if(dbMouseX() > 0 && dbMouseX() < 100 && dbMouseY() > 0 && dbMouseY() < 100)
myWindow->show();
dbSync();
}
- I clicked the upper-left screen to trigger myWindow
- myWindow showed
- I clicked okButton
- myWindow disappeared
- I clicked the upper-left screen for the 2nd time
- myWindow didn't appear
and.. I dont see BringToFront() function in PWindow..