From: <wel...@us...> - 2008-10-29 18:32:10
|
Revision: 2301 http://planeshift.svn.sourceforge.net/planeshift/?rev=2301&view=rev Author: weltall2 Date: 2008-10-29 18:32:06 +0000 (Wed, 29 Oct 2008) Log Message: ----------- Implemented margin support in pawsMultiLineTextBox Modified Paths: -------------- trunk/docs/history.txt trunk/src/common/paws/pawstextbox.cpp Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2008-10-28 22:23:39 UTC (rev 2300) +++ trunk/docs/history.txt 2008-10-29 18:32:06 UTC (rev 2301) @@ -1,4 +1,7 @@ *** 2008-10-28 by Stefano Angeleri +- Implemented margin support in pawsMultiLineTextBox + +*** 2008-10-28 by Stefano Angeleri - Restricted mana restoring disable only when resurrecting from death realm fixing FS#2299 - Keep dying in death realm for unlimited mana - Added a /disablequest command which can change toggle a quest status from enabled Modified: trunk/src/common/paws/pawstextbox.cpp =================================================================== --- trunk/src/common/paws/pawstextbox.cpp 2008-10-28 22:23:39 UTC (rev 2300) +++ trunk/src/common/paws/pawstextbox.cpp 2008-10-29 18:32:06 UTC (rev 2301) @@ -1115,7 +1115,7 @@ GetFont()->GetMaxSize( maxWidth, maxHeight ); - canDrawLines = screenFrame.Height() / maxHeight; + canDrawLines = (screenFrame.Height()-(margin*2)) / maxHeight; char* dummy = new char[text.Length() + 1]; char* head = dummy; @@ -1125,9 +1125,9 @@ else dummy[0] = 0; - int offSet = 0; + int offSet = margin*2; if ( usingScrollBar ) - offSet = 36; + offSet += 36; while ( dummy ) @@ -1265,14 +1265,14 @@ pawsWidget::Draw(); pawsWidget::ClipToParent(); - int drawX = screenFrame.xmin; - int drawY = screenFrame.ymin; + int drawX = screenFrame.xmin+margin; + int drawY = screenFrame.ymin+margin; if (!maxHeight && GetFont()) GetFont()->GetMaxSize( maxWidth, maxHeight ); if (!canDrawLines && maxHeight) - canDrawLines = screenFrame.Height() / maxHeight; + canDrawLines = (screenFrame.Height()-(margin*2)) / maxHeight; for (size_t x = startLine; x < (startLine+canDrawLines); x++ ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |