From: <ac...@us...> - 2010-07-17 22:10:01
|
Revision: 6046 http://planeshift.svn.sourceforge.net/planeshift/?rev=6046&view=rev Author: acraig Date: 2010-07-17 22:09:54 +0000 (Sat, 17 Jul 2010) Log Message: ----------- Some general formatting improvements Clean up some header files to help optimize build times and dependencies. Modified Paths: -------------- trunk/src/client/gui/pawsslot.cpp trunk/src/client/gui/pawsslot.h Modified: trunk/src/client/gui/pawsslot.cpp =================================================================== --- trunk/src/client/gui/pawsslot.cpp 2010-07-17 22:04:21 UTC (rev 6045) +++ trunk/src/client/gui/pawsslot.cpp 2010-07-17 22:09:54 UTC (rev 6046) @@ -19,6 +19,9 @@ #include <psconfig.h> +//============================================================================= +// PlaneShift Includes +//============================================================================= #include "pawsslot.h" #include "psslotmgr.h" #include "globals.h" @@ -26,6 +29,11 @@ #include "paws/pawstextbox.h" #include "net/clientmsghandler.h" + +//============================================================================= +// Classes +//============================================================================= + pawsSlot::pawsSlot() { emptyOnZeroCount = true; @@ -63,6 +71,7 @@ { } + bool pawsSlot::Setup( iDocumentNode* node ) { csRef<iDocumentNode> ident = node->GetNode( "ident" ); @@ -77,6 +86,7 @@ return true; } + bool pawsSlot::OnMouseDown( int button, int modifiers, int x, int y ) { if ( button == csmbWheelUp || button == csmbWheelDown ) @@ -124,12 +134,14 @@ } } + void pawsSlot::SetToolTip( const char* text ) { pawsWidget::SetToolTip( text ); stackCountLabel->SetToolTip( text ); } + void pawsSlot::StackCount( int newCount ) { if (emptyOnZeroCount && newCount == 0) @@ -147,6 +159,7 @@ } } + void pawsSlot::PlaceItem( const char* imageName, const char* meshFactName, const char* matName, int count ) { meshfactName = meshFactName; @@ -204,6 +217,7 @@ graphics2D->SetClipRect( 0,0, graphics2D->GetWidth(), graphics2D->GetHeight()); } + void pawsSlot::Clear() { //printf("In pawsSlot::Clear()\n"); @@ -217,6 +231,7 @@ image = NULL; } + const char *pawsSlot::ImageName() { if (image) @@ -224,11 +239,13 @@ return NULL; } + int pawsSlot::GetPurifyStatus() { return purifyStatus; } + void pawsSlot::SetPurifyStatus(int status) { purifyStatus = status; @@ -245,10 +262,11 @@ case 2: purifySign->ShowBehind(); purifySign->SetBackground("GlyphSlotPurified"); - break; + break; } } + void pawsSlot::DrawStackCount(bool value) { drawStackCount = value; @@ -259,6 +277,7 @@ stackCountLabel->Hide(); } + bool pawsSlot::SelfPopulate( iDocumentNode *node) { if (node->GetAttributeValue("icon")) @@ -271,6 +290,7 @@ return true; } + void pawsSlot::OnUpdateData(const char *dataname,PAWSData& value) { csString sig(dataname); @@ -319,12 +339,12 @@ } + void pawsSlot::ScalePurifyStatus() { - csRect rect = this->ClipRect(); - int width = rect.Width()- GetActualWidth(11); - int height = rect.Height() - GetActualHeight(11); - purifySign->SetRelativeFrameSize(width, height); - + csRect rect = this->ClipRect(); + int width = rect.Width()- GetActualWidth(11); + int height = rect.Height() - GetActualHeight(11); + purifySign->SetRelativeFrameSize(width, height); } Modified: trunk/src/client/gui/pawsslot.h =================================================================== --- trunk/src/client/gui/pawsslot.h 2010-07-17 22:04:21 UTC (rev 6045) +++ trunk/src/client/gui/pawsslot.h 2010-07-17 22:09:54 UTC (rev 6046) @@ -4,9 +4,18 @@ #include "paws/pawswidget.h" +//============================================================================= +// Forward Declarations +//============================================================================= class psSlotManager; class pawsTextBox; + +//============================================================================= +// Classes +//============================================================================= + + class pawsSlot : public pawsWidget { public: @@ -61,7 +70,7 @@ void OnUpdateData(const char *dataname,PAWSData& value); - void ScalePurifyStatus(); + void ScalePurifyStatus(); protected: psSlotManager* mgr; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |