Make the output-listbox for filesnames a little bit larger as otherwise only short paths did get displayed.
Also add output for selecting a directory (was mainly needed for bug-hunting, but I guess won't hurt having that always). git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4824 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
e487bcdc72
commit
15d610319d
|
@ -150,13 +150,24 @@ public:
|
|||
|
||||
case EGET_FILE_SELECTED:
|
||||
{
|
||||
// show the model filename, selected in the file dialog
|
||||
// show the event and the selected model filename from the file dialog
|
||||
IGUIFileOpenDialog* dialog =
|
||||
(IGUIFileOpenDialog*)event.GUIEvent.Caller;
|
||||
Context.listbox->addItem(L"EGET_FILE_SELECTED");
|
||||
Context.listbox->addItem(dialog->getFileName());
|
||||
}
|
||||
break;
|
||||
|
||||
case EGET_DIRECTORY_SELECTED:
|
||||
{
|
||||
// show the event and the selected directory name from the file dialog
|
||||
IGUIFileOpenDialog* dialog =
|
||||
(IGUIFileOpenDialog*)event.GUIEvent.Caller;
|
||||
Context.listbox->addItem(L"EGET_DIRECTORY_SELECTED");
|
||||
Context.listbox->addItem(core::stringw(dialog->getDirectoryName()).c_str());
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -244,8 +255,8 @@ int main()
|
|||
// set scrollbar position to alpha value of an arbitrary element
|
||||
scrollbar->setPos(env->getSkin()->getColor(EGDC_WINDOW).getAlpha());
|
||||
|
||||
env->addStaticText(L"Logging ListBox:", rect<s32>(50,110,250,130), true);
|
||||
IGUIListBox * listbox = env->addListBox(rect<s32>(50, 140, 250, 210));
|
||||
env->addStaticText(L"Logging ListBox:", rect<s32>(10,110,350,130), true);
|
||||
IGUIListBox * listbox = env->addListBox(rect<s32>(10, 140, 350, 210));
|
||||
env->addEditBox(L"Editable Text", rect<s32>(350, 80, 550, 100));
|
||||
|
||||
// Store the appropriate data in a context structure.
|
||||
|
|
Loading…
Reference in New Issue