RECENT NEWS
📢 𝟑𝟎% Discount for all ads only this month ❄️

530 Simple zooming

Adam
power_settings_new
Seen 2 years ago
Steel Warrior (11/15)
Steel Warrior
0
0
0
11 Posts
Posts
0
Warning level
0
Likes
0
Dislikes
Joined: 2022-04-24

So seen a few vague posts about "zooming", yet no full guide on it.

Side note, you can also begin to refactor the code for when you learn as you go along, doesn't have to be 1:1 rs but it's great to make things easier for yourself and maybe others as you go along, just document old field names if needed.

Let's begin.

Client class add this

Code:
public static short zoom = 600;

Class3_Sub13_Sub36 class modify this to mine given

Code:
Class140_Sub2.method1952(Class3_Sub13_Sub13.anInt3155, -1907397104, var1, Class121.method1736(Class26.anInt501, 1, Class102.aClass140_Sub4_Sub1_2141.anInt2819, Class102.aClass140_Sub4_Sub1_2141.anInt2829) + -50, client.zoom - -(var6 * 3), var7, Class62.anInt942, var6);

Class146_Sub1 add this

Code:
private int scrollValue = 0;

modify you mouseWheelMoved to mine (just easier to add)

Code:
   public final synchronized void mouseWheelMoved(MouseWheelEvent var1) {
      this.anInt2941 += var1.getWheelRotation();
      scrollValue = var1.getWheelRotation();
      if (client.zoom > 1200 && scrollValue >= 0 || client.zoom < 100 && scrollValue <= 0) {
    	  return;
      }
      client.zoom += scrollValue >= 0 ? 50 : -50;
   }

The 50/-50 is the zoom notches in/out (modify this accordingly to your own preference).
This'll make it either faster or slower for zooming.

The 1200 is zoom out max, and 100 is zoom in max.

Media:

00
  • Like
Reactions: