(svn r17366) -Codechange: make the AI GUIs use the scrollbar wrappers
This commit is contained in:
@@ -217,6 +217,16 @@ public:
|
||||
return this->pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether given current item is visible in the list
|
||||
* @param item to check
|
||||
* @return true iff the item is visible
|
||||
*/
|
||||
FORCEINLINE bool IsVisible(uint16 item) const
|
||||
{
|
||||
return IsInsideBS(item, this->GetPosition(), this->GetCapacity());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the number of elements in the list
|
||||
* @param num the number of elements in the list
|
||||
@@ -264,7 +274,7 @@ public:
|
||||
void SetPosition(int position)
|
||||
{
|
||||
assert(position >= 0);
|
||||
assert(this->count <= this->cap ? (position == 0) : (position + this->cap < this->count));
|
||||
assert(this->count <= this->cap ? (position == 0) : (position + this->cap <= this->count));
|
||||
this->pos = position;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user