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