diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/lljoystickbutton.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/newview/lljoystickbutton.cpp')
-rw-r--r-- | linden/indra/newview/lljoystickbutton.cpp | 87 |
1 files changed, 42 insertions, 45 deletions
diff --git a/linden/indra/newview/lljoystickbutton.cpp b/linden/indra/newview/lljoystickbutton.cpp index b429ed2..548da07 100644 --- a/linden/indra/newview/lljoystickbutton.cpp +++ b/linden/indra/newview/lljoystickbutton.cpp | |||
@@ -48,6 +48,10 @@ | |||
48 | 48 | ||
49 | #include "llglheaders.h" | 49 | #include "llglheaders.h" |
50 | 50 | ||
51 | static LLRegisterWidget<LLJoystickAgentSlide> r1("joystick_slide"); | ||
52 | static LLRegisterWidget<LLJoystickAgentTurn> r2("joystick_turn"); | ||
53 | |||
54 | |||
51 | const F32 NUDGE_TIME = 0.25f; // in seconds | 55 | const F32 NUDGE_TIME = 0.25f; // in seconds |
52 | const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed | 56 | const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed |
53 | 57 | ||
@@ -603,37 +607,33 @@ void LLJoystickCameraRotate::setToggleState( BOOL left, BOOL top, BOOL right, BO | |||
603 | 607 | ||
604 | void LLJoystickCameraRotate::draw() | 608 | void LLJoystickCameraRotate::draw() |
605 | { | 609 | { |
606 | 610 | LLGLSUIDefault gls_ui; | |
607 | if( getVisible() ) | ||
608 | { | ||
609 | LLGLSUIDefault gls_ui; | ||
610 | 611 | ||
611 | getImageUnselected()->draw( 0, 0 ); | 612 | getImageUnselected()->draw( 0, 0 ); |
612 | 613 | ||
613 | if( mInTop ) | 614 | if( mInTop ) |
614 | { | 615 | { |
615 | drawRotatedImage( getImageSelected()->getImage(), 0 ); | 616 | drawRotatedImage( getImageSelected()->getImage(), 0 ); |
616 | } | 617 | } |
617 | 618 | ||
618 | if( mInRight ) | 619 | if( mInRight ) |
619 | { | 620 | { |
620 | drawRotatedImage( getImageSelected()->getImage(), 1 ); | 621 | drawRotatedImage( getImageSelected()->getImage(), 1 ); |
621 | } | 622 | } |
622 | 623 | ||
623 | if( mInBottom ) | 624 | if( mInBottom ) |
624 | { | 625 | { |
625 | drawRotatedImage( getImageSelected()->getImage(), 2 ); | 626 | drawRotatedImage( getImageSelected()->getImage(), 2 ); |
626 | } | 627 | } |
627 | 628 | ||
628 | if( mInLeft ) | 629 | if( mInLeft ) |
629 | { | 630 | { |
630 | drawRotatedImage( getImageSelected()->getImage(), 3 ); | 631 | drawRotatedImage( getImageSelected()->getImage(), 3 ); |
631 | } | 632 | } |
632 | 633 | ||
633 | if (sDebugRects) | 634 | if (sDebugRects) |
634 | { | 635 | { |
635 | drawDebugRect(); | 636 | drawDebugRect(); |
636 | } | ||
637 | } | 637 | } |
638 | } | 638 | } |
639 | 639 | ||
@@ -722,8 +722,8 @@ LLJoystickCameraZoom::LLJoystickCameraZoom(const LLString& name, LLRect rect, co | |||
722 | mInTop( FALSE ), | 722 | mInTop( FALSE ), |
723 | mInBottom( FALSE ) | 723 | mInBottom( FALSE ) |
724 | { | 724 | { |
725 | mPlusInImage = gImageList.getImage(LLUI::findAssetUUIDByName(plus_in_img), MIPMAP_FALSE, TRUE); | 725 | mPlusInImage = LLUIImageList::getInstance()->getUIImage(plus_in_img); |
726 | mMinusInImage = gImageList.getImage(LLUI::findAssetUUIDByName(minus_in_img), MIPMAP_FALSE, TRUE); | 726 | mMinusInImage = LLUIImageList::getInstance()->getUIImage(minus_in_img); |
727 | } | 727 | } |
728 | 728 | ||
729 | 729 | ||
@@ -789,26 +789,23 @@ void LLJoystickCameraZoom::setToggleState( BOOL top, BOOL bottom ) | |||
789 | 789 | ||
790 | void LLJoystickCameraZoom::draw() | 790 | void LLJoystickCameraZoom::draw() |
791 | { | 791 | { |
792 | if( getVisible() ) | 792 | if( mInTop ) |
793 | { | 793 | { |
794 | if( mInTop ) | 794 | mPlusInImage->draw(0,0); |
795 | { | 795 | } |
796 | gl_draw_image( 0, 0, mPlusInImage ); | 796 | else |
797 | } | 797 | if( mInBottom ) |
798 | else | 798 | { |
799 | if( mInBottom ) | 799 | mMinusInImage->draw(0,0); |
800 | { | 800 | } |
801 | gl_draw_image( 0, 0, mMinusInImage ); | 801 | else |
802 | } | 802 | { |
803 | else | 803 | getImageUnselected()->draw( 0, 0 ); |
804 | { | 804 | } |
805 | getImageUnselected()->draw( 0, 0 ); | ||
806 | } | ||
807 | 805 | ||
808 | if (sDebugRects) | 806 | if (sDebugRects) |
809 | { | 807 | { |
810 | drawDebugRect(); | 808 | drawDebugRect(); |
811 | } | ||
812 | } | 809 | } |
813 | } | 810 | } |
814 | 811 | ||