Thread: [Elvarg Client] Improved Interface Scrolling

Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24
  1. #21  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,742
    Thanks given
    64
    Thanks received
    686
    Discord
    View profile
    Rep Power
    1032
    Quote Originally Posted by Tommeh View Post
    cant be good if it's still hardcoded lol
    Code I posted is how higher rev does it
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #22  
    Donator

    Join Date
    Sep 2016
    Posts
    132
    Thanks given
    115
    Thanks received
    51
    Rep Power
    62
    Quote Originally Posted by Zion View Post
    Bad.

    Client#handleScrolling

    Code:
        private void handleScrolling(RSInterface rsi, int scrollX, int scrollY, int mouseX, int mouseY, int lastScrollPos,
                int scrollContainerSize, boolean isTabArea) {
            int scrollBarOffsetX = aBoolean972 ? 32 : 0;
            aBoolean972 = false;
    
            if (super.mouseWheelRotation != 0 && mouseX >= scrollX - rsi.width && mouseX < scrollX + 16 && mouseY >= scrollY
                    && mouseY <= scrollY + scrollContainerSize) {
                rsi.scrollPosition += super.mouseWheelRotation * 45;
    
                if (isTabArea) {
                    reDrawTabArea = true;
                }
            } else if (mouseX >= scrollX && mouseX < scrollX + 16 && mouseY >= scrollY && mouseY < scrollY + 16) {
                rsi.scrollPosition -= anInt1213 * 4;
                if (isTabArea) {
                    reDrawTabArea = true;
                }
            } else if (mouseX >= scrollX && mouseX < scrollX + 16 && mouseY >= (scrollY + scrollContainerSize) - 16
                    && mouseY < scrollY + scrollContainerSize) {
                rsi.scrollPosition += anInt1213 * 4;
                if (isTabArea) {
                    reDrawTabArea = true;
                }
            } else if (mouseX >= scrollX - scrollBarOffsetX && mouseX < scrollX + 16 + scrollBarOffsetX && mouseY >= scrollY + 16
                    && mouseY < (scrollY + scrollContainerSize) - 16 && anInt1213 > 0) {
                int scrollOffset = ((scrollContainerSize - 32) * scrollContainerSize) / lastScrollPos;
                if (scrollOffset < 8) {
                    scrollOffset = 8;
                }
                int scrollPos = mouseY - scrollY - 16 - scrollOffset / 2;
                int maxScroll = scrollContainerSize - 32 - scrollOffset;
                rsi.scrollPosition = ((lastScrollPos - scrollContainerSize) * scrollPos) / maxScroll;
                if (isTabArea) {
                    reDrawTabArea = true;
                }
                aBoolean972 = true;
            }
        }
    the method is already in any client, you just need to rename and implement the code I highlighted.
    I was just improving the existing way it's included in all clients I've worked with, I forgot there is already existing code for the buttons. Thanks for sharing.

    I don't have mouseWheelRotation, I assume it's just set to the rotation on mouseWheelMoved event, but where are you setting it back to 0 at? Thanks. I'll change post tomorrow to use this snippet and credit unless you want to post yourself.
    If a man does not have the sauce, then he is lost. But the same man can be lost in the sauce.
    Reply With Quote  
     

  3. #23  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,742
    Thanks given
    64
    Thanks received
    686
    Discord
    View profile
    Rep Power
    1032
    After it updates the position of the scroll
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #24  
    Donator


    Join Date
    Jul 2011
    Posts
    922
    Thanks given
    196
    Thanks received
    169
    Rep Power
    189
    What about zooming?
    Reply With Quote  
     

Page 3 of 3 FirstFirst 123

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [Summon-Pkz] Client Lunar Interface
    By Swarfega in forum Help
    Replies: 7
    Last Post: 06-09-2009, 07:50 PM
  2. [508] Client Side Interface Opening
    By Koâk in forum Show-off
    Replies: 11
    Last Post: 04-17-2009, 03:29 PM
  3. [508] Cheat client open interface
    By Laxika in forum Show-off
    Replies: 18
    Last Post: 02-09-2009, 09:51 PM
  4. DeltaScape Client (IMPROVED!)
    By Godsent in forum Downloads
    Replies: 25
    Last Post: 08-20-2008, 06:28 PM
  5. Rune--Cheat Client Full interface *pictures + Video*
    By i ant geting in no plane in forum Downloads
    Replies: 27
    Last Post: 01-25-2008, 03:09 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •