Code-style consistency improvement:
Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files. make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type. This commit contains no other changes aside from adding and applying clang-format-all.sh
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
See license in Gwen.h
|
||||
*/
|
||||
|
||||
|
||||
#include "Gwen/Controls/ScrollControl.h"
|
||||
#include "Gwen/Controls/ProgressBar.h"
|
||||
#include "Gwen/Utility.h"
|
||||
@@ -12,15 +11,14 @@
|
||||
using namespace Gwen;
|
||||
using namespace Gwen::Controls;
|
||||
|
||||
|
||||
GWEN_CONTROL_CONSTRUCTOR( ProgressBar )
|
||||
GWEN_CONTROL_CONSTRUCTOR(ProgressBar)
|
||||
{
|
||||
SetMouseInputEnabled( true );
|
||||
SetBounds( Gwen::Rect( 0, 0, 128, 32 ) );
|
||||
SetTextPadding( Padding( 3, 3, 3, 3 ) );
|
||||
SetMouseInputEnabled(true);
|
||||
SetBounds(Gwen::Rect(0, 0, 128, 32));
|
||||
SetTextPadding(Padding(3, 3, 3, 3));
|
||||
SetHorizontal();
|
||||
|
||||
SetAlignment( Gwen::Pos::Center );
|
||||
SetAlignment(Gwen::Pos::Center);
|
||||
|
||||
m_fProgress = 0.0f;
|
||||
m_bAutoLabel = true;
|
||||
@@ -28,22 +26,22 @@ GWEN_CONTROL_CONSTRUCTOR( ProgressBar )
|
||||
|
||||
void ProgressBar::SetValue(float val)
|
||||
{
|
||||
if ( val < 0 )
|
||||
if (val < 0)
|
||||
val = 0;
|
||||
|
||||
if ( val > 1 )
|
||||
if (val > 1)
|
||||
val = 1;
|
||||
|
||||
m_fProgress = val;
|
||||
|
||||
if ( m_bAutoLabel )
|
||||
|
||||
if (m_bAutoLabel)
|
||||
{
|
||||
int displayVal = m_fProgress * 100;
|
||||
SetText( Utility::ToString( displayVal ) + "%" );
|
||||
SetText(Utility::ToString(displayVal) + "%");
|
||||
}
|
||||
}
|
||||
|
||||
void ProgressBar::Render( Skin::Base* skin )
|
||||
void ProgressBar::Render(Skin::Base* skin)
|
||||
{
|
||||
skin->DrawProgressBar( this, m_bHorizontal, m_fProgress);
|
||||
skin->DrawProgressBar(this, m_bHorizontal, m_fProgress);
|
||||
}
|
||||
Reference in New Issue
Block a user