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