Commit 602d5c1f authored by hybrid's avatar hybrid

Fix mousewheel response for whole fileopen dialog.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@929 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 39fc2a42
......@@ -25,7 +25,8 @@ const s32 FOD_HEIGHT = 250;
//! constructor
CGUIFileOpenDialog::CGUIFileOpenDialog(const wchar_t* title, IGUIEnvironment* environment, IGUIElement* parent, s32 id)
CGUIFileOpenDialog::CGUIFileOpenDialog(const wchar_t* title,
IGUIEnvironment* environment, IGUIElement* parent, s32 id)
: IGUIFileOpenDialog(environment, parent, id,
core::rect<s32>((parent->getAbsolutePosition().getWidth()-FOD_WIDTH)/2,
(parent->getAbsolutePosition().getHeight()-FOD_HEIGHT)/2,
......@@ -99,7 +100,6 @@ CGUIFileOpenDialog::CGUIFileOpenDialog(const wchar_t* title, IGUIEnvironment* en
}
//! destructor
CGUIFileOpenDialog::~CGUIFileOpenDialog()
{
......@@ -133,7 +133,6 @@ const wchar_t* CGUIFileOpenDialog::getFilename()
}
//! called if an event happened.
bool CGUIFileOpenDialog::OnEvent(SEvent event)
{
......@@ -199,6 +198,8 @@ bool CGUIFileOpenDialog::OnEvent(SEvent event)
case EET_MOUSE_INPUT_EVENT:
switch(event.MouseInput.Event)
{
case EMIE_MOUSE_WHEEL:
return FileBox->OnEvent(event);
case EMIE_LMOUSE_PRESSED_DOWN:
DragStart.X = event.MouseInput.X;
DragStart.Y = event.MouseInput.Y;
......@@ -253,8 +254,9 @@ void CGUIFileOpenDialog::draw()
IGUIFont* font = skin->getFont(EGDF_WINDOW);
if (font)
font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true,
&AbsoluteClippingRect);
font->draw(Text.c_str(), rect,
skin->getColor(EGDC_ACTIVE_CAPTION),
false, true, &AbsoluteClippingRect);
}
IGUIElement::draw();
......
This diff is collapsed.
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