Commit 15d61031 authored by cutealien's avatar cutealien

Make the output-listbox for filesnames a little bit larger as otherwise only...

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-e03cc46cb475
parent e487bcdc
...@@ -150,13 +150,24 @@ public: ...@@ -150,13 +150,24 @@ public:
case EGET_FILE_SELECTED: 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* dialog =
(IGUIFileOpenDialog*)event.GUIEvent.Caller; (IGUIFileOpenDialog*)event.GUIEvent.Caller;
Context.listbox->addItem(L"EGET_FILE_SELECTED");
Context.listbox->addItem(dialog->getFileName()); Context.listbox->addItem(dialog->getFileName());
} }
break; 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: default:
break; break;
} }
...@@ -244,8 +255,8 @@ int main() ...@@ -244,8 +255,8 @@ int main()
// set scrollbar position to alpha value of an arbitrary element // set scrollbar position to alpha value of an arbitrary element
scrollbar->setPos(env->getSkin()->getColor(EGDC_WINDOW).getAlpha()); scrollbar->setPos(env->getSkin()->getColor(EGDC_WINDOW).getAlpha());
env->addStaticText(L"Logging ListBox:", rect<s32>(50,110,250,130), true); env->addStaticText(L"Logging ListBox:", rect<s32>(10,110,350,130), true);
IGUIListBox * listbox = env->addListBox(rect<s32>(50, 140, 250, 210)); IGUIListBox * listbox = env->addListBox(rect<s32>(10, 140, 350, 210));
env->addEditBox(L"Editable Text", rect<s32>(350, 80, 550, 100)); env->addEditBox(L"Editable Text", rect<s32>(350, 80, 550, 100));
// Store the appropriate data in a context structure. // Store the appropriate data in a context structure.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment