├── ESPView.java └── README.md /ESPView.java: -------------------------------------------------------------------------------- 1 | package p042ru.geokar2006.modmenu; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.graphics.Color; 6 | import android.graphics.Paint; 7 | import android.graphics.PorterDuff; 8 | import android.os.Process; 9 | import android.util.AttributeSet; 10 | import android.util.Log; 11 | import android.view.View; 12 | 13 | /* renamed from: ru.geokar2006.modmenu.ESPView */ 14 | public class ESPView extends View implements Runnable { 15 | public static int FPS = 30; 16 | Paint mFilledPaint; 17 | Paint mStrokePaint; 18 | Paint mTextPaint; 19 | Thread mThread; 20 | long sleepTime = ((long) (1000 / FPS)); 21 | 22 | public ESPView(Context context) { 23 | super(context, (AttributeSet) null, 0); 24 | InitializePaints(); 25 | setFocusableInTouchMode(false); 26 | setBackgroundColor(0); 27 | Thread thread = new Thread(this); 28 | this.mThread = thread; 29 | thread.start(); 30 | } 31 | 32 | /* access modifiers changed from: protected */ 33 | public void onDraw(Canvas canvas) { 34 | if (canvas != null && getVisibility() == 0) { 35 | ClearCanvas(canvas); 36 | FloatingModMenuService.DrawOn(this, canvas); 37 | } 38 | } 39 | 40 | public void run() { 41 | Process.setThreadPriority(10); 42 | while (this.mThread.isAlive() && !this.mThread.isInterrupted()) { 43 | try { 44 | long t1 = System.currentTimeMillis(); 45 | postInvalidate(); 46 | Thread.sleep(Math.max(Math.min(0, this.sleepTime - (System.currentTimeMillis() - t1)), this.sleepTime)); 47 | } catch (InterruptedException it) { 48 | Log.e("OverlayThread", it.getMessage()); 49 | } 50 | } 51 | } 52 | 53 | public void InitializePaints() { 54 | Paint paint = new Paint(); 55 | this.mStrokePaint = paint; 56 | paint.setStyle(Paint.Style.STROKE); 57 | this.mStrokePaint.setAntiAlias(true); 58 | this.mStrokePaint.setColor(Color.rgb(0, 0, 0)); 59 | Paint paint2 = new Paint(); 60 | this.mFilledPaint = paint2; 61 | paint2.setStyle(Paint.Style.FILL); 62 | this.mFilledPaint.setAntiAlias(true); 63 | this.mFilledPaint.setColor(Color.rgb(0, 0, 0)); 64 | Paint paint3 = new Paint(); 65 | this.mTextPaint = paint3; 66 | paint3.setStyle(Paint.Style.FILL_AND_STROKE); 67 | this.mTextPaint.setAntiAlias(true); 68 | this.mTextPaint.setColor(Color.rgb(0, 0, 0)); 69 | this.mTextPaint.setTextAlign(Paint.Align.CENTER); 70 | this.mTextPaint.setStrokeWidth(1.1f); 71 | } 72 | 73 | public void ClearCanvas(Canvas cvs) { 74 | cvs.drawColor(0, PorterDuff.Mode.CLEAR); 75 | } 76 | 77 | public void DrawLine(Canvas cvs, int a, int r, int g, int b, float lineWidth, float fromX, float fromY, float toX, float toY) { 78 | this.mStrokePaint.setColor(Color.rgb(r, g, b)); 79 | int i = a; 80 | this.mStrokePaint.setAlpha(a); 81 | this.mStrokePaint.setStrokeWidth(lineWidth); 82 | cvs.drawLine(fromX, fromY, toX, toY, this.mStrokePaint); 83 | } 84 | 85 | public void DrawText(Canvas cvs, int a, int r, int g, int b, String txt, float posX, float posY, float size) { 86 | this.mTextPaint.setColor(Color.rgb(r, g, b)); 87 | this.mTextPaint.setAlpha(a); 88 | if (getRight() > 1920 || getBottom() > 1920) { 89 | this.mTextPaint.setTextSize(4.0f + size); 90 | } else if (getRight() == 1920 || getBottom() == 1920) { 91 | this.mTextPaint.setTextSize(2.0f + size); 92 | } else { 93 | this.mTextPaint.setTextSize(size); 94 | } 95 | cvs.drawText(txt, posX, posY, this.mTextPaint); 96 | } 97 | 98 | public void DrawCircle(Canvas cvs, int a, int r, int g, int b, float stroke, float posX, float posY, float radius) { 99 | this.mStrokePaint.setColor(Color.rgb(r, g, b)); 100 | this.mStrokePaint.setAlpha(a); 101 | this.mStrokePaint.setStrokeWidth(stroke); 102 | cvs.drawCircle(posX, posY, radius, this.mStrokePaint); 103 | } 104 | 105 | public void DrawFilledCircle(Canvas cvs, int a, int r, int g, int b, float posX, float posY, float radius) { 106 | this.mFilledPaint.setColor(Color.rgb(r, g, b)); 107 | this.mFilledPaint.setAlpha(a); 108 | cvs.drawCircle(posX, posY, radius, this.mFilledPaint); 109 | } 110 | 111 | public void DrawRect(Canvas cvs, int a, int r, int g, int b, int stroke, float x, float y, float width, float height) { 112 | this.mStrokePaint.setStrokeWidth((float) stroke); 113 | this.mStrokePaint.setColor(Color.rgb(r, g, b)); 114 | int i = a; 115 | this.mStrokePaint.setAlpha(a); 116 | cvs.drawRect(x, y, x + width, y + height, this.mStrokePaint); 117 | } 118 | 119 | public void DrawFilledRect(Canvas cvs, int a, int r, int g, int b, float x, float y, float width, float height) { 120 | this.mFilledPaint.setColor(Color.rgb(r, g, b)); 121 | int i = a; 122 | this.mFilledPaint.setAlpha(a); 123 | cvs.drawRect(x, y, x + width, y + height, this.mFilledPaint); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Esp-Mod-Menu 2 | Esp for Mod Menu 3 | Esp view for your Mods 4 | 5 | Works at all games and version games 6 | 7 | Forward Assault Esp 8 | Standoff 2 Esp 9 | --------------------------------------------------------------------------------