Commit 81bfca34 authored by hybrid's avatar hybrid

Fixed an order warning. Hopefully fixed also one more VC6 error.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@991 dfc29bdd-3216-0410-991c-e03cc46cb475
parent f204f9f4
...@@ -622,7 +622,8 @@ void CGUIContextMenu::serializeAttributes(io::IAttributes* out, io::SAttributeRe ...@@ -622,7 +622,8 @@ void CGUIContextMenu::serializeAttributes(io::IAttributes* out, io::SAttributeRe
const IGUIContextMenu* const ptr = (const IGUIContextMenu*)Parent; const IGUIContextMenu* const ptr = (const IGUIContextMenu*)Parent;
// find the position of this item in its parent's list // find the position of this item in its parent's list
u32 i; u32 i;
for (i=0; (i<ptr->getItemCount()) && (ptr->getSubMenu(i) != this); ++i) // VC6 needs the cast for this
for (i=0; (i<ptr->getItemCount()) && (ptr->getSubMenu(i) != (const IGUIContextMenu*)this); ++i)
; // do nothing ; // do nothing
out->addInt("ParentItem", i); out->addInt("ParentItem", i);
...@@ -666,7 +667,7 @@ void CGUIContextMenu::deserializeAttributes(io::IAttributes* in, io::SAttributeR ...@@ -666,7 +667,7 @@ void CGUIContextMenu::deserializeAttributes(io::IAttributes* in, io::SAttributeR
removeAllItems(); removeAllItems();
// read the item list // read the item list
s32 count = in->getAttributeAsInt("ItemCount"); const s32 count = in->getAttributeAsInt("ItemCount");
for (s32 i=0; i<count; ++i) for (s32 i=0; i<count; ++i)
{ {
......
...@@ -23,10 +23,11 @@ namespace gui ...@@ -23,10 +23,11 @@ namespace gui
CGUIScrollBar::CGUIScrollBar(bool horizontal, IGUIEnvironment* environment, CGUIScrollBar::CGUIScrollBar(bool horizontal, IGUIEnvironment* environment,
IGUIElement* parent, s32 id, IGUIElement* parent, s32 id,
core::rect<s32> rectangle, bool noclip) core::rect<s32> rectangle, bool noclip)
: IGUIScrollBar(environment, parent, id, rectangle), UpButton(0), DownButton(0), : IGUIScrollBar(environment, parent, id, rectangle), UpButton(0),
Dragging(false), DraggedBySlider(false), TrayClick(false), DownButton(0), Dragging(false), Horizontal(horizontal),
Horizontal(horizontal), Pos(0), DrawPos(0), DrawHeight(0), Max(100), SmallStep(10), LargeStep(50), DraggedBySlider(false), TrayClick(false), Pos(0), DrawPos(0),
DesiredPos(0), LastChange(0), SliderRect() DrawHeight(0), Max(100), SmallStep(10), LargeStep(50), DesiredPos(0),
LastChange(0)
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("CGUIScrollBar"); setDebugName("CGUIScrollBar");
...@@ -63,7 +64,7 @@ bool CGUIScrollBar::OnEvent(const SEvent& event) ...@@ -63,7 +64,7 @@ bool CGUIScrollBar::OnEvent(const SEvent& event)
case EET_KEY_INPUT_EVENT: case EET_KEY_INPUT_EVENT:
if (event.KeyInput.PressedDown) if (event.KeyInput.PressedDown)
{ {
s32 oldPos = Pos; const s32 oldPos = Pos;
bool absorb = true; bool absorb = true;
switch (event.KeyInput.Key) switch (event.KeyInput.Key)
{ {
...@@ -164,8 +165,8 @@ bool CGUIScrollBar::OnEvent(const SEvent& event) ...@@ -164,8 +165,8 @@ bool CGUIScrollBar::OnEvent(const SEvent& event)
if (event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP) if (event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP)
Dragging = false; Dragging = false;
s32 newPos = getPosFromMousePos(event.MouseInput.X, event.MouseInput.Y); const s32 newPos = getPosFromMousePos(event.MouseInput.X, event.MouseInput.Y);
s32 oldPos = Pos; const s32 oldPos = Pos;
if (!DraggedBySlider) if (!DraggedBySlider)
{ {
...@@ -230,7 +231,7 @@ void CGUIScrollBar::draw() ...@@ -230,7 +231,7 @@ void CGUIScrollBar::draw()
{ {
LastChange = now; LastChange = now;
s32 oldPos = Pos; const s32 oldPos = Pos;
if (DesiredPos >= Pos + LargeStep) if (DesiredPos >= Pos + LargeStep)
setPos(Pos + LargeStep); setPos(Pos + LargeStep);
......
...@@ -75,6 +75,8 @@ namespace gui ...@@ -75,6 +75,8 @@ namespace gui
IGUIButton* UpButton; IGUIButton* UpButton;
IGUIButton* DownButton; IGUIButton* DownButton;
core::rect<s32> SliderRect;
bool Dragging; bool Dragging;
bool Horizontal; bool Horizontal;
bool DraggedBySlider; bool DraggedBySlider;
...@@ -87,7 +89,6 @@ namespace gui ...@@ -87,7 +89,6 @@ namespace gui
s32 LargeStep; s32 LargeStep;
s32 DesiredPos; s32 DesiredPos;
u32 LastChange; u32 LastChange;
core::rect<s32> SliderRect;
}; };
} // end namespace gui } // end namespace gui
......
...@@ -221,8 +221,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -221,8 +221,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
event.MouseInput.X = (short)LOWORD(lParam); event.MouseInput.X = (short)LOWORD(lParam);
event.MouseInput.Y = (short)HIWORD(lParam); event.MouseInput.Y = (short)HIWORD(lParam);
dev = getDeviceFromHWnd(hWnd); dev = getDeviceFromHWnd(hWnd);
if (dev) if (dev)
dev->postEventFromUser(event); dev->postEventFromUser(event);
return 0; return 0;
case WM_KEYDOWN: case WM_KEYDOWN:
......
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
s32 userData); s32 userData);
//! Destructor //! Destructor
~COpenGLSLMaterialRenderer(); virtual ~COpenGLSLMaterialRenderer();
virtual void OnSetMaterial(const video::SMaterial& material, const video::SMaterial& lastMaterial, virtual void OnSetMaterial(const video::SMaterial& material, const video::SMaterial& lastMaterial,
bool resetAllRenderstates, video::IMaterialRendererServices* services); bool resetAllRenderstates, video::IMaterialRendererServices* services);
......
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData); IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData);
//! Destructor //! Destructor
~COpenGLShaderMaterialRenderer(); virtual ~COpenGLShaderMaterialRenderer();
virtual void OnSetMaterial(const video::SMaterial& material, const video::SMaterial& lastMaterial, virtual void OnSetMaterial(const video::SMaterial& material, const video::SMaterial& lastMaterial,
bool resetAllRenderstates, video::IMaterialRendererServices* services); bool resetAllRenderstates, video::IMaterialRendererServices* services);
......
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