Example #1
0
 public override void OnInteractDown(clientKeyEvent a)
 {
     base.OnInteractDown(a);
     if (a.key == 0x2)
     {
         Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
         if (objRect.Contains(p))
         {
             expanded = !expanded;
             if (expanded)
             {
                 height += children.Count * 24;
                 foreach (VSubShelfItem child in children)
                 {
                     child.visible = true;
                 }
             }
             else
             {
                 height -= children.Count * 24;
                 foreach (VSubShelfItem child in children)
                 {
                     child.visible = false;
                 }
             }
             OverlayHost.ui.Invalidate();
         }
     }
 }
 public void UpKeyHeld(object sender, clientKeyEvent e)
 {
     if (e.key == keybind)
     {
         enabled = false;
     }
 }
 public override void OnInteractDown(clientKeyEvent a)
 {
     base.OnInteractDown(a);
     if (visible)
     {
         if (a.key == 0x1)
         {
             Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
             if (objRect.Contains(p))
             {
                 if (!changing)
                 {
                     changing             = true;
                     this.renderedKeybind = "...";
                 }
             }
         }
         if (a.key != 0x1)
         {
             if (changing)
             {
                 if (a.key == 0x1B)
                 {
                     module.keybind = 0x07;
                 }
                 else
                 {
                     module.keybind = a.key;
                 }
                 this.renderedKeybind = ((int)a.key).ToString();
                 changing             = false;
             }
         }
     }
 }
Example #4
0
 public override void OnInteractUp(clientKeyEvent e)
 {
     base.OnInteractUp(e);
     if (e.key == 0x1)
     {
         this.dragging = false;
         OverlayHost.ui.Invalidate();
     }
 }
Example #5
0
 public void keyHeldEvent(object sender, clientKeyEvent e)
 {
     if (enabled && e.key == (char)0x02)
     {
         if (SDK.instance.player.pitch >= 85F && SDK.instance.player.heldItemCount > 0 && Pointers.blockPosY > 0 && Pointers.blockPosY <= 256)
         {
             Pointers.blockSide       = 1;
             SDK.instance.player.velY = 0.5F;
         }
     }
 }
Example #6
0
 public void keyHeldEvent(object sender, clientKeyEvent e)
 {
     if (enabled && e.key == (char)0x02)
     {
         if (Minecraft.clientInstance.localPlayer.pitch >= 85F && Minecraft.clientInstance.localPlayer.heldItemCount > 0 && Minecraft.clientInstance.localPlayer.level.lookingBlockY > 0 && Minecraft.clientInstance.localPlayer.level.lookingBlockY <= 256)
         {
             Minecraft.clientInstance.localPlayer.level.lookingBlockSide = 1;
             Minecraft.clientInstance.localPlayer.velY = 0.5F;
         }
     }
 }
Example #7
0
 public override void OnInteractDown(clientKeyEvent e)
 {
     base.OnInteractDown(e);
     if (e.key == 0x1)
     {
         Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
         if (objRect.Contains(p))
         {
             this.dragging = true;
         }
     }
 }
Example #8
0
 public void DownKeyHeld(object sender, clientKeyEvent e)
 {
     if (enabled)
     {
         if (e.key == (char)0x02)
         {
             if (Pointers.blockPosY > 0)
             {
                 SDK.instance.player.teleport((float)Pointers.blockPosX, (float)Pointers.blockPosY + 1, (float)Pointers.blockPosZ);
             }
         }
     }
 }
Example #9
0
 public void DownKeyHeld(object sender, clientKeyEvent e)
 {
     if (enabled)
     {
         if (e.key == (char)0x02)
         {
             if (Minecraft.clientInstance.localPlayer.level.lookingBlockY > 0)
             {
                 Minecraft.clientInstance.localPlayer.teleport((float)Minecraft.clientInstance.localPlayer.level.lookingBlockX, (float)Minecraft.clientInstance.localPlayer.level.lookingBlockY + 1, (float)Minecraft.clientInstance.localPlayer.level.lookingBlockZ);
             }
         }
     }
 }
 public void KeyHeldEvent(object sender, clientKeyEvent e)
 {
     if (e.key == (char)0x20)
     {
         if (enabled)
         {
             if (Minecraft.clientInstance.localPlayer.isInAir > 1 | Minecraft.clientInstance.localPlayer.onGround > 0)
             {
                 Minecraft.clientInstance.localPlayer.velY = (float)sliderSettings[0].value / 10F;
             }
         }
     }
 }
