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/ScrollBar.h"
|
||||
#include "Gwen/Controls/ScrollBarBar.h"
|
||||
|
||||
@@ -14,44 +13,44 @@ using namespace Gwen::ControlsInternal;
|
||||
|
||||
//Actual bar representing height of parent
|
||||
|
||||
GWEN_CONTROL_CONSTRUCTOR( ScrollBarBar )
|
||||
GWEN_CONTROL_CONSTRUCTOR(ScrollBarBar)
|
||||
{
|
||||
RestrictToParent( true );
|
||||
SetTarget( this );
|
||||
RestrictToParent(true);
|
||||
SetTarget(this);
|
||||
}
|
||||
|
||||
void ScrollBarBar::Render( Skin::Base* skin )
|
||||
void ScrollBarBar::Render(Skin::Base* skin)
|
||||
{
|
||||
skin->DrawScrollBarBar(this, m_bDepressed, IsHovered(), m_bHorizontal );
|
||||
BaseClass::Render( skin );
|
||||
skin->DrawScrollBarBar(this, m_bDepressed, IsHovered(), m_bHorizontal);
|
||||
BaseClass::Render(skin);
|
||||
}
|
||||
|
||||
void ScrollBarBar::OnMouseMoved( int x, int y, int deltaX, int deltaY )
|
||||
void ScrollBarBar::OnMouseMoved(int x, int y, int deltaX, int deltaY)
|
||||
{
|
||||
BaseClass::OnMouseMoved( x, y, deltaX, deltaY );
|
||||
BaseClass::OnMouseMoved(x, y, deltaX, deltaY);
|
||||
|
||||
if ( !m_bDepressed )
|
||||
if (!m_bDepressed)
|
||||
return;
|
||||
|
||||
InvalidateParent();
|
||||
}
|
||||
|
||||
void ScrollBarBar::OnMouseClickLeft( int x, int y, bool bDown )
|
||||
void ScrollBarBar::OnMouseClickLeft(int x, int y, bool bDown)
|
||||
{
|
||||
BaseClass::OnMouseClickLeft( x, y, bDown );
|
||||
BaseClass::OnMouseClickLeft(x, y, bDown);
|
||||
InvalidateParent();
|
||||
}
|
||||
|
||||
void ScrollBarBar::Layout( Skin::Base* /*skin*/ )
|
||||
void ScrollBarBar::Layout(Skin::Base* /*skin*/)
|
||||
{
|
||||
if ( !GetParent() )
|
||||
if (!GetParent())
|
||||
return;
|
||||
|
||||
//Move to our current position to force clamping - is this a hack?
|
||||
MoveTo( X(), Y() );
|
||||
MoveTo(X(), Y());
|
||||
}
|
||||
|
||||
void ScrollBarBar::MoveTo( int x, int y )
|
||||
void ScrollBarBar::MoveTo(int x, int y)
|
||||
{
|
||||
BaseClass::MoveTo( x, y );
|
||||
BaseClass::MoveTo(x, y);
|
||||
}
|
||||
Reference in New Issue
Block a user