remove a lot of warnings (more todo in demos and serialization code)
This commit is contained in:
@@ -112,7 +112,7 @@ void CrossSplitter::Layout( Skin::Base* /*skin*/ )
|
||||
else
|
||||
{
|
||||
//This should probably use Fill docking instead
|
||||
m_Sections[m_iZoomedSection]->SetBounds( 0, 0, Width(), Height() );
|
||||
m_Sections[(int)m_iZoomedSection]->SetBounds( 0, 0, Width(), Height() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ void Resizer::OnMouseMoved( int x, int y, int /*deltaX*/, int /*deltaY*/ )
|
||||
if ( !m_pTarget ) return;
|
||||
if ( !m_bDepressed ) return;
|
||||
|
||||
Gwen::Rect oldBounds = m_pTarget->GetBounds();
|
||||
// Gwen::Rect oldBounds = m_pTarget->GetBounds();
|
||||
Gwen::Rect pBounds = m_pTarget->GetBounds();
|
||||
|
||||
Gwen::Point pntMin = m_pTarget->GetMinimumSize();
|
||||
|
||||
@@ -101,12 +101,12 @@ bool TreeControl::OnKeyUp( bool bDown )
|
||||
if (bDown)
|
||||
{
|
||||
ForceUpdateScrollBars();
|
||||
int maxIndex = 0;
|
||||
// int maxIndex = 0;
|
||||
int newIndex = 0;
|
||||
int maxItem=0;
|
||||
int curItem=-1;
|
||||
iterate(ITERATE_ACTION_FIND_SELECTED_INDEX,&maxItem,&curItem);
|
||||
maxIndex = maxItem;
|
||||
// maxIndex = maxItem;
|
||||
int targetItem = curItem;
|
||||
if (curItem>0)
|
||||
{
|
||||
@@ -121,15 +121,15 @@ bool TreeControl::OnKeyUp( bool bDown )
|
||||
iterate(ITERATE_ACTION_DESELECT_INDEX,&maxItem,&deselectIndex);
|
||||
}
|
||||
curItem = newIndex;
|
||||
float amount = float(newIndex)/float(maxIndex);
|
||||
// float amount = float(newIndex)/float(maxIndex);
|
||||
float viewSize = m_ScrollControl->m_VerticalScrollBar->getViewableContentSize();
|
||||
float contSize = m_ScrollControl->m_VerticalScrollBar->getContentSize();
|
||||
|
||||
float curAmount = m_ScrollControl->m_VerticalScrollBar->GetScrolledAmount();
|
||||
float minCoordViewableWindow = curAmount*contSize;
|
||||
float maxCoordViewableWindow = minCoordViewableWindow+viewSize;
|
||||
// float minCoordViewableWindow = curAmount*contSize;
|
||||
//float maxCoordViewableWindow = minCoordViewableWindow+viewSize;
|
||||
float minCoordSelectedItem = curItem*16.f;
|
||||
float maxCoordSelectedItem = (curItem+1)*16.f;
|
||||
// float maxCoordSelectedItem = (curItem+1)*16.f;
|
||||
{
|
||||
float newAmount = float(minCoordSelectedItem)/(contSize-viewSize);
|
||||
if (newAmount<curAmount)
|
||||
@@ -157,12 +157,12 @@ bool TreeControl::OnKeyDown( bool bDown )
|
||||
if (bDown)
|
||||
{
|
||||
ForceUpdateScrollBars();
|
||||
int maxIndex = 0;
|
||||
// int maxIndex = 0;
|
||||
int newIndex = 0;
|
||||
int maxItem=0;
|
||||
int curItem=-1;
|
||||
iterate(ITERATE_ACTION_FIND_SELECTED_INDEX,&maxItem,&curItem);
|
||||
maxIndex = maxItem;
|
||||
// maxIndex = maxItem;
|
||||
int targetItem = curItem;
|
||||
if (curItem>=0)
|
||||
{
|
||||
@@ -177,15 +177,15 @@ bool TreeControl::OnKeyDown( bool bDown )
|
||||
iterate(ITERATE_ACTION_DESELECT_INDEX,&maxItem,&deselectIndex);
|
||||
}
|
||||
curItem= newIndex;
|
||||
float amount = (int)float(newIndex)/float(maxIndex);
|
||||
// float amount = (int)float(newIndex)/float(maxIndex);
|
||||
float viewSize = m_ScrollControl->m_VerticalScrollBar->getViewableContentSize();
|
||||
float contSize = m_ScrollControl->m_VerticalScrollBar->getContentSize();
|
||||
|
||||
float curAmount = m_ScrollControl->m_VerticalScrollBar->GetScrolledAmount();
|
||||
float minCoordViewableWindow = curAmount*contSize;
|
||||
float maxCoordViewableWindow = minCoordViewableWindow+viewSize;
|
||||
// float minCoordViewableWindow = curAmount*contSize;
|
||||
//float maxCoordViewableWindow = minCoordViewableWindow+viewSize;
|
||||
float minCoordSelectedItem = curItem*16.f;
|
||||
float maxCoordSelectedItem = (curItem+1)*16.f;
|
||||
//float maxCoordSelectedItem = (curItem+1)*16.f;
|
||||
{
|
||||
float newAmount = float(minCoordSelectedItem)/(contSize-viewSize);
|
||||
if (newAmount<curAmount)
|
||||
@@ -219,15 +219,15 @@ bool TreeControl::OnKeyRight( bool bDown )
|
||||
int maxItem=0;
|
||||
int curItem=0;
|
||||
iterate(ITERATE_ACTION_FIND_SELECTED_INDEX,&maxItem,&curItem);
|
||||
float amount = float(curItem)/float(maxItem);
|
||||
// float amount = float(curItem)/float(maxItem);
|
||||
float viewSize = m_ScrollControl->m_VerticalScrollBar->getViewableContentSize();
|
||||
float contSize = m_ScrollControl->m_VerticalScrollBar->getContentSize();
|
||||
|
||||
float curAmount = m_ScrollControl->m_VerticalScrollBar->GetScrolledAmount();
|
||||
float minCoordViewableWindow = curAmount*contSize;
|
||||
float maxCoordViewableWindow = minCoordViewableWindow+viewSize;
|
||||
// float minCoordViewableWindow = curAmount*contSize;
|
||||
// float maxCoordViewableWindow = minCoordViewableWindow+viewSize;
|
||||
float minCoordSelectedItem = curItem*16.f;
|
||||
float maxCoordSelectedItem = (curItem+1)*16.f;
|
||||
// float maxCoordSelectedItem = (curItem+1)*16.f;
|
||||
{
|
||||
float newAmount = float(minCoordSelectedItem)/(contSize-viewSize);
|
||||
if (newAmount<curAmount)
|
||||
@@ -262,17 +262,17 @@ bool TreeControl::OnKeyLeft( bool bDown )
|
||||
int maxItems=0;
|
||||
int curItem=0;
|
||||
iterate(ITERATE_ACTION_FIND_SELECTED_INDEX,&maxItems,&curItem);
|
||||
float amount = float(curItem)/float(maxItems);
|
||||
// float amount = float(curItem)/float(maxItems);
|
||||
|
||||
// m_ScrollControl->m_VerticalScrollBar->SetScrolledAmount(amount,true);
|
||||
float viewSize = m_ScrollControl->m_VerticalScrollBar->getViewableContentSize();
|
||||
float contSize = m_ScrollControl->m_VerticalScrollBar->getContentSize();
|
||||
|
||||
float curAmount = m_ScrollControl->m_VerticalScrollBar->GetScrolledAmount();
|
||||
float minCoordViewableWindow = curAmount*contSize;
|
||||
float maxCoordViewableWindow = minCoordViewableWindow+viewSize;
|
||||
// float minCoordViewableWindow = curAmount*contSize;
|
||||
// float maxCoordViewableWindow = minCoordViewableWindow+viewSize;
|
||||
float minCoordSelectedItem = curItem*16.f;
|
||||
float maxCoordSelectedItem = (curItem+1)*16.f;
|
||||
// float maxCoordSelectedItem = (curItem+1)*16.f;
|
||||
|
||||
{
|
||||
float newAmount = float(minCoordSelectedItem)/(contSize-viewSize);
|
||||
|
||||
@@ -73,7 +73,7 @@ void TreeNode::Render( Skin::Base* skin )
|
||||
|
||||
TreeNode* TreeNode::AddNode( const UnicodeString& strLabel )
|
||||
{
|
||||
int sz = sizeof(TreeNode);
|
||||
// int sz = sizeof(TreeNode);
|
||||
TreeNode* node = new TreeNode( this );
|
||||
node->SetText( strLabel );
|
||||
node->Dock( Pos::Top );
|
||||
@@ -231,7 +231,7 @@ void TreeNode::iterate(int action, int* curIndex, int* targetIndex)
|
||||
|
||||
Gwen::String name = Gwen::Utility::UnicodeToString(m_Title->GetText());
|
||||
|
||||
int actualIndex = curIndex? *curIndex : -1;
|
||||
// int actualIndex = curIndex? *curIndex : -1;
|
||||
//printf("iterated over item %d with name = %s\n", actualIndex, name.c_str());
|
||||
|
||||
if (action==ITERATE_ACTION_SELECT)
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace Gwen
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
GLenum format = GL_RGB;
|
||||
//GLenum format = GL_RGB;
|
||||
unsigned char* texdata = new unsigned char[256*256*4];
|
||||
for (int i=0;i<256*256;i++)
|
||||
{
|
||||
@@ -316,11 +316,11 @@ namespace Gwen
|
||||
Gwen::String converted_string = Gwen::Utility::UnicodeToString( text );
|
||||
|
||||
float yOffset=0.0f;
|
||||
for ( int i=0; i<text.length(); i++ )
|
||||
for ( int i=0; i<(int)text.length(); i++ )
|
||||
{
|
||||
wchar_t chr = text[i];
|
||||
// wchar_t chr = text[i];
|
||||
char ch = converted_string[i];
|
||||
float curSpacing = sGwenDebugFontSpacing[ch] * m_fLetterSpacing * fSize * m_fFontScale[0];
|
||||
float curSpacing = sGwenDebugFontSpacing[(int)ch] * m_fLetterSpacing * fSize * m_fFontScale[0];
|
||||
Gwen::Rect r( pos.x + yOffset, pos.y-fSize*0.2f, (fSize * m_fFontScale[0]), fSize * m_fFontScale[1] );
|
||||
|
||||
if ( m_pFontTexture )
|
||||
@@ -390,10 +390,10 @@ namespace Gwen
|
||||
Gwen::String converted_string = Gwen::Utility::UnicodeToString( text );
|
||||
float spacing = 0.0f;
|
||||
|
||||
for ( int i=0; i<text.length(); i++ )
|
||||
for ( int i=0; i<(int)text.length(); i++ )
|
||||
{
|
||||
char ch = converted_string[i];
|
||||
spacing += sGwenDebugFontSpacing[ch];
|
||||
spacing += sGwenDebugFontSpacing[(int)ch];
|
||||
}
|
||||
|
||||
p.x = spacing*m_fLetterSpacing*fSize * m_fFontScale[0];
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Gwen
|
||||
m_Render->DrawLinedRect( control->GetRenderBounds() );
|
||||
}
|
||||
|
||||
Gwen::Rect rect = control->GetRenderBounds();
|
||||
// Gwen::Rect rect = control->GetRenderBounds();
|
||||
if ( bChecked )
|
||||
{
|
||||
m_Render->SetDrawColor( Color( 0, 0, 0, 255) );
|
||||
@@ -490,7 +490,7 @@ namespace Gwen
|
||||
virtual void DrawSlider( Gwen::Controls::Base* control, bool bIsHorizontal, int numNotches, int barSize)
|
||||
{
|
||||
Gwen::Rect rect = control->GetRenderBounds();
|
||||
Gwen::Rect notchRect = rect;
|
||||
// Gwen::Rect notchRect = rect;
|
||||
|
||||
if ( bIsHorizontal )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user