Example #11
0
 public override void OnInteractUp(clientKeyEvent e)
 {
     base.OnInteractUp(e);
     if (opened)
     {
         if (e.key == 0x1)
         {
             this.dragging = false;
             FileMan.man.saveConfig();
             OverlayHost.ui.Invalidate();
         }
     }
 }
Example #12
0
 public void keyHeldEvent(object sender, clientKeyEvent e)
 {
     if (enabled)
     {
         UInt64 facingEnt = SDK.instance.entityFacing;
         if (facingEnt > 0 && e.key == (char)0x01)
         {
             List <float> directionalVec = SDK.instance.directionalVector((SDK.instance.player.yaw + 90) * (float)Math.PI / 180, (float)Math.PI / 180);
             SDK.instance.player.velX = (float)sliderSettings[0].value / 10F * directionalVec[0];
             SDK.instance.player.velZ = (float)sliderSettings[0].value / 10F * directionalVec[2];
         }
     }
 }
Example #13
0
 public void KeyHeldEvent(object sender, clientKeyEvent e)
 {
     if (e.key == (char)0x20)
     {
         if (enabled)
         {
             if (SDK.instance.player.isInAir > 1 | SDK.instance.player.onGround > 0)
             {
                 SDK.instance.player.velY = (float)sliderSettings[0].value / 10F;
             }
         }
     }
 }
Example #14
0
 public void keyHeldEvent(object sender, clientKeyEvent e)
 {
     if (enabled)
     {
         UInt64 facingEnt = Minecraft.clientInstance.localPlayer.level.lookingEntity.addr;
         if (facingEnt > 0 && e.key == (char)0x01)
         {
             Utils.Vec3f directionalVec = Utils.directionalVector((Minecraft.clientInstance.localPlayer.yaw + 90) * (float)Math.PI / 180, (float)Math.PI / 180);
             Minecraft.clientInstance.localPlayer.velX = (float)sliderSettings[0].value / 10F * directionalVec.x;
             Minecraft.clientInstance.localPlayer.velZ = (float)sliderSettings[0].value / 10F * directionalVec.z;
         }
     }
 }
Example #15
0
 public override void OnInteractHeld(clientKeyEvent e)
 {
     base.OnInteractHeld(e);
     if (this.dragging)
     {
         if (e.key == 0x1)
         {
             Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
             x = p.X - dx;
             y = p.Y - dy;
             OverlayHost.ui.Invalidate();
         }
     }
 }
Example #16
0
 public override void OnInteractUp(clientKeyEvent a)
 {
     if (!deleted)
     {
         base.OnInteractUp(a);
         if (a.key == 0x1)
         {
             if (text[text.Length - 1] == '|')
             {
                 text = text.Remove(text.Length - 1);
                 if (text.Length == 0)
                 {
                     //deleted = true;
                     text = "0";
                 }
                 editing = false;
             }
             Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
             if (objRect.Contains(p))
             {
                 editing = true;
                 text   += "|";
             }
         }
         if (a.key == 0x8)
         {
             if (editing)
             {
                 text = text.Remove(text.Length - 2) + "|";
             }
         }
         else if (a.key >= 0x30 && a.key <= 0x39)
         {
             if (editing)
             {
                 char typed = a.key;
                 text = text.Remove(text.Length - 1) + typed + "|";
             }
         }
         else if (a.key != 0x1 && a.key != 0x2 && a.key != 0x8)
         {
             if (editing && text.Length <= 1)
             {
                 char typed = '-';
                 text = text.Remove(text.Length - 1) + typed + "|";
             }
         }
     }
 }
 public override void OnInteractUp(clientKeyEvent a)
 {
     base.OnInteractDown(a);
     if (a.key == 0x1)
     {
         Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
         if (objRect.Contains(p))
         {
             if (clicked != null)
             {
                 clicked.Invoke(this, new EventArgs());
             }
         }
     }
 }
 public override void OnInteractDown(clientKeyEvent a)
 {
     base.OnInteractDown(a);
     if (visible)
     {
         if (a.key == 0x1)
         {
             Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
             toggleAbleArea        = objRect;
             toggleAbleArea.Height = 24;
             if (toggleAbleArea.Contains(p))
             {
                 module.enabled = !module.enabled;
             }
         }
     }
 }
 public override void OnInteractDown(clientKeyEvent e)
 {
     base.OnInteractDown(e);
     if (opened)
     {
         if (e.key == 0x1)
         {
             Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
             if (objRect.Contains(p))
             {
                 this.value = !this.value;
                 clicked    = true;
                 OverlayHost.ui.Invalidate();
             }
         }
     }
 }
