GUIFileOpenDialog : little improvement #1 (patch)

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
hey_i_am_real
Posts: 44
Joined: Thu Sep 28, 2006 2:27 pm
Location: Europe

GUIFileOpenDialog : little improvement #1 (patch)

Post by hey_i_am_real »

Hi.

Little details make the difference.
When you need to quickly develop a prototype, you don't want wasting your time with boring code because of some missing default features ...

The default GUIFileOpenDialog does not let see the end of the path when it's too long ...

Image

Replacing the StaticText box by an EditBox and disabling it (as you don't want to edit it) solves this little problem.

Here is the patch.
This applies to SVN 1055, trunk branch.

CGUIFileOpenDialog.cpp

Code: Select all

12c12
< #include "IGUIStaticText.h"
---
> #include "IGUIEditBox.h"
87,88c87,89
<       FileNameText = Environment->addStaticText(0, core::rect<s32>(10, 30, RelativeRect.getWidth()-90, 50), true, false, this);
<       FileNameText->setSubElement(true);
---
>       FileNameText = Environment->addEditBox(0, core::rect<s32>(10, 30, RelativeRect.getWidth()-90, 50), true, this);
>       FileNameText->setSubElement(true);
>       FileNameText->setEnabled(false);
I like working with rank-outsiders, as long as they give themselves the means to achieve their ambitions.
Post Reply