mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Obliterate hsBool
This commit is contained in:
@ -71,11 +71,11 @@ class pfGUIButtonDragProc : public pfGUICtrlProcObject
|
||||
|
||||
pfGUIButtonMod *fParent;
|
||||
pfGUIDraggableMod *fDraggable;
|
||||
hsBool fReportDrag;
|
||||
bool fReportDrag;
|
||||
|
||||
public:
|
||||
|
||||
pfGUIButtonDragProc( pfGUIButtonMod *parent, pfGUIDraggableMod *draggable, pfGUICtrlProcObject *origProc, hsBool reportDrag )
|
||||
pfGUIButtonDragProc( pfGUIButtonMod *parent, pfGUIDraggableMod *draggable, pfGUICtrlProcObject *origProc, bool reportDrag )
|
||||
{
|
||||
fParent = parent;
|
||||
fDraggable = draggable;
|
||||
@ -121,7 +121,7 @@ class pfGUIButtonDragProc : public pfGUICtrlProcObject
|
||||
};
|
||||
|
||||
|
||||
void pfGUIButtonMod::StopDragging( hsBool cancel )
|
||||
void pfGUIButtonMod::StopDragging( bool cancel )
|
||||
{
|
||||
fDraggable->StopDragging( cancel );
|
||||
fDraggable->SetVisible( false );
|
||||
@ -161,14 +161,14 @@ pfGUIButtonMod::pfGUIButtonMod()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIButtonMod::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIButtonMod::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIButtonMod::MsgReceive( plMessage *msg )
|
||||
bool pfGUIButtonMod::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg );
|
||||
if( refMsg != nil && refMsg->fType == kRefDraggable )
|
||||
@ -232,7 +232,7 @@ void pfGUIButtonMod::Write( hsStream *s, hsResMgr *mgr )
|
||||
|
||||
//// UpdateBounds ////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIButtonMod::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force )
|
||||
void pfGUIButtonMod::UpdateBounds( hsMatrix44 *invXformMatrix, bool force )
|
||||
{
|
||||
pfGUIControlMod::UpdateBounds( invXformMatrix, force );
|
||||
if( fAnimationKeys.GetCount() > 0 || fMouseOverAnimKeys.GetCount() > 0 )
|
||||
@ -329,7 +329,7 @@ int32_t pfGUIButtonMod::GetNotifyType()
|
||||
return fNotifyType;
|
||||
}
|
||||
|
||||
hsBool pfGUIButtonMod::IsButtonDown()
|
||||
bool pfGUIButtonMod::IsButtonDown()
|
||||
{
|
||||
return fClicking;
|
||||
}
|
||||
@ -337,7 +337,7 @@ hsBool pfGUIButtonMod::IsButtonDown()
|
||||
//// SetInteresting //////////////////////////////////////////////////////////
|
||||
// Overridden to play mouse over animation when we're interesting
|
||||
|
||||
void pfGUIButtonMod::SetInteresting( hsBool i )
|
||||
void pfGUIButtonMod::SetInteresting( bool i )
|
||||
{
|
||||
pfGUIControlMod::SetInteresting( i );
|
||||
|
||||
|
@ -65,18 +65,18 @@ class pfGUIButtonMod : public pfGUIControlMod
|
||||
hsTArray<plKey> fMouseOverAnimKeys;
|
||||
plString fMouseOverAnimName;
|
||||
|
||||
hsBool fClicking;
|
||||
hsBool fTriggering;
|
||||
bool fClicking;
|
||||
bool fTriggering;
|
||||
|
||||
hsPoint3 fOrigMouseDownPt;
|
||||
pfGUIDraggableMod *fDraggable;
|
||||
pfGUICtrlProcObject *fOrigHandler;
|
||||
hsBool fOrigReportedDrag;
|
||||
bool fOrigReportedDrag;
|
||||
|
||||
|
||||
int32_t fNotifyType;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h
|
||||
|
||||
@ -88,23 +88,23 @@ class pfGUIButtonMod : public pfGUIControlMod
|
||||
GETINTERFACE_ANY( pfGUIButtonMod, pfGUIControlMod );
|
||||
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
|
||||
virtual void SetInteresting( hsBool i );
|
||||
virtual void SetInteresting( bool i );
|
||||
|
||||
virtual void HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false );
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false );
|
||||
|
||||
virtual void SetNotifyType(int32_t kind);
|
||||
virtual int32_t GetNotifyType();
|
||||
virtual hsBool IsButtonDown();
|
||||
virtual hsBool IsTriggering() { return fTriggering; }
|
||||
virtual bool IsButtonDown();
|
||||
virtual bool IsTriggering() { return fTriggering; }
|
||||
enum SoundEvents
|
||||
{
|
||||
kMouseDown,
|
||||
@ -126,7 +126,7 @@ class pfGUIButtonMod : public pfGUIControlMod
|
||||
};
|
||||
|
||||
void StartDragging( void );
|
||||
void StopDragging( hsBool cancel );
|
||||
void StopDragging( bool cancel );
|
||||
|
||||
// Export only
|
||||
void SetAnimationKeys( hsTArray<plKey> &keys, const plString &name );
|
||||
|
@ -73,14 +73,14 @@ pfGUICheckBoxCtrl::pfGUICheckBoxCtrl()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUICheckBoxCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUICheckBoxCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUICheckBoxCtrl::MsgReceive( plMessage *msg )
|
||||
bool pfGUICheckBoxCtrl::MsgReceive( plMessage *msg )
|
||||
{
|
||||
return pfGUIControlMod::MsgReceive( msg );
|
||||
}
|
||||
@ -115,7 +115,7 @@ void pfGUICheckBoxCtrl::Write( hsStream *s, hsResMgr *mgr )
|
||||
|
||||
//// UpdateBounds ////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUICheckBoxCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force )
|
||||
void pfGUICheckBoxCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, bool force )
|
||||
{
|
||||
pfGUIControlMod::UpdateBounds( invXformMatrix, force );
|
||||
if( fAnimationKeys.GetCount() > 0 )
|
||||
@ -151,7 +151,7 @@ void pfGUICheckBoxCtrl::HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers )
|
||||
|
||||
//// SetChecked //////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUICheckBoxCtrl::SetChecked( hsBool checked, hsBool immediate /*= false*/ )
|
||||
void pfGUICheckBoxCtrl::SetChecked( bool checked, bool immediate /*= false*/ )
|
||||
{
|
||||
fChecked = checked;
|
||||
if( fAnimationKeys.GetCount() > 0 )
|
||||
|
@ -60,12 +60,12 @@ class pfGUICheckBoxCtrl : public pfGUIControlMod
|
||||
|
||||
hsTArray<plKey> fAnimationKeys;
|
||||
plString fAnimName;
|
||||
hsBool fClicking;
|
||||
bool fClicking;
|
||||
|
||||
hsBool fChecked;
|
||||
hsBool fPlaySound;
|
||||
bool fChecked;
|
||||
bool fPlaySound;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h
|
||||
|
||||
@ -77,7 +77,7 @@ class pfGUICheckBoxCtrl : public pfGUIControlMod
|
||||
GETINTERFACE_ANY( pfGUICheckBoxCtrl, pfGUIControlMod );
|
||||
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
@ -85,10 +85,10 @@ class pfGUICheckBoxCtrl : public pfGUIControlMod
|
||||
virtual void HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false );
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false );
|
||||
|
||||
void SetChecked( hsBool checked, hsBool immediate = false );
|
||||
hsBool IsChecked( void ) { return fChecked; }
|
||||
void SetChecked( bool checked, bool immediate = false );
|
||||
bool IsChecked( void ) { return fChecked; }
|
||||
|
||||
void DontPlaySounds() { fPlaySound = false; } // should the checkbox play sounds?
|
||||
|
||||
|
@ -72,14 +72,14 @@ pfGUIClickMapCtrl::~pfGUIClickMapCtrl()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIClickMapCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIClickMapCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIClickMapCtrl::MsgReceive( plMessage *msg )
|
||||
bool pfGUIClickMapCtrl::MsgReceive( plMessage *msg )
|
||||
{
|
||||
return pfGUIControlMod::MsgReceive( msg );
|
||||
}
|
||||
|
@ -57,10 +57,10 @@ class pfGUIClickMapCtrl : public pfGUIControlMod
|
||||
protected:
|
||||
|
||||
hsPoint3 fLastMousePt, fLastMouseUpPt, fLastMouseDragPt;
|
||||
hsBool fTracking;
|
||||
bool fTracking;
|
||||
int32_t fCustomCursor;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h
|
||||
|
||||
@ -90,7 +90,7 @@ class pfGUIClickMapCtrl : public pfGUIControlMod
|
||||
virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseHover( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
|
@ -96,7 +96,7 @@ class pfGUICtrlProcObject
|
||||
|
||||
// ONLY THE GUI SYSTEM SHOULD CALL THESE
|
||||
void IncRef( void ) { fRefCnt++; }
|
||||
hsBool DecRef( void ) { fRefCnt--; return ( fRefCnt > 0 ) ? false : true; }
|
||||
bool DecRef( void ) { fRefCnt--; return ( fRefCnt > 0 ) ? false : true; }
|
||||
};
|
||||
|
||||
//// pfGUICtrlProcWriteableObject ////////////////////////////////////////////
|
||||
|
@ -127,7 +127,7 @@ void pfGUIColorScheme::Read( hsStream *s )
|
||||
fBackColor.Read( s );
|
||||
fSelForeColor.Read( s );
|
||||
fSelBackColor.Read( s );
|
||||
s->ReadLE( &fTransparent );
|
||||
fTransparent = s->ReadBOOL();
|
||||
|
||||
delete [] fFontFace;
|
||||
fFontFace = s->ReadSafeString();
|
||||
@ -141,7 +141,7 @@ void pfGUIColorScheme::Write( hsStream *s )
|
||||
fBackColor.Write( s );
|
||||
fSelForeColor.Write( s );
|
||||
fSelBackColor.Write( s );
|
||||
s->WriteLE( fTransparent );
|
||||
s->WriteBOOL( fTransparent );
|
||||
|
||||
s->WriteSafeString( fFontFace );
|
||||
s->WriteLE( fFontSize );
|
||||
@ -180,7 +180,7 @@ pfGUIControlMod::~pfGUIControlMod()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIControlMod::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIControlMod::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
// UpdateBounds();
|
||||
return false;
|
||||
@ -222,7 +222,7 @@ static float GetVectorAngle( const hsPoint3 &basePt, const hsPoint3 &pointA, con
|
||||
// planar set", Info. Proc. Lett. 1, 132-133 (1972).
|
||||
// Note: THIS WILL DESTROY YOUR INPOINTS ARRAY.
|
||||
|
||||
static hsBool CreateConvexHull( hsPoint3 *inPoints, int &numPoints )
|
||||
static bool CreateConvexHull( hsPoint3 *inPoints, int &numPoints )
|
||||
{
|
||||
int i, j, pointA, pointB, pointC;
|
||||
float *angles;
|
||||
@ -359,7 +359,7 @@ static void GetObjectPoints( plSceneObject *so, hsTArray<hsPoint3> &outPoints )
|
||||
// Given two ends of a line segment and two points, tells you whether the
|
||||
// two points are on the same side of the line. Used in PointInTriangle().
|
||||
|
||||
static hsBool PointsOnSameSide( const hsPoint3 &line1, const hsPoint3 &line2, const hsPoint3 &pointA, const hsPoint3 &pointB )
|
||||
static bool PointsOnSameSide( const hsPoint3 &line1, const hsPoint3 &line2, const hsPoint3 &pointA, const hsPoint3 &pointB )
|
||||
{
|
||||
hsVector3 baseVec( &line2, &line1 );
|
||||
hsVector3 cp1 = hsVector3( &pointA, &line1 ) % baseVec;
|
||||
@ -371,7 +371,7 @@ static hsBool PointsOnSameSide( const hsPoint3 &line1, const hsPoint3 &line2,
|
||||
// Given three points that define a triangle and a fourth point, tells you
|
||||
// whether the fourth point is inside the triangle.
|
||||
|
||||
static hsBool PointInTriangle( hsPoint3 tri1, hsPoint3 tri2, hsPoint3 tri3, const hsPoint3 &testPoint )
|
||||
static bool PointInTriangle( hsPoint3 tri1, hsPoint3 tri2, hsPoint3 tri3, const hsPoint3 &testPoint )
|
||||
{
|
||||
tri1.fZ = tri2.fZ = tri3.fZ = testPoint.fZ;
|
||||
if( PointsOnSameSide( tri1, tri2, testPoint, tri3 ) &&
|
||||
@ -384,7 +384,7 @@ static hsBool PointInTriangle( hsPoint3 tri1, hsPoint3 tri2, hsPoint3 tri3, co
|
||||
//// PointInBounds ///////////////////////////////////////////////////////////
|
||||
// Tells you whether said point is in the control's bounds.
|
||||
|
||||
hsBool pfGUIControlMod::PointInBounds( const hsPoint3 &point )
|
||||
bool pfGUIControlMod::PointInBounds( const hsPoint3 &point )
|
||||
{
|
||||
UpdateBounds();
|
||||
|
||||
@ -424,7 +424,7 @@ void pfGUIControlMod::CalcInitialBounds( void )
|
||||
|
||||
//// UpdateBounds ////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIControlMod::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force )
|
||||
void pfGUIControlMod::UpdateBounds( hsMatrix44 *invXformMatrix, bool force )
|
||||
{
|
||||
hsMatrix44 xformMatrix, projMatrix;
|
||||
hsPoint3 corners[ 8 ];
|
||||
@ -581,7 +581,7 @@ void pfGUIControlMod::SetTarget( plSceneObject *object )
|
||||
#include "plProfile.h"
|
||||
plProfile_CreateTimer("Gui", "RenderSetup", GUITime);
|
||||
|
||||
hsBool pfGUIControlMod::MsgReceive( plMessage *msg )
|
||||
bool pfGUIControlMod::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plRenderMsg* rend = plRenderMsg::ConvertNoRef( msg );
|
||||
|
||||
@ -646,7 +646,7 @@ hsBool pfGUIControlMod::MsgReceive( plMessage *msg )
|
||||
// screen res and fun stuff like that. Also sets the layer transform to give
|
||||
// us a 1:1 textel-pixel ratio, which we like.
|
||||
|
||||
hsBool pfGUIControlMod::ISetUpDynTextMap( plPipeline *pipe )
|
||||
bool pfGUIControlMod::ISetUpDynTextMap( plPipeline *pipe )
|
||||
{
|
||||
if( fDynTextMap == nil )
|
||||
{
|
||||
@ -743,7 +743,7 @@ void pfGUIControlMod::SetDynTextMap( plLayerInterface *layer, plDynamicTextMa
|
||||
|
||||
//// SetEnabled //////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIControlMod::SetEnabled( hsBool e )
|
||||
void pfGUIControlMod::SetEnabled( bool e )
|
||||
{
|
||||
if( e == fEnabled )
|
||||
return;
|
||||
@ -754,7 +754,7 @@ void pfGUIControlMod::SetEnabled( hsBool e )
|
||||
|
||||
//// SetFocused //////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIControlMod::SetFocused( hsBool e )
|
||||
void pfGUIControlMod::SetFocused( bool e )
|
||||
{
|
||||
if( e == fFocused )
|
||||
return;
|
||||
@ -765,7 +765,7 @@ void pfGUIControlMod::SetFocused( hsBool e )
|
||||
|
||||
//// SetInteresting //////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIControlMod::SetInteresting( hsBool i )
|
||||
void pfGUIControlMod::SetInteresting( bool i )
|
||||
{
|
||||
if( i == fInteresting )
|
||||
return;
|
||||
@ -780,7 +780,7 @@ void pfGUIControlMod::SetInteresting( hsBool i )
|
||||
|
||||
//// SetVisible //////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIControlMod::SetVisible( hsBool vis )
|
||||
void pfGUIControlMod::SetVisible( bool vis )
|
||||
{
|
||||
if( vis == fVisible )
|
||||
return;
|
||||
@ -895,12 +895,12 @@ void pfGUIControlMod::Write( hsStream *s, hsResMgr *mgr )
|
||||
|
||||
//// HandleKeyPress/Event ////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIControlMod::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
bool pfGUIControlMod::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool pfGUIControlMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers )
|
||||
bool pfGUIControlMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -919,7 +919,7 @@ void pfGUIControlMod::IScreenToLocalPt( hsPoint3 &pt )
|
||||
|
||||
//// ISetHandler /////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIControlMod::ISetHandler( pfGUICtrlProcObject *h, hsBool clearInheritFlag )
|
||||
void pfGUIControlMod::ISetHandler( pfGUICtrlProcObject *h, bool clearInheritFlag )
|
||||
{
|
||||
if( fHandler && fHandler->DecRef() )
|
||||
delete fHandler;
|
||||
@ -976,7 +976,7 @@ void pfGUIControlMod::SetSoundIndex( uint8_t guiCtrlEvent, int soundIndex )
|
||||
// Sends a sound play message with the soundIndex associated with the given
|
||||
// event.
|
||||
|
||||
void pfGUIControlMod::IPlaySound( uint8_t guiCtrlEvent, hsBool loop /* = false */ )
|
||||
void pfGUIControlMod::IPlaySound( uint8_t guiCtrlEvent, bool loop /* = false */ )
|
||||
{
|
||||
if( guiCtrlEvent >= fSoundIndices.GetCount() || fSoundIndices[ guiCtrlEvent ] == 0 )
|
||||
return;
|
||||
|
@ -72,7 +72,7 @@ class pfGUIColorScheme : public hsRefCnt
|
||||
public:
|
||||
hsColorRGBA fForeColor, fBackColor;
|
||||
hsColorRGBA fSelForeColor, fSelBackColor;
|
||||
hsBool fTransparent;
|
||||
bool fTransparent;
|
||||
|
||||
char *fFontFace;
|
||||
uint8_t fFontSize;
|
||||
@ -95,9 +95,9 @@ class pfGUIColorScheme : public hsRefCnt
|
||||
void Read( hsStream *s );
|
||||
void Write( hsStream *s );
|
||||
|
||||
hsBool IsBold( void ) { return ( fFontFlags & kFontBold ) ? true : false; }
|
||||
hsBool IsItalic( void ) { return ( fFontFlags & kFontItalic ) ? true : false; }
|
||||
hsBool IsShadowed( void ) { return ( fFontFlags & kFontShadowed ) ? true : false; }
|
||||
bool IsBold( void ) { return ( fFontFlags & kFontBold ) ? true : false; }
|
||||
bool IsItalic( void ) { return ( fFontFlags & kFontItalic ) ? true : false; }
|
||||
bool IsShadowed( void ) { return ( fFontFlags & kFontShadowed ) ? true : false; }
|
||||
|
||||
protected:
|
||||
|
||||
@ -114,14 +114,14 @@ class pfGUIControlMod : public plSingleModifier
|
||||
protected:
|
||||
|
||||
uint32_t fTagID;
|
||||
hsBool fEnabled, fFocused, fVisible, fInteresting;
|
||||
hsBool fNotifyOnInteresting;
|
||||
bool fEnabled, fFocused, fVisible, fInteresting;
|
||||
bool fNotifyOnInteresting;
|
||||
pfGUIDialogMod *fDialog;
|
||||
|
||||
hsBounds3 fBounds, fInitialBounds; // Z component is 0-1
|
||||
float fScreenMinZ; // Closest Z coordinate in screen space
|
||||
hsPoint3 fScreenCenter;
|
||||
hsBool fBoundsValid, fCenterValid;
|
||||
bool fBoundsValid, fCenterValid;
|
||||
hsMatrix44 fXformMatrix; // Only used for doing drag work, etc.
|
||||
|
||||
pfGUICtrlProcObject *fHandler;
|
||||
@ -140,19 +140,19 @@ class pfGUIControlMod : public plSingleModifier
|
||||
pfGUISkin *fSkin;
|
||||
|
||||
|
||||
hsBool ISetUpDynTextMap( plPipeline *pipe );
|
||||
bool ISetUpDynTextMap( plPipeline *pipe );
|
||||
virtual void IPostSetUpDynTextMap( void ) {}
|
||||
virtual void IGrowDTMDimsToDesiredSize( uint16_t &width, uint16_t &height ) { }
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
void ISetDialog( pfGUIDialogMod *mod ) { fDialog = mod; }
|
||||
void IScreenToLocalPt( hsPoint3 &pt );
|
||||
|
||||
virtual void IUpdate( void ) {;}
|
||||
void ISetHandler( pfGUICtrlProcObject *h, hsBool clearInheritFlag = false );
|
||||
void ISetHandler( pfGUICtrlProcObject *h, bool clearInheritFlag = false );
|
||||
|
||||
void IPlaySound( uint8_t guiCtrlEvent, hsBool loop = false );
|
||||
void IPlaySound( uint8_t guiCtrlEvent, bool loop = false );
|
||||
void IStopSound( uint8_t guiCtrlEvent );
|
||||
|
||||
virtual uint32_t IGetDesiredCursor( void ) const { return 0; } // As specified in plInputInterface.h
|
||||
@ -166,42 +166,42 @@ class pfGUIControlMod : public plSingleModifier
|
||||
GETINTERFACE_ANY( pfGUIControlMod, plSingleModifier );
|
||||
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
|
||||
uint32_t GetTagID( void ) { return fTagID; }
|
||||
|
||||
virtual void SetEnabled( hsBool e );
|
||||
virtual hsBool IsEnabled( void ) { return fEnabled; }
|
||||
virtual void SetFocused( hsBool e );
|
||||
virtual hsBool IsFocused( void ) { return fFocused; }
|
||||
virtual void SetVisible( hsBool vis );
|
||||
virtual hsBool IsVisible( void ) { return fVisible; }
|
||||
virtual void SetEnabled( bool e );
|
||||
virtual bool IsEnabled( void ) { return fEnabled; }
|
||||
virtual void SetFocused( bool e );
|
||||
virtual bool IsFocused( void ) { return fFocused; }
|
||||
virtual void SetVisible( bool vis );
|
||||
virtual bool IsVisible( void ) { return fVisible; }
|
||||
|
||||
virtual void SetInteresting( hsBool i );
|
||||
hsBool IsInteresting( void ) { return fInteresting; }
|
||||
virtual void SetInteresting( bool i );
|
||||
bool IsInteresting( void ) { return fInteresting; }
|
||||
|
||||
virtual void SetNotifyOnInteresting( hsBool state ) { fNotifyOnInteresting = state; }
|
||||
virtual void SetNotifyOnInteresting( bool state ) { fNotifyOnInteresting = state; }
|
||||
|
||||
pfGUIDialogMod *GetOwnerDlg( void ) { return fDialog; }
|
||||
|
||||
virtual void Refresh( void );
|
||||
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false );
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false );
|
||||
void SetObjectCenter( float x, float y );
|
||||
virtual hsPoint3 GetObjectCenter() { return fScreenCenter; }
|
||||
float GetScreenMinZ( void ) { return fScreenMinZ; }
|
||||
void CalcInitialBounds( void );
|
||||
|
||||
const hsBounds3 &GetBounds( void );
|
||||
hsBool PointInBounds( const hsPoint3 &point );
|
||||
bool PointInBounds( const hsPoint3 &point );
|
||||
|
||||
virtual void SetTarget( plSceneObject *object );
|
||||
|
||||
// Return false if you actually DON'T want the mouse clicked at this point (should only be used for non-rectangular region rejection)
|
||||
virtual hsBool FilterMousePosition( hsPoint3 &mousePt ) { return true; }
|
||||
virtual bool FilterMousePosition( hsPoint3 &mousePt ) { return true; }
|
||||
|
||||
virtual void HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers ) {;}
|
||||
virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers ) {;}
|
||||
@ -209,8 +209,8 @@ class pfGUIControlMod : public plSingleModifier
|
||||
virtual void HandleMouseHover( hsPoint3 &mousePt, uint8_t modifiers ) {;}
|
||||
virtual void HandleMouseDblClick( hsPoint3 &mousePt, uint8_t modifiers ) {;}
|
||||
|
||||
virtual hsBool HandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
virtual hsBool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers );
|
||||
virtual bool HandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
virtual bool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers );
|
||||
|
||||
void SetHandler( pfGUICtrlProcObject *h ) { ISetHandler( h, true ); }
|
||||
void DoSomething( void ); // Will call the handler
|
||||
@ -254,7 +254,7 @@ class pfGUIControlMod : public plSingleModifier
|
||||
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l);
|
||||
|
||||
// Forces an immediate play of the given GUI control event sound
|
||||
void PlaySound( uint8_t guiCtrlEvent, hsBool loop = false ) { IPlaySound( guiCtrlEvent, loop ); }
|
||||
void PlaySound( uint8_t guiCtrlEvent, bool loop = false ) { IPlaySound( guiCtrlEvent, loop ); }
|
||||
void StopSound( uint8_t guiCtrlEvent ) { IStopSound( guiCtrlEvent ); }
|
||||
|
||||
// Export only
|
||||
|
@ -295,7 +295,7 @@ pfGUIButtonMod *pfGUICtrlGenerator::GenerateRectButton( const char *title, floa
|
||||
//// CreateRectButton ////////////////////////////////////////////////////////
|
||||
|
||||
pfGUIButtonMod *pfGUICtrlGenerator::CreateRectButton( pfGUIDialogMod *parent, const char *title, float x, float y, float width, float height,
|
||||
hsGMaterial *material, hsBool asMenuItem )
|
||||
hsGMaterial *material, bool asMenuItem )
|
||||
{
|
||||
wchar_t *wTitle = hsStringToWString(title);
|
||||
pfGUIButtonMod *retVal = CreateRectButton(parent,wTitle,x,y,width,height,material,asMenuItem);
|
||||
@ -304,7 +304,7 @@ pfGUIButtonMod *pfGUICtrlGenerator::CreateRectButton( pfGUIDialogMod *parent, c
|
||||
}
|
||||
|
||||
pfGUIButtonMod *pfGUICtrlGenerator::CreateRectButton( pfGUIDialogMod *parent, const wchar_t *title, float x, float y, float width, float height,
|
||||
hsGMaterial *material, hsBool asMenuItem )
|
||||
hsGMaterial *material, bool asMenuItem )
|
||||
{
|
||||
plDrawableSpans *myDraw;
|
||||
hsMatrix44 l2w, w2l;
|
||||
@ -446,7 +446,7 @@ pfGUIDialogMod *pfGUICtrlGenerator::IGetDialog( void )
|
||||
|
||||
//// IGenerateDialog /////////////////////////////////////////////////////////
|
||||
|
||||
pfGUIDialogMod *pfGUICtrlGenerator::IGenerateDialog( const char *name, float scrnWidth, hsBool show )
|
||||
pfGUIDialogMod *pfGUICtrlGenerator::IGenerateDialog( const char *name, float scrnWidth, bool show )
|
||||
{
|
||||
float fovX, fovY;
|
||||
plSceneNode *node;
|
||||
|
@ -93,7 +93,7 @@ class pfGUICtrlGenerator
|
||||
hsColorRGBA &textColor, float objWidth, float objHeight );
|
||||
|
||||
pfGUIDialogMod *IGetDialog( void );
|
||||
pfGUIDialogMod *IGenerateDialog( const char *name, float scrnWidth, hsBool show = true );
|
||||
pfGUIDialogMod *IGenerateDialog( const char *name, float scrnWidth, bool show = true );
|
||||
|
||||
plSceneObject *IGenSceneObject( pfGUIDialogMod *dlg, plDrawable *myDraw, plSceneObject *parent = nil, hsMatrix44 *l2w = nil, hsMatrix44 *w2l = nil );
|
||||
|
||||
@ -119,9 +119,9 @@ class pfGUICtrlGenerator
|
||||
|
||||
|
||||
pfGUIButtonMod *CreateRectButton( pfGUIDialogMod *parent, const char *title, float x, float y,
|
||||
float width, float height, hsGMaterial *material, hsBool asMenuItem = false );
|
||||
float width, float height, hsGMaterial *material, bool asMenuItem = false );
|
||||
pfGUIButtonMod *CreateRectButton( pfGUIDialogMod *parent, const wchar_t *title, float x, float y,
|
||||
float width, float height, hsGMaterial *material, hsBool asMenuItem = false );
|
||||
float width, float height, hsGMaterial *material, bool asMenuItem = false );
|
||||
|
||||
static pfGUICtrlGenerator &Instance( void );
|
||||
};
|
||||
|
@ -141,14 +141,14 @@ hsPoint3 pfGUIDialogMod::WorldToScreenPoint( const hsPoint3 &inPt )
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIDialogMod::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIDialogMod::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIDialogMod::MsgReceive( plMessage *msg )
|
||||
bool pfGUIDialogMod::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plGenRefMsg *ref = plGenRefMsg::ConvertNoRef( msg );
|
||||
if( ref )
|
||||
@ -240,7 +240,7 @@ void pfGUIDialogMod::AddControlOnExport( pfGUIControlMod *ctrl )
|
||||
|
||||
//// SetEnabled //////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIDialogMod::SetEnabled( hsBool e )
|
||||
void pfGUIDialogMod::SetEnabled( bool e )
|
||||
{
|
||||
if( e == fEnabled )
|
||||
return;
|
||||
@ -364,7 +364,7 @@ plKey pfGUIDialogMod::GetSceneNodeKey( void )
|
||||
// Really. We go through and make sure every control marked as interesting
|
||||
// still has the mouse inside it and vice versa.
|
||||
|
||||
void pfGUIDialogMod::UpdateInterestingThings( float mouseX, float mouseY, uint8_t modifiers, hsBool modalPreset )
|
||||
void pfGUIDialogMod::UpdateInterestingThings( float mouseX, float mouseY, uint8_t modifiers, bool modalPreset )
|
||||
{
|
||||
int i;
|
||||
hsPoint3 mousePoint;
|
||||
@ -405,7 +405,7 @@ void pfGUIDialogMod::UpdateInterestingThings( float mouseX, float mouseY, uin
|
||||
#include "plPipeline/plDebugText.h"
|
||||
#endif
|
||||
|
||||
hsBool pfGUIDialogMod::HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY,
|
||||
bool pfGUIDialogMod::HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY,
|
||||
uint8_t modifiers )
|
||||
{
|
||||
hsPoint3 mousePoint;
|
||||
@ -554,7 +554,7 @@ if( showBounds )
|
||||
|
||||
//// HandleKeyEvent //////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIDialogMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers )
|
||||
bool pfGUIDialogMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers )
|
||||
{
|
||||
// Only process if a control has focus...
|
||||
if( fFocusCtrl != nil )
|
||||
@ -567,7 +567,7 @@ hsBool pfGUIDialogMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKey
|
||||
|
||||
//// HandleKeyPress //////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIDialogMod::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
bool pfGUIDialogMod::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
{
|
||||
// Same deal as HandleKeyPress. Only problem is, we needed the msg to translate
|
||||
// to a char, so it had to be done up at the mgr level (sadly)
|
||||
|
@ -72,7 +72,7 @@ class pfGUIDialogMod : public plSingleModifier
|
||||
uint32_t fVersion; // Nice for syncing to C++ code
|
||||
|
||||
plPostEffectMod *fRenderMod;
|
||||
hsBool fEnabled;
|
||||
bool fEnabled;
|
||||
char fName[ 128 ];
|
||||
hsTArray<pfGUIControlMod *> fControls;
|
||||
pfGUIControlMod *fControlOfInterest;
|
||||
@ -84,14 +84,14 @@ class pfGUIDialogMod : public plSingleModifier
|
||||
plKey fProcReceiver; // Non-nil means we handle everything by creating notify messages and sending them to this key
|
||||
|
||||
hsTArray<pfGUIListElement *> fDragElements;
|
||||
hsBool fDragMode, fDragReceptive;
|
||||
bool fDragMode, fDragReceptive;
|
||||
pfGUIControlMod *fDragTarget;
|
||||
pfGUIControlMod *fDragSource;
|
||||
|
||||
plKey fSceneNodeKey;
|
||||
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
void IHandleDrag( hsPoint3 &mousePt, pfGameGUIMgr::EventType event, uint8_t modifiers );
|
||||
|
||||
@ -117,7 +117,7 @@ class pfGUIDialogMod : public plSingleModifier
|
||||
GETINTERFACE_ANY( pfGUIDialogMod, plSingleModifier );
|
||||
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
@ -125,18 +125,18 @@ class pfGUIDialogMod : public plSingleModifier
|
||||
void SetSceneNodeKey( plKey &key ) { fSceneNodeKey = key; }
|
||||
plKey GetSceneNodeKey( void );
|
||||
|
||||
virtual void SetEnabled( hsBool e );
|
||||
hsBool IsEnabled( void ) { return fEnabled; }
|
||||
virtual void SetEnabled( bool e );
|
||||
bool IsEnabled( void ) { return fEnabled; }
|
||||
|
||||
const char *GetName( void ) { return fName; }
|
||||
|
||||
void ScreenToWorldPoint( float x, float y, float z, hsPoint3 &outPt );
|
||||
hsPoint3 WorldToScreenPoint( const hsPoint3 &inPt );
|
||||
|
||||
virtual hsBool HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, uint8_t modifiers );
|
||||
hsBool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers );
|
||||
hsBool HandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
void UpdateInterestingThings( float mouseX, float mouseY, uint8_t modifiers, hsBool modalPreset );
|
||||
virtual bool HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, uint8_t modifiers );
|
||||
bool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers );
|
||||
bool HandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
void UpdateInterestingThings( float mouseX, float mouseY, uint8_t modifiers, bool modalPreset );
|
||||
|
||||
void SetControlOfInterest( pfGUIControlMod *c );
|
||||
pfGUIControlMod *GetControlOfInterest( void ) const { return fControlOfInterest; }
|
||||
@ -175,7 +175,7 @@ class pfGUIDialogMod : public plSingleModifier
|
||||
void Show( void );
|
||||
void ShowNoReset( void );
|
||||
void Hide( void );
|
||||
hsBool IsVisible( void ) { return IsEnabled(); }
|
||||
bool IsVisible( void ) { return IsEnabled(); }
|
||||
|
||||
pfGUIControlMod *GetFocus( void ) { return fFocusCtrl; }
|
||||
|
||||
|
@ -78,14 +78,14 @@ pfGUIDragBarCtrl::~pfGUIDragBarCtrl()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIDragBarCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIDragBarCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIDragBarCtrl::MsgReceive( plMessage *msg )
|
||||
bool pfGUIDragBarCtrl::MsgReceive( plMessage *msg )
|
||||
{
|
||||
return pfGUIControlMod::MsgReceive( msg );
|
||||
}
|
||||
@ -104,7 +104,7 @@ void pfGUIDragBarCtrl::Write( hsStream *s, hsResMgr *mgr )
|
||||
|
||||
//// UpdateBounds ////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIDragBarCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force )
|
||||
void pfGUIDragBarCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, bool force )
|
||||
{
|
||||
pfGUIControlMod::UpdateBounds( invXformMatrix, force );
|
||||
fBoundsValid = false;
|
||||
|
@ -57,10 +57,10 @@ class pfGUIDragBarCtrl : public pfGUIControlMod
|
||||
protected:
|
||||
|
||||
hsPoint3 fDragOffset;
|
||||
hsBool fDragging;
|
||||
hsBool fAnchored;
|
||||
bool fDragging;
|
||||
bool fAnchored;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h
|
||||
|
||||
@ -73,7 +73,7 @@ class pfGUIDragBarCtrl : public pfGUIControlMod
|
||||
GETINTERFACE_ANY( pfGUIDragBarCtrl, pfGUIControlMod );
|
||||
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
@ -82,10 +82,10 @@ class pfGUIDragBarCtrl : public pfGUIControlMod
|
||||
virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
|
||||
virtual void SetAnchored( hsBool anchored ) { fAnchored = anchored; }
|
||||
virtual hsBool IsAnchored(void) { return fAnchored; }
|
||||
virtual void SetAnchored( bool anchored ) { fAnchored = anchored; }
|
||||
virtual bool IsAnchored(void) { return fAnchored; }
|
||||
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false );
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false );
|
||||
|
||||
// Export only
|
||||
};
|
||||
|
@ -72,14 +72,14 @@ pfGUIDraggableMod::~pfGUIDraggableMod()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIDraggableMod::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIDraggableMod::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIDraggableMod::MsgReceive( plMessage *msg )
|
||||
bool pfGUIDraggableMod::MsgReceive( plMessage *msg )
|
||||
{
|
||||
return pfGUIControlMod::MsgReceive( msg );
|
||||
}
|
||||
@ -98,7 +98,7 @@ void pfGUIDraggableMod::Write( hsStream *s, hsResMgr *mgr )
|
||||
|
||||
//// UpdateBounds ////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIDraggableMod::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force )
|
||||
void pfGUIDraggableMod::UpdateBounds( hsMatrix44 *invXformMatrix, bool force )
|
||||
{
|
||||
pfGUIControlMod::UpdateBounds( invXformMatrix, force );
|
||||
fBoundsValid = false;
|
||||
@ -166,7 +166,7 @@ uint32_t pfGUIDraggableMod::IGetDesiredCursor( void ) const
|
||||
return plInputInterface::kCursor4WayDraggable;
|
||||
}
|
||||
|
||||
void pfGUIDraggableMod::StopDragging( hsBool cancel )
|
||||
void pfGUIDraggableMod::StopDragging( bool cancel )
|
||||
{
|
||||
if( fDragging )
|
||||
{
|
||||
|
@ -58,10 +58,10 @@ class pfGUIDraggableMod : public pfGUIControlMod
|
||||
|
||||
hsPoint3 fDragOffset, fLastMousePt;
|
||||
hsPoint3 fOrigCenter;
|
||||
hsBool fDragging;
|
||||
bool fDragging;
|
||||
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h
|
||||
|
||||
@ -88,7 +88,7 @@ class pfGUIDraggableMod : public pfGUIControlMod
|
||||
kStartingDrag
|
||||
};
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
@ -97,9 +97,9 @@ class pfGUIDraggableMod : public pfGUIControlMod
|
||||
virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false );
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false );
|
||||
|
||||
void StopDragging( hsBool cancel );
|
||||
void StopDragging( bool cancel );
|
||||
const hsPoint3 &GetLastMousePt( void ) const { return fLastMousePt; }
|
||||
};
|
||||
|
||||
|
@ -72,14 +72,14 @@ pfGUIDynDisplayCtrl::~pfGUIDynDisplayCtrl()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIDynDisplayCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIDynDisplayCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIDynDisplayCtrl::MsgReceive( plMessage *msg )
|
||||
bool pfGUIDynDisplayCtrl::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg );
|
||||
if( refMsg != nil )
|
||||
|
@ -79,7 +79,7 @@ class pfGUIDynDisplayCtrl : public pfGUIControlMod
|
||||
|
||||
hsTArray<hsGMaterial *> fMaterials;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
public:
|
||||
|
||||
@ -90,7 +90,7 @@ class pfGUIDynDisplayCtrl : public pfGUIControlMod
|
||||
GETINTERFACE_ANY( pfGUIDynDisplayCtrl, pfGUIControlMod );
|
||||
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
|
@ -86,14 +86,14 @@ pfGUIEditBoxMod::~pfGUIEditBoxMod()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIEditBoxMod::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIEditBoxMod::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIEditBoxMod::MsgReceive( plMessage *msg )
|
||||
bool pfGUIEditBoxMod::MsgReceive( plMessage *msg )
|
||||
{
|
||||
return pfGUIControlMod::MsgReceive( msg );
|
||||
}
|
||||
@ -235,7 +235,7 @@ void pfGUIEditBoxMod::HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers )
|
||||
{
|
||||
}
|
||||
|
||||
hsBool pfGUIEditBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
bool pfGUIEditBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
{
|
||||
if( fBuffer == nil )
|
||||
return false;
|
||||
@ -255,7 +255,7 @@ hsBool pfGUIEditBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers )
|
||||
bool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers )
|
||||
{
|
||||
if ( fSpecialCaptureKeyEventMode)
|
||||
{
|
||||
|
@ -66,15 +66,15 @@ class pfGUIEditBoxMod : public pfGUIControlMod
|
||||
wchar_t *fBuffer;
|
||||
uint32_t fBufferSize, fCursorPos;
|
||||
int32_t fScrollPos;
|
||||
hsBool fEscapedFlag;
|
||||
hsBool fFirstHalfExitKeyPushed;
|
||||
bool fEscapedFlag;
|
||||
bool fFirstHalfExitKeyPushed;
|
||||
|
||||
hsBool fSpecialCaptureKeyEventMode;
|
||||
bool fSpecialCaptureKeyEventMode;
|
||||
|
||||
plKeyDef fSavedKey;
|
||||
uint8_t fSavedModifiers;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
virtual void IPostSetUpDynTextMap( void );
|
||||
virtual void IUpdate( void );
|
||||
@ -92,7 +92,7 @@ class pfGUIEditBoxMod : public pfGUIControlMod
|
||||
CLASSNAME_REGISTER( pfGUIEditBoxMod );
|
||||
GETINTERFACE_ANY( pfGUIEditBoxMod, pfGUIControlMod );
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
@ -101,8 +101,8 @@ class pfGUIEditBoxMod : public pfGUIControlMod
|
||||
virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
|
||||
virtual hsBool HandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
virtual hsBool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers );
|
||||
virtual bool HandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
virtual bool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers );
|
||||
|
||||
virtual void PurgeDynaTextMapImage();
|
||||
|
||||
@ -117,14 +117,14 @@ class pfGUIEditBoxMod : public pfGUIControlMod
|
||||
void SetCursorToHome( void );
|
||||
void SetCursorToEnd( void );
|
||||
|
||||
hsBool WasEscaped( void ) { hsBool e = fEscapedFlag; fEscapedFlag = false; return e; }
|
||||
bool WasEscaped( void ) { bool e = fEscapedFlag; fEscapedFlag = false; return e; }
|
||||
|
||||
void SetSpecialCaptureKeyMode(hsBool state) { fSpecialCaptureKeyEventMode = state; }
|
||||
void SetSpecialCaptureKeyMode(bool state) { fSpecialCaptureKeyEventMode = state; }
|
||||
uint32_t GetLastKeyCaptured() { return (uint32_t)fSavedKey; }
|
||||
uint8_t GetLastModifiersCaptured() { return fSavedModifiers; }
|
||||
void SetLastKeyCapture(uint32_t key, uint8_t modifiers);
|
||||
|
||||
void SetChatMode(hsBool state) { plKeyboardDevice::IgnoreCapsLock(state); }
|
||||
void SetChatMode(bool state) { plKeyboardDevice::IgnoreCapsLock(state); }
|
||||
|
||||
// Extended event types
|
||||
enum ExtendedEvents
|
||||
|
@ -84,14 +84,14 @@ pfGUIKnobCtrl::pfGUIKnobCtrl() :
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIKnobCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIKnobCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIValueCtrl::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIKnobCtrl::MsgReceive( plMessage *msg )
|
||||
bool pfGUIKnobCtrl::MsgReceive( plMessage *msg )
|
||||
{
|
||||
return pfGUIValueCtrl::MsgReceive( msg );
|
||||
}
|
||||
@ -130,7 +130,7 @@ void pfGUIKnobCtrl::Write( hsStream *s, hsResMgr *mgr )
|
||||
|
||||
//// UpdateBounds ////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIKnobCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force )
|
||||
void pfGUIKnobCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, bool force )
|
||||
{
|
||||
pfGUIValueCtrl::UpdateBounds( invXformMatrix, force );
|
||||
if( fAnimationKeys.GetCount() > 0 )
|
||||
@ -266,7 +266,7 @@ void pfGUIKnobCtrl::SetAnimationKeys( hsTArray<plKey> &keys, const plString &
|
||||
// Loops through and computes the max begin and end for our animations. If
|
||||
// none of them are loaded and we're not already calced, returns false.
|
||||
|
||||
hsBool pfGUIKnobCtrl::ICalcAnimTimes( void )
|
||||
bool pfGUIKnobCtrl::ICalcAnimTimes( void )
|
||||
{
|
||||
if( fAnimTimesCalced )
|
||||
return true;
|
||||
|
@ -62,20 +62,20 @@ class pfGUIKnobCtrl : public pfGUIValueCtrl
|
||||
|
||||
hsPoint3 fDragStart;
|
||||
float fDragValue;
|
||||
hsBool fDragging;
|
||||
bool fDragging;
|
||||
|
||||
hsPoint3 fAnimStartPos, fAnimEndPos; // Calculated at export time for kMapToScreenRange
|
||||
float fDragRangeMin, fDragRangeMax;
|
||||
|
||||
// Computed once, once an anim is loaded that we can compute this with
|
||||
float fAnimBegin, fAnimEnd;
|
||||
hsBool fAnimTimesCalced;
|
||||
bool fAnimTimesCalced;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
virtual uint32_t IGetDesiredCursor( void ) const; // As specified in plInputInterface.h
|
||||
|
||||
hsBool ICalcAnimTimes( void );
|
||||
bool ICalcAnimTimes( void );
|
||||
|
||||
public:
|
||||
|
||||
@ -94,7 +94,7 @@ class pfGUIKnobCtrl : public pfGUIValueCtrl
|
||||
kMapToAnimationRange
|
||||
};
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
@ -103,7 +103,7 @@ class pfGUIKnobCtrl : public pfGUIValueCtrl
|
||||
virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false );
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false );
|
||||
|
||||
virtual void SetCurrValue( float v );
|
||||
|
||||
|
@ -76,7 +76,7 @@ void pfGUIListBoxMod::plSmallRect::Set( int16_t l, int16_t t, int16_t r, int1
|
||||
fBottom = b;
|
||||
}
|
||||
|
||||
hsBool pfGUIListBoxMod::plSmallRect::Contains( int16_t x, int16_t y )
|
||||
bool pfGUIListBoxMod::plSmallRect::Contains( int16_t x, int16_t y )
|
||||
{
|
||||
if( x < fLeft || x > fRight || y < fTop || y > fBottom )
|
||||
return false;
|
||||
@ -140,14 +140,14 @@ pfGUIListBoxMod::~pfGUIListBoxMod()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIListBoxMod::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIListBoxMod::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIListBoxMod::MsgReceive( plMessage *msg )
|
||||
bool pfGUIListBoxMod::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg );
|
||||
if( refMsg != nil )
|
||||
@ -234,7 +234,7 @@ void pfGUIListBoxMod::IUpdate( void )
|
||||
{
|
||||
int end = ( j < fWrapStartIdxs.GetCount() - 1 ) ? fWrapStartIdxs[ j + 1 ] : fElements.GetCount();
|
||||
|
||||
hsBool anySelected = false;
|
||||
bool anySelected = false;
|
||||
for( i = fWrapStartIdxs[ j ]; i < end; i++ )
|
||||
anySelected |= fElements[ i ]->IsSelected();
|
||||
|
||||
@ -338,7 +338,7 @@ void pfGUIListBoxMod::IUpdate( void )
|
||||
{
|
||||
int end = ( j < fWrapStartIdxs.GetCount() - 1 ) ? fWrapStartIdxs[ j + 1 ] : fElements.GetCount();
|
||||
|
||||
hsBool anySelected = false;
|
||||
bool anySelected = false;
|
||||
for( i = fWrapStartIdxs[ j ]; i < end; i++ )
|
||||
anySelected |= fElements[ i ]->IsSelected();
|
||||
|
||||
@ -544,7 +544,7 @@ void pfGUIListBoxMod::Write( hsStream *s, hsResMgr *mgr )
|
||||
// based on the position. This allows us to act etheral (i.e. pass mouse
|
||||
// messages through) when the mouse is over an empty portion of the list.
|
||||
|
||||
hsBool pfGUIListBoxMod::FilterMousePosition( hsPoint3 &mousePt )
|
||||
bool pfGUIListBoxMod::FilterMousePosition( hsPoint3 &mousePt )
|
||||
{
|
||||
if( !HasFlag( kAllowMousePassThrough ) )
|
||||
return true;
|
||||
@ -845,7 +845,7 @@ void pfGUIListBoxMod::IFindSelectionRange( int32_t *min, int32_t *max )
|
||||
|
||||
//// ISelectRange ////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIListBoxMod::ISelectRange( int8_t min, int8_t max, hsBool select )
|
||||
void pfGUIListBoxMod::ISelectRange( int8_t min, int8_t max, bool select )
|
||||
{
|
||||
int16_t i;
|
||||
|
||||
@ -921,12 +921,12 @@ void pfGUIListBoxMod::AddSelection( int32_t item )
|
||||
|
||||
//// HandleKeyPress //////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIListBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
bool pfGUIListBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool pfGUIListBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers )
|
||||
bool pfGUIListBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers )
|
||||
{
|
||||
if( key == KEY_CAPSLOCK )
|
||||
return false;
|
||||
|
@ -68,7 +68,7 @@ class pfGUIListBoxMod : public pfGUIControlMod
|
||||
int16_t fLeft, fTop, fRight, fBottom;
|
||||
|
||||
void Set( int16_t l, int16_t t, int16_t r, int16_t b );
|
||||
hsBool Contains( int16_t x, int16_t y );
|
||||
bool Contains( int16_t x, int16_t y );
|
||||
|
||||
plSmallRect& operator=(const int zero) { fLeft = fTop = fRight = fBottom = 0; return *this; }
|
||||
};
|
||||
@ -81,15 +81,15 @@ class pfGUIListBoxMod : public pfGUIControlMod
|
||||
int32_t fCurrClick, fScrollPos, fCurrHover;
|
||||
uint8_t fModsAtDragTime;
|
||||
int32_t fMinSel, fMaxSel;
|
||||
hsBool fCheckScroll, fClicking;
|
||||
bool fCheckScroll, fClicking;
|
||||
int32_t fSingleSelElement;
|
||||
hsBool fScrollRangeUpdateDeferred;
|
||||
hsBool fLocked, fReadyToRoll;
|
||||
bool fScrollRangeUpdateDeferred;
|
||||
bool fLocked, fReadyToRoll;
|
||||
hsTArray<plSmallRect> fElementBounds;
|
||||
hsTArray<int16_t> fWrapStartIdxs;
|
||||
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
void ICalcScrollRange( void );
|
||||
void ICalcWrapStarts( void );
|
||||
@ -100,7 +100,7 @@ class pfGUIListBoxMod : public pfGUIControlMod
|
||||
|
||||
int32_t IGetItemFromPoint( hsPoint3 &mousePt );
|
||||
void IFindSelectionRange( int32_t *min, int32_t *max );
|
||||
void ISelectRange( int8_t min, int8_t max, hsBool select );
|
||||
void ISelectRange( int8_t min, int8_t max, bool select );
|
||||
|
||||
public:
|
||||
|
||||
@ -138,7 +138,7 @@ class pfGUIListBoxMod : public pfGUIControlMod
|
||||
kRefScrollCtrl = kRefDerivedStart
|
||||
};
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
@ -149,10 +149,10 @@ class pfGUIListBoxMod : public pfGUIControlMod
|
||||
virtual void HandleMouseHover( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseDblClick( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
|
||||
virtual hsBool HandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
virtual hsBool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers );
|
||||
virtual bool HandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
virtual bool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers );
|
||||
|
||||
virtual hsBool FilterMousePosition( hsPoint3 &mousePt );
|
||||
virtual bool FilterMousePosition( hsPoint3 &mousePt );
|
||||
|
||||
virtual void PurgeDynaTextMapImage();
|
||||
|
||||
@ -193,7 +193,7 @@ class pfGUIListBoxMod : public pfGUIControlMod
|
||||
|
||||
// Export only
|
||||
void SetScrollCtrl( pfGUIValueCtrl *ctrl ) { fScrollControl = ctrl; }
|
||||
void SetSingleSelect( hsBool yes ) { if( yes ) SetFlag( kSingleSelect ); else ClearFlag( kSingleSelect ); }
|
||||
void SetSingleSelect( bool yes ) { if( yes ) SetFlag( kSingleSelect ); else ClearFlag( kSingleSelect ); }
|
||||
};
|
||||
|
||||
#endif // _pfGUIListBoxMod_h
|
||||
|
@ -121,7 +121,7 @@ void pfGUIListText::Write( hsStream *s, hsResMgr *mgr )
|
||||
delete [] text;
|
||||
}
|
||||
|
||||
hsBool pfGUIListText::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight )
|
||||
bool pfGUIListText::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight )
|
||||
{
|
||||
textGen->SetJustify( (plDynamicTextMap::Justify)fJustify );
|
||||
if( fSelected )
|
||||
@ -210,7 +210,7 @@ pfGUIListPicture::pfGUIListPicture() : pfGUIListElement( kPicture )
|
||||
fMipmapKey = nil;
|
||||
}
|
||||
|
||||
pfGUIListPicture::pfGUIListPicture( plKey mipKey, hsBool respectAlpha ) : pfGUIListElement( kPicture )
|
||||
pfGUIListPicture::pfGUIListPicture( plKey mipKey, bool respectAlpha ) : pfGUIListElement( kPicture )
|
||||
{
|
||||
fBorderSize = 2;
|
||||
fMipmapKey = mipKey;
|
||||
@ -247,7 +247,7 @@ void pfGUIListPicture::Write( hsStream *s, hsResMgr *mgr )
|
||||
|
||||
}
|
||||
|
||||
hsBool pfGUIListPicture::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight )
|
||||
bool pfGUIListPicture::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight )
|
||||
{
|
||||
if( fSelected )
|
||||
textGen->FillRect( x, y, maxWidth, maxHeight, fColors->fSelBackColor );
|
||||
@ -337,7 +337,7 @@ void pfGUIListTreeRoot::Write( hsStream *s, hsResMgr *mgr )
|
||||
delete [] temp;
|
||||
}
|
||||
|
||||
hsBool pfGUIListTreeRoot::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight )
|
||||
bool pfGUIListTreeRoot::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight )
|
||||
{
|
||||
textGen->SetJustify( plDynamicTextMap::kLeftJustify );
|
||||
if( fSelected )
|
||||
@ -368,7 +368,7 @@ hsBool pfGUIListTreeRoot::Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool pfGUIListTreeRoot::MouseClicked( uint16_t localX, uint16_t localY )
|
||||
bool pfGUIListTreeRoot::MouseClicked( uint16_t localX, uint16_t localY )
|
||||
{
|
||||
if( fSkin != nil )
|
||||
{
|
||||
@ -450,7 +450,7 @@ void pfGUIListTreeRoot::RemoveChild( uint32_t idx )
|
||||
fChildren.Remove( idx );
|
||||
}
|
||||
|
||||
void pfGUIListTreeRoot::ShowChildren( hsBool s )
|
||||
void pfGUIListTreeRoot::ShowChildren( bool s )
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
@ -460,7 +460,7 @@ void pfGUIListTreeRoot::ShowChildren( hsBool s )
|
||||
fChildren[ i ]->SetCollapsed( !s );
|
||||
}
|
||||
|
||||
void pfGUIListTreeRoot::SetCollapsed( hsBool c )
|
||||
void pfGUIListTreeRoot::SetCollapsed( bool c )
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
|
@ -57,10 +57,10 @@ class pfGUIListElement
|
||||
{
|
||||
protected:
|
||||
|
||||
hsBool fSelected;
|
||||
bool fSelected;
|
||||
const uint8_t fType;
|
||||
|
||||
hsBool fCollapsed; // For tree view support
|
||||
bool fCollapsed; // For tree view support
|
||||
uint8_t fIndentLevel; // Ditto
|
||||
|
||||
pfGUIColorScheme *fColors;
|
||||
@ -81,25 +81,25 @@ class pfGUIListElement
|
||||
virtual void Read( hsStream *s, hsResMgr *mgr );
|
||||
virtual void Write( hsStream *s, hsResMgr *mgr );
|
||||
|
||||
virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) = 0;
|
||||
virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight ) = 0;
|
||||
virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height ) = 0;
|
||||
virtual int CompareTo( pfGUIListElement *rightSide ) = 0;
|
||||
|
||||
virtual void SetSelected( hsBool sel ) { fSelected = sel; }
|
||||
virtual hsBool IsSelected( void ) { return fSelected; }
|
||||
virtual void SetSelected( bool sel ) { fSelected = sel; }
|
||||
virtual bool IsSelected( void ) { return fSelected; }
|
||||
|
||||
virtual hsBool CanBeDragged( void ) { return false; }
|
||||
virtual bool CanBeDragged( void ) { return false; }
|
||||
|
||||
// Return true here if you need the list refreshed
|
||||
virtual hsBool MouseClicked( uint16_t localX, uint16_t localY ) { return false; }
|
||||
virtual bool MouseClicked( uint16_t localX, uint16_t localY ) { return false; }
|
||||
|
||||
uint8_t GetType( void ) { return fType; }
|
||||
|
||||
void SetColorScheme( pfGUIColorScheme *scheme ) { fColors = scheme; }
|
||||
void SetSkin( pfGUISkin *skin ) { fSkin = skin; }
|
||||
|
||||
hsBool IsCollapsed( void ) const { return fCollapsed; }
|
||||
virtual void SetCollapsed( hsBool c ) { fCollapsed = c; }
|
||||
bool IsCollapsed( void ) const { return fCollapsed; }
|
||||
virtual void SetCollapsed( bool c ) { fCollapsed = c; }
|
||||
|
||||
uint8_t GetIndentLevel( void ) const { return fIndentLevel; }
|
||||
void SetIndentLevel( uint8_t i ) { fIndentLevel = i; }
|
||||
@ -131,11 +131,11 @@ class pfGUIListText : public pfGUIListElement
|
||||
virtual void Read( hsStream *s, hsResMgr *mgr );
|
||||
virtual void Write( hsStream *s, hsResMgr *mgr );
|
||||
|
||||
virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight );
|
||||
virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight );
|
||||
virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height );
|
||||
virtual int CompareTo( pfGUIListElement *rightSide );
|
||||
|
||||
virtual hsBool CanBeDragged( void ) { return true; }
|
||||
virtual bool CanBeDragged( void ) { return true; }
|
||||
virtual void SetJustify( JustifyTypes justify );
|
||||
|
||||
// These two are virtual so we can derive and override them
|
||||
@ -150,25 +150,25 @@ class pfGUIListPicture : public pfGUIListElement
|
||||
|
||||
plKey fMipmapKey;
|
||||
uint8_t fBorderSize; // Defaults to 2
|
||||
hsBool fRespectAlpha;
|
||||
bool fRespectAlpha;
|
||||
|
||||
public:
|
||||
|
||||
pfGUIListPicture();
|
||||
pfGUIListPicture( plKey mipKey, hsBool respectAlpha );
|
||||
pfGUIListPicture( plKey mipKey, bool respectAlpha );
|
||||
virtual ~pfGUIListPicture();
|
||||
|
||||
virtual void Read( hsStream *s, hsResMgr *mgr );
|
||||
virtual void Write( hsStream *s, hsResMgr *mgr );
|
||||
|
||||
virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight );
|
||||
virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight );
|
||||
virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height );
|
||||
virtual int CompareTo( pfGUIListElement *rightSide );
|
||||
|
||||
virtual hsBool CanBeDragged( void ) { return false; }
|
||||
virtual bool CanBeDragged( void ) { return false; }
|
||||
|
||||
void SetBorderSize( uint32_t size ) { fBorderSize = (uint8_t)size; }
|
||||
void SetRespectAlpha( hsBool r ) { fRespectAlpha = r; }
|
||||
void SetRespectAlpha( bool r ) { fRespectAlpha = r; }
|
||||
|
||||
};
|
||||
|
||||
@ -177,7 +177,7 @@ class pfGUIListTreeRoot : public pfGUIListElement
|
||||
protected:
|
||||
|
||||
wchar_t *fText;
|
||||
hsBool fShowChildren;
|
||||
bool fShowChildren;
|
||||
|
||||
hsTArray<pfGUIListElement *> fChildren;
|
||||
|
||||
@ -191,11 +191,11 @@ class pfGUIListTreeRoot : public pfGUIListElement
|
||||
virtual void Read( hsStream *s, hsResMgr *mgr );
|
||||
virtual void Write( hsStream *s, hsResMgr *mgr );
|
||||
|
||||
virtual hsBool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight );
|
||||
virtual bool Draw( plDynamicTextMap *textGen, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight );
|
||||
virtual void GetSize( plDynamicTextMap *textGen, uint16_t *width, uint16_t *height );
|
||||
virtual int CompareTo( pfGUIListElement *rightSide );
|
||||
|
||||
virtual hsBool MouseClicked( uint16_t localX, uint16_t localY );
|
||||
virtual bool MouseClicked( uint16_t localX, uint16_t localY );
|
||||
|
||||
const wchar_t *GetTitle( void ) { return fText; }
|
||||
void SetTitle( const char *text );
|
||||
@ -207,10 +207,10 @@ class pfGUIListTreeRoot : public pfGUIListElement
|
||||
void AddChild( pfGUIListElement *el );
|
||||
void RemoveChild( uint32_t idx );
|
||||
|
||||
virtual void SetCollapsed( hsBool c );
|
||||
virtual void SetCollapsed( bool c );
|
||||
|
||||
void ShowChildren( hsBool s );
|
||||
hsBool IsShowingChildren( void ) const { return fShowChildren; }
|
||||
void ShowChildren( bool s );
|
||||
bool IsShowingChildren( void ) const { return fShowChildren; }
|
||||
};
|
||||
|
||||
//// pfGUIDropTargetProc /////////////////////////////////////////////////////
|
||||
@ -233,12 +233,12 @@ class pfGUIDropTargetProc
|
||||
|
||||
pfGUIDropTargetProc() { fRefCnt = 0; }
|
||||
|
||||
virtual hsBool CanEat( pfGUIListElement *element, pfGUIControlMod *source ) = 0;
|
||||
virtual bool CanEat( pfGUIListElement *element, pfGUIControlMod *source ) = 0;
|
||||
virtual void Eat( pfGUIListElement *element, pfGUIControlMod *source, pfGUIControlMod *parent ) = 0;
|
||||
|
||||
// ONLY THE GUI SYSTEM SHOULD CALL THESE
|
||||
void IncRef( void ) { fRefCnt++; }
|
||||
hsBool DecRef( void ) { fRefCnt--; return ( fRefCnt > 0 ) ? false : true; }
|
||||
bool DecRef( void ) { fRefCnt--; return ( fRefCnt > 0 ) ? false : true; }
|
||||
};
|
||||
|
||||
#endif // _pfGUIListElement_h
|
||||
|
@ -158,7 +158,7 @@ void pfGUIMenuItem::IUpdateSkinBuffers( void )
|
||||
//// IUpdateSingleSkinBuffer /////////////////////////////////////////////////
|
||||
// Broken down functionality for the above function
|
||||
|
||||
void pfGUIMenuItem::IUpdateSingleSkinBuffer( uint16_t y, hsBool sel )
|
||||
void pfGUIMenuItem::IUpdateSingleSkinBuffer( uint16_t y, bool sel )
|
||||
{
|
||||
hsAssert( fSkin != nil && fDynTextMap != nil, "Invalid pointers in IUpdateSingleSkinBuffer()" );
|
||||
|
||||
@ -386,7 +386,7 @@ void pfGUIMenuItem::GetTextExtents( uint16_t &width, uint16_t &height )
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIMenuItem::MsgReceive( plMessage *msg )
|
||||
bool pfGUIMenuItem::MsgReceive( plMessage *msg )
|
||||
{
|
||||
return pfGUIButtonMod::MsgReceive( msg );
|
||||
}
|
||||
@ -468,7 +468,7 @@ void pfGUIMenuItem::HandleMouseHover( hsPoint3 &mousePt, uint8_t modifiers )
|
||||
//// SetInteresting //////////////////////////////////////////////////////////
|
||||
// Overridden to play mouse over animation when we're interesting
|
||||
|
||||
void pfGUIMenuItem::SetInteresting( hsBool i )
|
||||
void pfGUIMenuItem::SetInteresting( bool i )
|
||||
{
|
||||
pfGUIButtonMod::SetInteresting( i );
|
||||
IUpdate();
|
||||
|
@ -68,17 +68,17 @@ class pfGUIMenuItem : public pfGUIButtonMod
|
||||
protected:
|
||||
|
||||
wchar_t *fName;
|
||||
hsBool fReportingHover;
|
||||
bool fReportingHover;
|
||||
|
||||
HowToSkin fHowToSkin;
|
||||
hsBool fSkinBuffersUpdated;
|
||||
bool fSkinBuffersUpdated;
|
||||
|
||||
virtual void IGrowDTMDimsToDesiredSize( uint16_t &width, uint16_t &height );
|
||||
virtual void IPostSetUpDynTextMap( void );
|
||||
virtual void IUpdate( void );
|
||||
|
||||
void IUpdateSkinBuffers( void );
|
||||
void IUpdateSingleSkinBuffer( uint16_t y, hsBool sel );
|
||||
void IUpdateSingleSkinBuffer( uint16_t y, bool sel );
|
||||
|
||||
public:
|
||||
|
||||
@ -101,12 +101,12 @@ class pfGUIMenuItem : public pfGUIButtonMod
|
||||
kMouseExit
|
||||
};
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
|
||||
virtual void SetInteresting( hsBool i );
|
||||
virtual void SetInteresting( bool i );
|
||||
|
||||
virtual void HandleMouseDown( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
|
@ -189,14 +189,14 @@ pfGUIMultiLineEditCtrl::~pfGUIMultiLineEditCtrl()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIMultiLineEditCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIMultiLineEditCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIMultiLineEditCtrl::MsgReceive( plMessage *msg )
|
||||
bool pfGUIMultiLineEditCtrl::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg );
|
||||
if( refMsg != nil )
|
||||
@ -295,7 +295,7 @@ void pfGUIMultiLineEditCtrl::IUpdateScrollRange( void )
|
||||
}
|
||||
}
|
||||
|
||||
void pfGUIMultiLineEditCtrl::SetScrollEnable( hsBool state )
|
||||
void pfGUIMultiLineEditCtrl::SetScrollEnable( bool state )
|
||||
{
|
||||
if (fScrollControl == nil )
|
||||
return;
|
||||
@ -516,7 +516,7 @@ inline bool pfGUIMultiLineEditCtrl::IIsCodeChar( const wchar_t c )
|
||||
// type. If none is found, they set the given parameter to the default value
|
||||
// and return false.
|
||||
|
||||
hsBool pfGUIMultiLineEditCtrl::IFindLastColorCode( int32_t pos, hsColorRGBA &color, hsBool ignoreFirstCharacter ) const
|
||||
bool pfGUIMultiLineEditCtrl::IFindLastColorCode( int32_t pos, hsColorRGBA &color, bool ignoreFirstCharacter ) const
|
||||
{
|
||||
for( ; pos >= 0; pos -= IOffsetToNextCharFromPos( pos - 1 ) )
|
||||
{
|
||||
@ -531,7 +531,7 @@ hsBool pfGUIMultiLineEditCtrl::IFindLastColorCode( int32_t pos, hsColorRGBA &co
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool pfGUIMultiLineEditCtrl::IFindLastStyleCode( int32_t pos, uint8_t &style, hsBool ignoreFirstCharacter ) const
|
||||
bool pfGUIMultiLineEditCtrl::IFindLastStyleCode( int32_t pos, uint8_t &style, bool ignoreFirstCharacter ) const
|
||||
{
|
||||
for( ; pos >= 0; pos -= IOffsetToNextCharFromPos( pos - 1 ) )
|
||||
{
|
||||
@ -552,7 +552,7 @@ hsBool pfGUIMultiLineEditCtrl::IFindLastStyleCode( int32_t pos, uint8_t &style,
|
||||
// given. Takes into account style codes and special characters (like returns
|
||||
// and tabs). Returns the final X value after rendering.
|
||||
|
||||
uint32_t pfGUIMultiLineEditCtrl::IRenderLine( uint16_t x, uint16_t y, int32_t start, int32_t end, hsBool dontRender )
|
||||
uint32_t pfGUIMultiLineEditCtrl::IRenderLine( uint16_t x, uint16_t y, int32_t start, int32_t end, bool dontRender )
|
||||
{
|
||||
int32_t pos;
|
||||
hsColorRGBA currColor = fFontColor;
|
||||
@ -671,7 +671,7 @@ void pfGUIMultiLineEditCtrl::Write( hsStream *s, hsResMgr *mgr )
|
||||
//// IPointToPosition ////////////////////////////////////////////////////////
|
||||
// Translates a 2D point on the visible texture surface to a cursor position.
|
||||
|
||||
int32_t pfGUIMultiLineEditCtrl::IPointToPosition( int16_t ptX, int16_t ptY, hsBool searchOutsideBounds )
|
||||
int32_t pfGUIMultiLineEditCtrl::IPointToPosition( int16_t ptX, int16_t ptY, bool searchOutsideBounds )
|
||||
{
|
||||
// Find our line
|
||||
int32_t line, start, pos, end, lastVisibleLine;
|
||||
@ -758,7 +758,7 @@ inline int32_t pfGUIMultiLineEditCtrl::IOffsetToNextCharFromPos( int32_t posi
|
||||
// changed, so we assume as a hint that every line before the starting line
|
||||
// is still valid. If startingLine = 0, we recalc 'em all.
|
||||
|
||||
int32_t pfGUIMultiLineEditCtrl::IRecalcLineStarts( int32_t startingLine, hsBool force, hsBool dontUpdate )
|
||||
int32_t pfGUIMultiLineEditCtrl::IRecalcLineStarts( int32_t startingLine, bool force, bool dontUpdate )
|
||||
{
|
||||
uint16_t wrapWidth, widthCounter;
|
||||
uint32_t charPos = 0, nextPos, startPos, lastStartPos;
|
||||
@ -900,7 +900,7 @@ int32_t pfGUIMultiLineEditCtrl::IRecalcLineStarts( int32_t startingLine, hsBoo
|
||||
//// IStoreLineStart /////////////////////////////////////////////////////////
|
||||
// Stores a single line start, expanding the array if necessary.
|
||||
|
||||
hsBool pfGUIMultiLineEditCtrl::IStoreLineStart( uint32_t line, int32_t start )
|
||||
bool pfGUIMultiLineEditCtrl::IStoreLineStart( uint32_t line, int32_t start )
|
||||
{
|
||||
if( fLineStarts.GetCount() <= line )
|
||||
{
|
||||
@ -910,7 +910,7 @@ hsBool pfGUIMultiLineEditCtrl::IStoreLineStart( uint32_t line, int32_t start )
|
||||
fLineStarts[ line ] = -1;
|
||||
}
|
||||
|
||||
hsBool same = ( fLineStarts[ line ] == start ) ? true : false;
|
||||
bool same = ( fLineStarts[ line ] == start ) ? true : false;
|
||||
fLineStarts[ line ] = start;
|
||||
return same;
|
||||
}
|
||||
@ -937,7 +937,7 @@ int32_t pfGUIMultiLineEditCtrl::IFindCursorLine( int32_t cursorPos ) const
|
||||
//// IRecalcFromCursor ///////////////////////////////////////////////////////
|
||||
// Recalcs starting with the line that the cursor is sitting on
|
||||
|
||||
void pfGUIMultiLineEditCtrl::IRecalcFromCursor( hsBool force )
|
||||
void pfGUIMultiLineEditCtrl::IRecalcFromCursor( bool force )
|
||||
{
|
||||
IRecalcLineStarts( IFindCursorLine(), force );
|
||||
}
|
||||
@ -951,7 +951,7 @@ void pfGUIMultiLineEditCtrl::IRecalcFromCursor( hsBool force )
|
||||
// doing this, we are inserting into (and offseting inside) a selection,
|
||||
// so we don't want the start moving around.
|
||||
|
||||
void pfGUIMultiLineEditCtrl::IOffsetLineStarts( uint32_t position, int32_t offset, hsBool offsetSelectionEnd )
|
||||
void pfGUIMultiLineEditCtrl::IOffsetLineStarts( uint32_t position, int32_t offset, bool offsetSelectionEnd )
|
||||
{
|
||||
int32_t line;
|
||||
|
||||
@ -1030,7 +1030,7 @@ void pfGUIMultiLineEditCtrl::HandleMouseDrag( hsPoint3 &mousePt, uint8_t modi
|
||||
IMoveCursorTo( IPointToPosition( (int16_t)(mousePt.fX), (int16_t)(mousePt.fY) ) );
|
||||
}
|
||||
|
||||
hsBool pfGUIMultiLineEditCtrl::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
bool pfGUIMultiLineEditCtrl::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
{
|
||||
if ((fPrevCtrl || fNextCtrl) && (fLineStarts.GetCount() <= GetFirstVisibleLine()))
|
||||
return true; // we're ignoring if we can't actually edit our visible frame (and we're linked)
|
||||
@ -1052,7 +1052,7 @@ hsBool pfGUIMultiLineEditCtrl::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool pfGUIMultiLineEditCtrl::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers )
|
||||
bool pfGUIMultiLineEditCtrl::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers )
|
||||
{
|
||||
if( key == KEY_CAPSLOCK )
|
||||
return false;
|
||||
@ -1848,7 +1848,7 @@ void pfGUIMultiLineEditCtrl::SetFontSize(uint8_t fontSize)
|
||||
}
|
||||
|
||||
// are we showing the beginning of the buffer? (controls before us are too far up)
|
||||
hsBool pfGUIMultiLineEditCtrl::ShowingBeginningOfBuffer()
|
||||
bool pfGUIMultiLineEditCtrl::ShowingBeginningOfBuffer()
|
||||
{
|
||||
if (fScrollPos == 0)
|
||||
return true;
|
||||
@ -1856,7 +1856,7 @@ hsBool pfGUIMultiLineEditCtrl::ShowingBeginningOfBuffer()
|
||||
}
|
||||
|
||||
// are we showing the end of the buffer? (controls after us are too far down)
|
||||
hsBool pfGUIMultiLineEditCtrl::ShowingEndOfBuffer()
|
||||
bool pfGUIMultiLineEditCtrl::ShowingEndOfBuffer()
|
||||
{
|
||||
//IRecalcLineStarts(0,true); // This function gets called a lot from the journal book, so IRecalcLineStarts() REALLY slows things
|
||||
// down if we're looking at a large amount of text, hopefully we can mess with the existing line starts for now without issue
|
||||
|
@ -100,7 +100,7 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod
|
||||
hsTArray<int32_t> fLineStarts;
|
||||
uint16_t fLineHeight, fCurrCursorX, fCurrCursorY;
|
||||
int32_t fCursorPos, fLastCursorLine;
|
||||
hsBool fReadyToRender;
|
||||
bool fReadyToRender;
|
||||
hsBounds3Ext fLastP2PArea;
|
||||
int8_t fLockCount;
|
||||
uint8_t fCalcedFontSize; // The font size that we calced our line height at
|
||||
@ -111,7 +111,7 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod
|
||||
static wchar_t fColorCodeChar, fStyleCodeChar;
|
||||
static uint32_t fColorCodeSize, fStyleCodeSize;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
virtual void IPostSetUpDynTextMap( void );
|
||||
virtual void IUpdate( void );
|
||||
@ -148,19 +148,19 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod
|
||||
void IMoveCursorTo( int32_t position ); // Updates selection
|
||||
void ISetCursor( int32_t newPosition ); // Doesn't update selection
|
||||
|
||||
int32_t IRecalcLineStarts( int32_t startingLine, hsBool force, hsBool dontUpdate = false );
|
||||
void IRecalcFromCursor( hsBool forceUpdate = false );
|
||||
int32_t IRecalcLineStarts( int32_t startingLine, bool force, bool dontUpdate = false );
|
||||
void IRecalcFromCursor( bool forceUpdate = false );
|
||||
int32_t IFindCursorLine( int32_t cursorPos = -1 ) const;
|
||||
hsBool IStoreLineStart( uint32_t line, int32_t start );
|
||||
void IOffsetLineStarts( uint32_t position, int32_t offset, hsBool offsetSelectionEnd = false );
|
||||
int32_t IPointToPosition( int16_t x, int16_t y, hsBool searchOutsideBounds = false );
|
||||
bool IStoreLineStart( uint32_t line, int32_t start );
|
||||
void IOffsetLineStarts( uint32_t position, int32_t offset, bool offsetSelectionEnd = false );
|
||||
int32_t IPointToPosition( int16_t x, int16_t y, bool searchOutsideBounds = false );
|
||||
int32_t ICalcNumVisibleLines( void ) const;
|
||||
|
||||
void IReadColorCode( int32_t &pos, hsColorRGBA &color ) const;
|
||||
void IReadStyleCode( int32_t &pos, uint8_t &fontStyle ) const;
|
||||
uint32_t IRenderLine( uint16_t x, uint16_t y, int32_t start, int32_t end, hsBool dontRender = false );
|
||||
hsBool IFindLastColorCode( int32_t pos, hsColorRGBA &color, hsBool ignoreFirstCharacter = false ) const;
|
||||
hsBool IFindLastStyleCode( int32_t pos, uint8_t &style, hsBool ignoreFirstCharacter = false ) const;
|
||||
uint32_t IRenderLine( uint16_t x, uint16_t y, int32_t start, int32_t end, bool dontRender = false );
|
||||
bool IFindLastColorCode( int32_t pos, hsColorRGBA &color, bool ignoreFirstCharacter = false ) const;
|
||||
bool IFindLastStyleCode( int32_t pos, uint8_t &style, bool ignoreFirstCharacter = false ) const;
|
||||
|
||||
inline static bool IIsCodeChar( const wchar_t c );
|
||||
inline static bool IIsRenderable( const wchar_t c );
|
||||
@ -197,7 +197,7 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod
|
||||
CLASSNAME_REGISTER( pfGUIMultiLineEditCtrl );
|
||||
GETINTERFACE_ANY( pfGUIMultiLineEditCtrl, pfGUIControlMod );
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
@ -206,8 +206,8 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod
|
||||
virtual void HandleMouseUp( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
virtual void HandleMouseDrag( hsPoint3 &mousePt, uint8_t modifiers );
|
||||
|
||||
virtual hsBool HandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
virtual hsBool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers );
|
||||
virtual bool HandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
virtual bool HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef key, uint8_t modifiers );
|
||||
|
||||
virtual void PurgeDynaTextMapImage();
|
||||
|
||||
@ -247,9 +247,9 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod
|
||||
|
||||
void Lock( void );
|
||||
void Unlock( void );
|
||||
hsBool IsLocked( void ) const { return ( fLockCount > 0 ) ? true : false; }
|
||||
bool IsLocked( void ) const { return ( fLockCount > 0 ) ? true : false; }
|
||||
|
||||
void SetScrollEnable( hsBool state );
|
||||
void SetScrollEnable( bool state );
|
||||
|
||||
void ForceUpdate() {/*IRecalcLineStarts(0,true);*/IUpdateLineStarts(); IUpdate();}
|
||||
|
||||
@ -275,8 +275,8 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod
|
||||
void SetFontSize(uint8_t fontSize);
|
||||
void SetFontStyle(uint8_t fontStyle) {fFontStyle = fontStyle; fFontFlagsSet |= kFontStyleSet;}
|
||||
|
||||
hsBool ShowingBeginningOfBuffer();
|
||||
hsBool ShowingEndOfBuffer();
|
||||
bool ShowingBeginningOfBuffer();
|
||||
bool ShowingEndOfBuffer();
|
||||
|
||||
void DeleteLinesFromTop(int numLines); // cursor and scroll position might be off after this call, not valid on connected controls
|
||||
};
|
||||
|
@ -167,7 +167,7 @@ pfGUIPopUpMenu::~pfGUIPopUpMenu()
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIPopUpMenu::MsgReceive( plMessage *msg )
|
||||
bool pfGUIPopUpMenu::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plGenRefMsg *ref = plGenRefMsg::ConvertNoRef( msg );
|
||||
if( ref != nil )
|
||||
@ -311,7 +311,7 @@ void pfGUIPopUpMenu::SetOriginAnchor( plSceneObject *anchor, pfGUIDialogMod *
|
||||
|
||||
//// SetEnabled //////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIPopUpMenu::SetEnabled( hsBool e )
|
||||
void pfGUIPopUpMenu::SetEnabled( bool e )
|
||||
{
|
||||
if( e && fNeedsRebuilding )
|
||||
{
|
||||
@ -429,7 +429,7 @@ void pfGUIPopUpMenu::IHandleMenuSomething( uint32_t idx, pfGUIControlMod *ctr
|
||||
//// IBuildMenu //////////////////////////////////////////////////////////////
|
||||
// Given the list of menu items, builds our set of dynamic buttons
|
||||
|
||||
hsBool pfGUIPopUpMenu::IBuildMenu( void )
|
||||
bool pfGUIPopUpMenu::IBuildMenu( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -621,10 +621,10 @@ void pfGUIPopUpMenu::ITearDownMenu( void )
|
||||
|
||||
//// HandleMouseEvent ////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIPopUpMenu::HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY,
|
||||
bool pfGUIPopUpMenu::HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY,
|
||||
uint8_t modifiers )
|
||||
{
|
||||
hsBool r = pfGUIDialogMod::HandleMouseEvent( event, mouseX, mouseY, modifiers );
|
||||
bool r = pfGUIDialogMod::HandleMouseEvent( event, mouseX, mouseY, modifiers );
|
||||
if( r == false && event == pfGameGUIMgr::kMouseUp )
|
||||
{
|
||||
// We don't want to be active anymore!
|
||||
@ -922,7 +922,7 @@ void pfGUISkin::Write( hsStream *s, hsResMgr *mgr )
|
||||
mgr->WriteKey( s, fTexture );
|
||||
}
|
||||
|
||||
hsBool pfGUISkin::MsgReceive( plMessage *msg )
|
||||
bool pfGUISkin::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plGenRefMsg *ref = plGenRefMsg::ConvertNoRef( msg );
|
||||
if( ref != nil )
|
||||
|
@ -99,7 +99,7 @@ class pfGUIPopUpMenu : public pfGUIDialogMod
|
||||
};
|
||||
|
||||
// Array of info to rebuild our menu from. Note that this is ONLY used when rebuilding
|
||||
hsBool fNeedsRebuilding, fWaitingForSkin;
|
||||
bool fNeedsRebuilding, fWaitingForSkin;
|
||||
float fOriginX, fOriginY;
|
||||
uint16_t fMargin;
|
||||
hsTArray<pfMenuItem> fMenuItems;
|
||||
@ -113,7 +113,7 @@ class pfGUIPopUpMenu : public pfGUIDialogMod
|
||||
Alignment fAlignment;
|
||||
|
||||
|
||||
hsBool IBuildMenu( void );
|
||||
bool IBuildMenu( void );
|
||||
void ITearDownMenu( void );
|
||||
|
||||
hsGMaterial *ICreateDynMaterial( void );
|
||||
@ -147,13 +147,13 @@ class pfGUIPopUpMenu : public pfGUIDialogMod
|
||||
kRefParentNode
|
||||
};
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
|
||||
virtual void SetEnabled( hsBool e );
|
||||
virtual hsBool HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, uint8_t modifiers );
|
||||
virtual void SetEnabled( bool e );
|
||||
virtual bool HandleMouseEvent( pfGameGUIMgr::EventType event, float mouseX, float mouseY, uint8_t modifiers );
|
||||
|
||||
void Show( float x, float y );
|
||||
|
||||
@ -224,13 +224,13 @@ class pfGUISkin : public hsKeyedObject
|
||||
|
||||
virtual void Read( hsStream *s, hsResMgr *mgr );
|
||||
virtual void Write( hsStream *s, hsResMgr *mgr );
|
||||
virtual hsBool MsgReceive( plMessage *msg );
|
||||
virtual bool MsgReceive( plMessage *msg );
|
||||
|
||||
plMipmap *GetTexture( void ) const { return fTexture; }
|
||||
void SetTexture( plMipmap *tex );
|
||||
|
||||
const pfSRect &GetElement( uint32_t idx ) const { return fElements[ idx ]; }
|
||||
hsBool IsElementSet( uint32_t idx ) const { return ( fElements[ idx ].fWidth > 0 && fElements[ idx ].fHeight > 0 ); }
|
||||
bool IsElementSet( uint32_t idx ) const { return ( fElements[ idx ].fWidth > 0 && fElements[ idx ].fHeight > 0 ); }
|
||||
void SetElement( uint32_t idx, uint16_t x, uint16_t y, uint16_t w, uint16_t h );
|
||||
|
||||
void SetMargins( uint16_t item, uint16_t border ) { fItemMargin = item; fBorderMargin = border; }
|
||||
|
@ -77,14 +77,14 @@ pfGUIProgressCtrl::pfGUIProgressCtrl() : fStopSoundTimer(99)
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIProgressCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIProgressCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIValueCtrl::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIProgressCtrl::MsgReceive( plMessage *msg )
|
||||
bool pfGUIProgressCtrl::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plTimerCallbackMsg *timerMsg = plTimerCallbackMsg::ConvertNoRef(msg);
|
||||
if (timerMsg)
|
||||
@ -126,7 +126,7 @@ void pfGUIProgressCtrl::Write( hsStream *s, hsResMgr *mgr )
|
||||
|
||||
//// UpdateBounds ////////////////////////////////////////////////////////////
|
||||
|
||||
void pfGUIProgressCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, hsBool force )
|
||||
void pfGUIProgressCtrl::UpdateBounds( hsMatrix44 *invXformMatrix, bool force )
|
||||
{
|
||||
pfGUIValueCtrl::UpdateBounds( invXformMatrix, force );
|
||||
if( fAnimationKeys.GetCount() > 0 )
|
||||
@ -145,7 +145,7 @@ void pfGUIProgressCtrl::SetAnimationKeys( hsTArray<plKey> &keys, const plStri
|
||||
// Loops through and computes the max begin and end for our animations. If
|
||||
// none of them are loaded and we're not already calced, returns false.
|
||||
|
||||
hsBool pfGUIProgressCtrl::ICalcAnimTimes( void )
|
||||
bool pfGUIProgressCtrl::ICalcAnimTimes( void )
|
||||
{
|
||||
if( fAnimTimesCalced )
|
||||
return true;
|
||||
|
@ -62,12 +62,12 @@ class pfGUIProgressCtrl : public pfGUIValueCtrl
|
||||
|
||||
// Computed once, once an anim is loaded that we can compute this with
|
||||
float fAnimBegin, fAnimEnd;
|
||||
hsBool fAnimTimesCalced;
|
||||
hsBool fPlaySound;
|
||||
bool fAnimTimesCalced;
|
||||
bool fPlaySound;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
hsBool ICalcAnimTimes( void );
|
||||
bool ICalcAnimTimes( void );
|
||||
|
||||
const uint32_t fStopSoundTimer;
|
||||
|
||||
@ -84,12 +84,12 @@ class pfGUIProgressCtrl : public pfGUIValueCtrl
|
||||
kReverseValues = kDerivedFlagsStart
|
||||
};
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, hsBool force = false );
|
||||
virtual void UpdateBounds( hsMatrix44 *invXformMatrix = nil, bool force = false );
|
||||
|
||||
virtual void SetCurrValue( float v );
|
||||
virtual void AnimateToPercentage( float percent );
|
||||
|
@ -137,14 +137,14 @@ pfGUIRadioGroupCtrl::~pfGUIRadioGroupCtrl()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIRadioGroupCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIRadioGroupCtrl::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIRadioGroupCtrl::MsgReceive( plMessage *msg )
|
||||
bool pfGUIRadioGroupCtrl::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg );
|
||||
if( refMsg != nil )
|
||||
@ -221,21 +221,21 @@ void pfGUIRadioGroupCtrl::SetValue( int32_t value )
|
||||
|
||||
///// Setting to be trickled down to the underlings
|
||||
|
||||
void pfGUIRadioGroupCtrl::SetEnabled( hsBool e )
|
||||
void pfGUIRadioGroupCtrl::SetEnabled( bool e )
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < fControls.GetCount(); i++ )
|
||||
fControls[ i ]->SetEnabled(e);
|
||||
}
|
||||
|
||||
void pfGUIRadioGroupCtrl::SetInteresting( hsBool e )
|
||||
void pfGUIRadioGroupCtrl::SetInteresting( bool e )
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < fControls.GetCount(); i++ )
|
||||
fControls[ i ]->SetInteresting(e);
|
||||
}
|
||||
|
||||
void pfGUIRadioGroupCtrl::SetVisible( hsBool vis )
|
||||
void pfGUIRadioGroupCtrl::SetVisible( bool vis )
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < fControls.GetCount(); i++ )
|
||||
|
@ -72,7 +72,7 @@ class pfGUIRadioGroupCtrl : public pfGUIControlMod
|
||||
|
||||
int32_t fValue, fDefaultValue;
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
public:
|
||||
|
||||
@ -87,7 +87,7 @@ class pfGUIRadioGroupCtrl : public pfGUIControlMod
|
||||
kAllowNoSelection = kDerivedFlagsStart
|
||||
};
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
@ -95,9 +95,9 @@ class pfGUIRadioGroupCtrl : public pfGUIControlMod
|
||||
int32_t GetValue( void ) { return fValue; }
|
||||
void SetValue( int32_t value );
|
||||
|
||||
virtual void SetEnabled( hsBool e );
|
||||
virtual void SetInteresting( hsBool e );
|
||||
virtual void SetVisible( hsBool vis );
|
||||
virtual void SetEnabled( bool e );
|
||||
virtual void SetInteresting( bool e );
|
||||
virtual void SetVisible( bool vis );
|
||||
virtual void SetControlsFlag( int flag );
|
||||
virtual void ClearControlsFlag( int flag );
|
||||
|
||||
|
@ -80,14 +80,14 @@ pfGUITextBoxMod::~pfGUITextBoxMod()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUITextBoxMod::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUITextBoxMod::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIControlMod::IEval( secs, del, dirty );
|
||||
}
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUITextBoxMod::MsgReceive( plMessage *msg )
|
||||
bool pfGUITextBoxMod::MsgReceive( plMessage *msg )
|
||||
{
|
||||
return pfGUIControlMod::MsgReceive( msg );
|
||||
}
|
||||
@ -167,7 +167,7 @@ void pfGUITextBoxMod::Read( hsStream *s, hsResMgr *mgr )
|
||||
else
|
||||
fText = nil;
|
||||
|
||||
fUseLocalizationPath = (s->ReadBool() != 0);
|
||||
fUseLocalizationPath = s->ReadBool();
|
||||
if (fUseLocalizationPath)
|
||||
{
|
||||
wchar_t* temp = s->ReadSafeWString();
|
||||
|
@ -63,7 +63,7 @@ class pfGUITextBoxMod : public pfGUIControlMod
|
||||
bool fUseLocalizationPath;
|
||||
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
|
||||
virtual void IUpdate( void );
|
||||
virtual void IPostSetUpDynTextMap( void );
|
||||
@ -82,7 +82,7 @@ class pfGUITextBoxMod : public pfGUIControlMod
|
||||
kRightJustify
|
||||
};
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Read( hsStream* s, hsResMgr* mgr );
|
||||
virtual void Write( hsStream* s, hsResMgr* mgr );
|
||||
|
@ -119,7 +119,7 @@ pfGUIUpDownPairMod::~pfGUIUpDownPairMod()
|
||||
|
||||
//// IEval ///////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIUpDownPairMod::IEval( double secs, float del, uint32_t dirty )
|
||||
bool pfGUIUpDownPairMod::IEval( double secs, float del, uint32_t dirty )
|
||||
{
|
||||
return pfGUIValueCtrl::IEval( secs, del, dirty );
|
||||
}
|
||||
@ -157,7 +157,7 @@ void pfGUIUpDownPairMod::Update( void )
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGUIUpDownPairMod::MsgReceive( plMessage *msg )
|
||||
bool pfGUIUpDownPairMod::MsgReceive( plMessage *msg )
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg );
|
||||
if( refMsg != nil )
|
||||
|
@ -70,7 +70,7 @@ class pfGUIUpDownPairMod : public pfGUIValueCtrl
|
||||
pfUpDownBtnProc *fButtonProc;
|
||||
|
||||
|
||||
virtual hsBool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual bool IEval( double secs, float del, uint32_t dirty ); // called only by owner object's Eval()
|
||||
virtual void IUpdate( void );
|
||||
|
||||
public:
|
||||
@ -82,7 +82,7 @@ class pfGUIUpDownPairMod : public pfGUIValueCtrl
|
||||
GETINTERFACE_ANY( pfGUIUpDownPairMod, pfGUIValueCtrl );
|
||||
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
virtual void Update( void );
|
||||
|
||||
|
@ -89,22 +89,22 @@ class pfGameUIInputInterface : public plInputInterface
|
||||
|
||||
uint8_t fModifiers;
|
||||
uint8_t fButtonState;
|
||||
hsBool fHaveInterestingCursor;
|
||||
bool fHaveInterestingCursor;
|
||||
uint32_t fCurrentCursor;
|
||||
|
||||
virtual hsBool IHandleCtrlCmd( plCtrlCmd *cmd );
|
||||
virtual hsBool IControlCodeEnabled( ControlEventCode code );
|
||||
virtual bool IHandleCtrlCmd( plCtrlCmd *cmd );
|
||||
virtual bool IControlCodeEnabled( ControlEventCode code );
|
||||
|
||||
public:
|
||||
|
||||
pfGameUIInputInterface( pfGameGUIMgr * const mgr );
|
||||
|
||||
virtual uint32_t GetPriorityLevel( void ) const { return kGUISystemPriority; }
|
||||
virtual hsBool InterpretInputEvent( plInputEventMsg *pMsg );
|
||||
virtual bool InterpretInputEvent( plInputEventMsg *pMsg );
|
||||
virtual uint32_t GetCurrentCursorID( void ) const;
|
||||
virtual float GetCurrentCursorOpacity( void ) const;
|
||||
virtual hsBool HasInterestingCursorID( void ) const { return fHaveInterestingCursor; }
|
||||
virtual hsBool SwitchInterpretOrder( void ) const { return true; }
|
||||
virtual bool HasInterestingCursorID( void ) const { return fHaveInterestingCursor; }
|
||||
virtual bool SwitchInterpretOrder( void ) const { return true; }
|
||||
|
||||
virtual void RestoreDefaultKeyMappings( void )
|
||||
{
|
||||
@ -163,7 +163,7 @@ pfGameGUIMgr::~pfGameGUIMgr()
|
||||
|
||||
//// Init ////////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGameGUIMgr::Init( void )
|
||||
bool pfGameGUIMgr::Init( void )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -176,7 +176,7 @@ void pfGameGUIMgr::Draw( plPipeline *p )
|
||||
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool pfGameGUIMgr::MsgReceive( plMessage* pMsg )
|
||||
bool pfGameGUIMgr::MsgReceive( plMessage* pMsg )
|
||||
{
|
||||
pfGameGUIMsg *guiMsg = pfGameGUIMsg::ConvertNoRef( pMsg );
|
||||
if( guiMsg != nil )
|
||||
@ -459,7 +459,7 @@ void pfGameGUIMgr::UnloadDialog( pfGUIDialogMod *dlg )
|
||||
|
||||
//// IsDialogLoaded ////// see if the dialog is in our list of loaded dialogs
|
||||
|
||||
hsBool pfGameGUIMgr::IsDialogLoaded( const char *name )
|
||||
bool pfGameGUIMgr::IsDialogLoaded( const char *name )
|
||||
{
|
||||
// search through all the dialogs we've loaded
|
||||
int i;
|
||||
@ -533,7 +533,7 @@ void pfGameGUIMgr::SetDialogToNotify(pfGUIDialogMod *dlg, plKey recvrKey)
|
||||
// "Activates" the GUI manager. This means enabling the drawing of GUI
|
||||
// elements on the screen as well as rerouting input to us.
|
||||
|
||||
void pfGameGUIMgr::IActivateGUI( hsBool activate )
|
||||
void pfGameGUIMgr::IActivateGUI( bool activate )
|
||||
{
|
||||
if( fActivated == activate )
|
||||
return;
|
||||
@ -561,13 +561,13 @@ void pfGameGUIMgr::IActivateGUI( hsBool activate )
|
||||
//// IHandleMouse ////////////////////////////////////////////////////////////
|
||||
// Distributes mouse events to the dialogs currently active
|
||||
|
||||
hsBool pfGameGUIMgr::IHandleMouse( EventType event, float mouseX, float mouseY, uint8_t modifiers, uint32_t *desiredCursor )
|
||||
bool pfGameGUIMgr::IHandleMouse( EventType event, float mouseX, float mouseY, uint8_t modifiers, uint32_t *desiredCursor )
|
||||
{
|
||||
pfGUIDialogMod *dlg;
|
||||
|
||||
|
||||
// Update interesting things first, no matter what, for ALL dialogs
|
||||
hsBool modalPresent = false;
|
||||
bool modalPresent = false;
|
||||
for( dlg = fActiveDialogs; dlg != nil; dlg = dlg->GetNext() )
|
||||
{
|
||||
dlg->UpdateInterestingThings( mouseX, mouseY, modifiers, modalPresent );
|
||||
@ -592,7 +592,7 @@ hsBool pfGameGUIMgr::IHandleMouse( EventType event, float mouseX, float mouseY,
|
||||
//// IHandleKeyEvt ///////////////////////////////////////////////////////////
|
||||
// Distributes mouse events to the dialogs currently active
|
||||
|
||||
hsBool pfGameGUIMgr::IHandleKeyEvt( EventType event, plKeyDef key, uint8_t modifiers )
|
||||
bool pfGameGUIMgr::IHandleKeyEvt( EventType event, plKeyDef key, uint8_t modifiers )
|
||||
{
|
||||
pfGUIDialogMod *dlg;
|
||||
|
||||
@ -610,7 +610,7 @@ hsBool pfGameGUIMgr::IHandleKeyEvt( EventType event, plKeyDef key, uint8_t modi
|
||||
// Like IHandleKeyPress, but takes in a char for distributing actual
|
||||
// characters typed.
|
||||
|
||||
hsBool pfGameGUIMgr::IHandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
bool pfGameGUIMgr::IHandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
{
|
||||
pfGUIDialogMod *dlg;
|
||||
|
||||
@ -631,7 +631,7 @@ hsBool pfGameGUIMgr::IHandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
// Looks at the chain of active dialogs and determines if there's any modals
|
||||
// blocking input. Returns true if so.
|
||||
|
||||
hsBool pfGameGUIMgr::IModalBlocking( void )
|
||||
bool pfGameGUIMgr::IModalBlocking( void )
|
||||
{
|
||||
return ( IGetTopModal() != nil ) ? true : false;
|
||||
}
|
||||
@ -679,7 +679,7 @@ pfGameUIInputInterface::pfGameUIInputInterface( pfGameGUIMgr * const mgr ) : plI
|
||||
// RestoreDefaultKeyMappings()!!!!
|
||||
}
|
||||
|
||||
hsBool pfGameUIInputInterface::IControlCodeEnabled( ControlEventCode code )
|
||||
bool pfGameUIInputInterface::IControlCodeEnabled( ControlEventCode code )
|
||||
{
|
||||
if( code == B_CONTROL_EXIT_GUI_MODE )
|
||||
{
|
||||
@ -699,7 +699,7 @@ hsBool pfGameUIInputInterface::IControlCodeEnabled( ControlEventCode code )
|
||||
return true; // Enable all other codes
|
||||
}
|
||||
|
||||
hsBool pfGameUIInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd )
|
||||
bool pfGameUIInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd )
|
||||
{
|
||||
if( cmd->fControlCode == B_CONTROL_EXIT_GUI_MODE )
|
||||
{
|
||||
@ -715,9 +715,9 @@ hsBool pfGameUIInputInterface::IHandleCtrlCmd( plCtrlCmd *cmd )
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool pfGameUIInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
|
||||
bool pfGameUIInputInterface::InterpretInputEvent( plInputEventMsg *pMsg )
|
||||
{
|
||||
hsBool handled = false;
|
||||
bool handled = false;
|
||||
|
||||
|
||||
/// The in-game UI has to do far more complicated control handling, so we just overload this entirely
|
||||
|
@ -141,7 +141,7 @@ class pfGameGUIMgr : public hsKeyedObject
|
||||
hsTArray<pfDialogNameSetKey *> fDlgsPendingLoad;
|
||||
hsTArray<pfDialogNameSetKey *> fDlgsPendingUnload;
|
||||
|
||||
hsBool fActivated;
|
||||
bool fActivated;
|
||||
uint32_t fActiveDlgCount;
|
||||
|
||||
pfGameUIInputInterface *fInputConfig;
|
||||
@ -165,13 +165,13 @@ class pfGameGUIMgr : public hsKeyedObject
|
||||
void IAddDlgToList( hsKeyedObject *obj );
|
||||
void IRemoveDlgFromList( hsKeyedObject *obj );
|
||||
|
||||
void IActivateGUI( hsBool activate );
|
||||
void IActivateGUI( bool activate );
|
||||
|
||||
hsBool IHandleMouse( EventType event, float mouseX, float mouseY, uint8_t modifiers, uint32_t *desiredCursor );
|
||||
hsBool IHandleKeyEvt( EventType event, plKeyDef key, uint8_t modifiers );
|
||||
hsBool IHandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
bool IHandleMouse( EventType event, float mouseX, float mouseY, uint8_t modifiers, uint32_t *desiredCursor );
|
||||
bool IHandleKeyEvt( EventType event, plKeyDef key, uint8_t modifiers );
|
||||
bool IHandleKeyPress( wchar_t key, uint8_t modifiers );
|
||||
|
||||
hsBool IModalBlocking( void );
|
||||
bool IModalBlocking( void );
|
||||
|
||||
pfGUIDialogMod *IGetTopModal( void ) const;
|
||||
|
||||
@ -191,9 +191,9 @@ class pfGameGUIMgr : public hsKeyedObject
|
||||
|
||||
void Draw( plPipeline *p );
|
||||
|
||||
hsBool Init( void );
|
||||
bool Init( void );
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* pMsg );
|
||||
virtual bool MsgReceive( plMessage* pMsg );
|
||||
|
||||
void LoadDialog( const char *name, plKey recvrKey=nil, const char *ageName = nil ); // AgeName = nil defaults to "GUI"
|
||||
void ShowDialog( const char *name ) { IShowDialog(name); }
|
||||
@ -204,7 +204,7 @@ class pfGameGUIMgr : public hsKeyedObject
|
||||
void ShowDialog( pfGUIDialogMod *dlg, bool resetClickables=true );
|
||||
void HideDialog( pfGUIDialogMod *dlg );
|
||||
|
||||
hsBool IsDialogLoaded( const char *name );
|
||||
bool IsDialogLoaded( const char *name );
|
||||
pfGUIDialogMod *GetDialogFromString( const char *name );
|
||||
|
||||
void SetDialogToNotify(const char *name, plKey recvrKey);
|
||||
@ -218,7 +218,7 @@ class pfGameGUIMgr : public hsKeyedObject
|
||||
pfGUIPopUpMenu *FindPopUpMenu( const char *name );
|
||||
|
||||
std::vector<plPostEffectMod*> GetDlgRenderMods( void ) const;
|
||||
hsBool IsModalBlocking( void ) {return IModalBlocking();}
|
||||
bool IsModalBlocking( void ) {return IModalBlocking();}
|
||||
|
||||
// Tag ID stuff
|
||||
pfGUIDialogMod *GetDialogFromTag( uint32_t tagID );
|
||||
|
Reference in New Issue
Block a user