Example #20
0
 public override void OnInteractUp(clientKeyEvent a)
 {
     if (!deleted)
     {
         base.OnInteractUp(a);
         if (a.key == 0x1)
         {
             if (text[text.Length - 1] == '|')
             {
                 text = text.Remove(text.Length - 1);
                 if (text.Length == 0)
                 {
                     deleted = true;
                 }
                 editing = false;
             }
             Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
             if (objRect.Contains(p))
             {
                 editing = true;
                 text   += "|";
             }
         }
         if (a.key == 0x8)
         {
             if (editing)
             {
                 text = text.Remove(text.Length - 2) + "|";
             }
         }
         else if (a.key >= 0x30 && a.key <= 0x5A)
         {
             if (editing)
             {
                 char typed = a.key;
                 if (!KeybindHandler.isKeyDown((char)0x10))
                 {
                     typed += (char)0x20;
                 }
                 text = text.Remove(text.Length - 1) + typed + "|";
                 FileMan.man.saveConfig();
             }
         }
     }
 }
Example #21
0
 private void OnKey(object sender, clientKeyEvent e)
 {
     if (active)
     {
         if (e.key == 0x28)
         {
             selectNextModule();
         }
         if (e.key == 0x26)
         {
             selectPrevModule();
         }
         if (e.key == 0x27)
         {
             toggleSelectedModule();
         }
     }
 }
Example #22
0
 public override void OnInteractHeld(clientKeyEvent e)
 {
     base.OnInteractHeld(e);
     if (this.dragging)
     {
         if (e.key == 0x1)
         {
             Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
             for (int i = 0; i < total + 1; i++)
             {
                 if (increments[i].Contains(p))
                 {
                     value = i - Math.Abs(minimum);
                 }
             }
             OverlayHost.ui.Invalidate();
         }
     }
 }
 public void onKeyPress(object sender, clientKeyEvent e)
 {
     if (e.key == 0x28)
     {
         selectNextCategory();
     }
     if (e.key == 0x26)
     {
         selectPrevCategory();
     }
     if (e.key == 0x27)
     {
         activateSelectedCategory();
     }
     if (e.key == 0x25)
     {
         deactivateSelectedCategory();
     }
 }
 public override void OnInteractDown(clientKeyEvent a)
 {
     base.OnInteractDown(a);
     if (a.key == 0x2)
     {
         Point p = new Point(Cursor.Position.X - OverlayHost.ui.Left, Cursor.Position.Y - OverlayHost.ui.Top);
         if (objRect.Contains(p))
         {
             expanded = !expanded;
             if (expanded)
             {
                 height += children.Count * 24;
             }
             else
             {
                 height -= children.Count * 24;
             }
             OverlayHost.ui.Invalidate();
         }
     }
 }
Example #25
0
 public virtual void OnInteractUp(clientKeyEvent a)
 {
 }
 public override void OnInteractUp(clientKeyEvent a)
 {
     base.OnInteractUp(a);
     clicked = false;
     OverlayHost.ui.Invalidate();
 }