mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-13 04:42:12 +03:00
Minor changes.
--HG-- branch : dev
This commit is contained in:
@@ -61,7 +61,7 @@ class EE_API UIControlAnim : public UIDragableControl {
|
||||
|
||||
Interpolation2d * startScaleAnim( const Float& From, const Float& To, const Time& TotalTime, const Ease::Interpolation& getType = Ease::Linear, Interpolation1d::OnPathEndCallback PathEndCallback = Interpolation1d::OnPathEndCallback() );
|
||||
|
||||
Interpolation2d * startMovement( const Vector2i& From, const Vector2i& To, const Time& TotalTime, const Ease::Interpolation& getType = Ease::Linear, Interpolation2d::OnPathEndCallback PathEndCallback = Interpolation1d::OnPathEndCallback() );
|
||||
Interpolation2d * startTranslation( const Vector2i& From, const Vector2i& To, const Time& TotalTime, const Ease::Interpolation& getType = Ease::Linear, Interpolation2d::OnPathEndCallback PathEndCallback = Interpolation1d::OnPathEndCallback() );
|
||||
|
||||
Interpolation1d * startRotation( const Float& From, const Float& To, const Time& TotalTime, const Ease::Interpolation& getType = Ease::Linear, Interpolation1d::OnPathEndCallback PathEndCallback = Interpolation1d::OnPathEndCallback() );
|
||||
|
||||
@@ -79,7 +79,7 @@ class EE_API UIControlAnim : public UIDragableControl {
|
||||
|
||||
Interpolation1d * getAlphaInterpolation();
|
||||
|
||||
Interpolation2d * getMovementInterpolation();
|
||||
Interpolation2d * getTranslationInterpolation();
|
||||
|
||||
virtual void draw();
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ class EE_API UITable : public UIWidget {
|
||||
|
||||
bool getSmoothScroll() const;
|
||||
|
||||
void setSmoothScroll(bool smoothScroll);
|
||||
UITable * setSmoothScroll(bool smoothScroll);
|
||||
|
||||
Float getTouchDragDeceleration() const;
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ CODE_SRCS := \
|
||||
helper/jpeg-compressor/*.cpp \
|
||||
helper/imageresampler/*.cpp \
|
||||
helper/haikuttf/*.cpp \
|
||||
helper/pugixml/*.cpp \
|
||||
system/*.cpp \
|
||||
system/platform/posix/*.cpp \
|
||||
network/*.cpp \
|
||||
@@ -68,8 +69,8 @@ CODE_SRCS := \
|
||||
physics/constraints/*.cpp \
|
||||
ui/*.cpp \
|
||||
ui/tools/*.cpp \
|
||||
gaming/*.cpp \
|
||||
gaming/mapeditor/*.cpp
|
||||
maps/*.cpp \
|
||||
maps/mapeditor/*.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := $(MY_C_INCLUDES)
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ Interpolation2d * UIControlAnim::startScaleAnim( const Float& From, const Float&
|
||||
return startScaleAnim( Vector2f( From, From ), Vector2f( To, To ), TotalTime, Type, PathEndCallback );
|
||||
}
|
||||
|
||||
Interpolation2d * UIControlAnim::startMovement( const Vector2i& From, const Vector2i& To, const Time& TotalTime, const Ease::Interpolation& Type, Interpolation2d::OnPathEndCallback PathEndCallback ) {
|
||||
Interpolation2d * UIControlAnim::startTranslation( const Vector2i& From, const Vector2i& To, const Time& TotalTime, const Ease::Interpolation& Type, Interpolation2d::OnPathEndCallback PathEndCallback ) {
|
||||
if ( NULL == mMoveAnim )
|
||||
mMoveAnim = eeNew( Interpolation2d, () );
|
||||
|
||||
@@ -491,7 +491,7 @@ Interpolation1d * UIControlAnim::getAlphaInterpolation() {
|
||||
return mAlphaAnim;
|
||||
}
|
||||
|
||||
Interpolation2d * UIControlAnim::getMovementInterpolation() {
|
||||
Interpolation2d * UIControlAnim::getTranslationInterpolation() {
|
||||
if ( NULL == mMoveAnim )
|
||||
mMoveAnim = eeNew( Interpolation2d, () );
|
||||
|
||||
|
||||
@@ -986,18 +986,19 @@ void UIListBox::setFontStyleConfig(const UIFontStyleConfig & fontStyleConfig) {
|
||||
void UIListBox::update() {
|
||||
if ( mEnabled && mVisible ) {
|
||||
if ( mFlags & UI_TOUCH_DRAG_ENABLED ) {
|
||||
Uint32 Press = UIManager::instance()->getPressTrigger();
|
||||
Uint32 LPress = UIManager::instance()->getLastPressTrigger();
|
||||
UIManager * manager = UIManager::instance();
|
||||
Uint32 Press = manager->getPressTrigger();
|
||||
Uint32 LPress = manager->getLastPressTrigger();
|
||||
|
||||
if ( ( mControlFlags & UI_CTRL_FLAG_TOUCH_DRAGGING ) ) {
|
||||
// Mouse Not Down
|
||||
if ( !( Press & EE_BUTTON_LMASK ) ) {
|
||||
writeCtrlFlag( UI_CTRL_FLAG_TOUCH_DRAGGING, 0 );
|
||||
UIManager::instance()->setControlDragging( false );
|
||||
manager->setControlDragging( false );
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2i Pos( UIManager::instance()->getMousePos() );
|
||||
Vector2i Pos( manager->getMousePos() );
|
||||
|
||||
if ( mTouchDragPoint != Pos ) {
|
||||
Vector2i diff = -( mTouchDragPoint - Pos );
|
||||
@@ -1008,7 +1009,7 @@ void UIListBox::update() {
|
||||
|
||||
mTouchDragPoint = Pos;
|
||||
|
||||
UIManager::instance()->setControlDragging( true );
|
||||
manager->setControlDragging( true );
|
||||
} else {
|
||||
mTouchDragAcceleration -= getElapsed().asMilliseconds() * mTouchDragAcceleration * 0.01f;
|
||||
}
|
||||
@@ -1018,7 +1019,7 @@ void UIListBox::update() {
|
||||
if ( !( LPress & EE_BUTTON_LMASK ) && ( Press & EE_BUTTON_LMASK ) ) {
|
||||
writeCtrlFlag( UI_CTRL_FLAG_TOUCH_DRAGGING, 1 );
|
||||
|
||||
mTouchDragPoint = UIManager::instance()->getMousePos();
|
||||
mTouchDragPoint = manager->getMousePos();
|
||||
mTouchDragAcceleration = 0;
|
||||
}
|
||||
}
|
||||
@@ -1026,7 +1027,7 @@ void UIListBox::update() {
|
||||
// Mouse Up
|
||||
if ( ( LPress & EE_BUTTON_LMASK ) && !( Press & EE_BUTTON_LMASK ) ) {
|
||||
writeCtrlFlag( UI_CTRL_FLAG_TOUCH_DRAGGING, 0 );
|
||||
UIManager::instance()->setControlDragging( false );
|
||||
manager->setControlDragging( false );
|
||||
}
|
||||
|
||||
// Deaccelerate
|
||||
|
||||
@@ -599,7 +599,7 @@ bool UITable::getSmoothScroll() const {
|
||||
return mSmoothScroll;
|
||||
}
|
||||
|
||||
void UITable::setSmoothScroll(bool smoothScroll) {
|
||||
UITable * UITable::setSmoothScroll(bool smoothScroll) {
|
||||
mSmoothScroll = smoothScroll;
|
||||
|
||||
if ( mSmoothScroll ) {
|
||||
@@ -607,6 +607,8 @@ void UITable::setSmoothScroll(bool smoothScroll) {
|
||||
} else {
|
||||
mContainer->unsetFlags( UI_CLIP_ENABLE );
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
Float UITable::getTouchDragDeceleration() const {
|
||||
@@ -631,18 +633,19 @@ void UITable::setContainerPadding(const Recti & containerPadding) {
|
||||
void UITable::update() {
|
||||
if ( mEnabled && mVisible ) {
|
||||
if ( mFlags & UI_TOUCH_DRAG_ENABLED ) {
|
||||
Uint32 Press = UIManager::instance()->getPressTrigger();
|
||||
Uint32 LPress = UIManager::instance()->getLastPressTrigger();
|
||||
UIManager * manager = UIManager::instance();
|
||||
Uint32 Press = manager->getPressTrigger();
|
||||
Uint32 LPress = manager->getLastPressTrigger();
|
||||
|
||||
if ( ( mControlFlags & UI_CTRL_FLAG_TOUCH_DRAGGING ) ) {
|
||||
// Mouse Not Down
|
||||
if ( !( Press & EE_BUTTON_LMASK ) ) {
|
||||
writeCtrlFlag( UI_CTRL_FLAG_TOUCH_DRAGGING, 0 );
|
||||
UIManager::instance()->setControlDragging( false );
|
||||
manager->setControlDragging( false );
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2i Pos( UIManager::instance()->getMousePos() );
|
||||
Vector2i Pos( manager->getMousePos() );
|
||||
|
||||
if ( mTouchDragPoint != Pos ) {
|
||||
Vector2i diff = -( mTouchDragPoint - Pos );
|
||||
@@ -653,7 +656,7 @@ void UITable::update() {
|
||||
|
||||
mTouchDragPoint = Pos;
|
||||
|
||||
UIManager::instance()->setControlDragging( true );
|
||||
manager->setControlDragging( true );
|
||||
} else {
|
||||
mTouchDragAcceleration -= getElapsed().asMilliseconds() * mTouchDragAcceleration * 0.01f;
|
||||
}
|
||||
@@ -663,7 +666,7 @@ void UITable::update() {
|
||||
if ( !( LPress & EE_BUTTON_LMASK ) && ( Press & EE_BUTTON_LMASK ) ) {
|
||||
writeCtrlFlag( UI_CTRL_FLAG_TOUCH_DRAGGING, 1 );
|
||||
|
||||
mTouchDragPoint = UIManager::instance()->getMousePos();
|
||||
mTouchDragPoint = manager->getMousePos();
|
||||
mTouchDragAcceleration = 0;
|
||||
}
|
||||
}
|
||||
@@ -671,7 +674,7 @@ void UITable::update() {
|
||||
// Mouse Up
|
||||
if ( ( LPress & EE_BUTTON_LMASK ) && !( Press & EE_BUTTON_LMASK ) ) {
|
||||
writeCtrlFlag( UI_CTRL_FLAG_TOUCH_DRAGGING, 0 );
|
||||
UIManager::instance()->setControlDragging( false );
|
||||
manager->setControlDragging( false );
|
||||
}
|
||||
|
||||
// Deaccelerate
|
||||
|
||||
@@ -448,7 +448,7 @@ void EETest::createUI() {
|
||||
TextEdit->setText( mBuda );
|
||||
|
||||
UITable * genGrid = UITable::New();
|
||||
genGrid->setSmoothScroll( true );
|
||||
genGrid->setSmoothScroll( true )->setFlags( UI_TOUCH_DRAG_ENABLED );
|
||||
genGrid->setParent( C )->setPosition( 325, 245 )->setSize( 200, 130 );
|
||||
genGrid->setCollumnsCount( 3 )->setRowHeight( 24 );
|
||||
|
||||
@@ -892,6 +892,7 @@ void EETest::onItemClick( const UIEvent * Event ) {
|
||||
} else if ( "Show Window" == txt ) {
|
||||
UIMenuCheckBox * Chk = reinterpret_cast<UIMenuCheckBox*> ( Event->getControl() );
|
||||
|
||||
C->toFront();
|
||||
C->setVisible( true );
|
||||
C->setEnabled( true );
|
||||
|
||||
@@ -971,7 +972,7 @@ void EETest::onButtonClick( const UIEvent * Event ) {
|
||||
Gfx->setEnabled( false );
|
||||
|
||||
Gfx->startRotation( 0, 2500, Milliseconds( 2500 ) );
|
||||
Gfx->startMovement( Vector2i( Math::randi( 0, mWindow->getWidth() ), -64 ), Vector2i( Math::randi( 0, mWindow->getWidth() ), mWindow->getHeight() + 64 ), Milliseconds( 2500 ) );
|
||||
Gfx->startTranslation( Vector2i( Math::randi( 0, mWindow->getWidth() ), -64 ), Vector2i( Math::randi( 0, mWindow->getWidth() ), mWindow->getHeight() + 64 ), Milliseconds( 2500 ) );
|
||||
Gfx->closeFadeOut( Milliseconds( 3500 ) );
|
||||
|
||||
//mListBox->addListBoxItem( "Test ListBox " + String::toStr( mListBox->getCount() + 1 ) + " testing it right now!" );
|
||||
|
||||
Reference in New Issue
Block a user