mirror of
https://github.com/tribes2/engine.git
synced 2026-03-05 13:30:24 +00:00
t2 engine svn checkout
This commit is contained in:
commit
ff569bd2ae
988 changed files with 394180 additions and 0 deletions
31
hud/hudBitmapFrameCtrl.cc
Normal file
31
hud/hudBitmapFrameCtrl.cc
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// V12 Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
// Portions Copyright (c) 2001 by Sierra Online, Inc.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "hud/hudBitmapFrameCtrl.h"
|
||||
|
||||
IMPLEMENT_CONOBJECT(HudBitmapFrameCtrl);
|
||||
|
||||
HudBitmapFrameCtrl::HudBitmapFrameCtrl()
|
||||
{
|
||||
mSubRegion.set(0,0,1,1);
|
||||
}
|
||||
|
||||
void HudBitmapFrameCtrl::onPreRender()
|
||||
{
|
||||
if (mAutoResize && bool(mBitmapHandle))
|
||||
{
|
||||
Point2I dim(mBitmapHandle.getWidth(), mBitmapHandle.getHeight());
|
||||
if (dim != getExtent())
|
||||
resize(getPosition(), dim);
|
||||
}
|
||||
}
|
||||
|
||||
void HudBitmapFrameCtrl::initPersistFields()
|
||||
{
|
||||
Parent::initPersistFields();
|
||||
addField("subRegion", TypeRectI, Offset(mSubRegion, HudBitmapFrameCtrl));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue