Bug in CGUISkin class

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
REAPER
Posts: 8
Joined: Sat May 08, 2004 10:52 pm
Location: Russia, Moscow

Bug in CGUISkin class

Post by REAPER »

IGUISkin::setSize() function does not sets new size.
At first it has wrong prototype:

Code: Select all

virtual void setSize(s32 size);
MUST BE

Code: Select all

virtual void setSize(EGUI_DEFAULT_SIZE which, s32 newSize);
This must be changed in IGUISkin.h, CGUISkin.h and CGUISkin.cpp.

At last it has wrong body:

Code: Select all

void CGUISkin::setSize(s32 size)
{
     if (size>=0 && size <= EGDS_COUNT)
	Sizes[size] = size;

}
MUST BE

Code: Select all

void CGUISkin::setSize(EGUI_DEFAULT_SIZE which, s32 newSize)
{
     if (which >= 0 && which <= EGDS_COUNT)
	Sizes[which] = newSize;
}
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Wow, seems that no one (including me) ever used that method.. :)
Post Reply