Пример #1
0
        public void OnLoad(object sender, EventArgs e)
        {
            Thread posThread = new Thread(() =>
            {
                int lx = 0;
                int ly = 0;
                while (true)
                {
                    fixSizeDel del = new fixSizeDel(() =>
                    {
                        MCM.RECT mcRect = MCM.getMinecraftRect();
                        x      = mcRect.Left + 16;
                        y      = mcRect.Top + 30;
                        width  = mcRect.Right;
                        height = mcRect.Bottom;
                        if (x != lx || y != ly)
                        {
                            lx = x;
                            ly = y;
                            ui.Refresh();
                        }
                        ui.TopMost = MCM.isMinecraftFocused();
                    });
                    ui.Invoke(del);
                }
            });

            posThread.Start();
            Console.WriteLine("Tab GUI overlay loop started!");
        }
Пример #2
0
 public override void onDraw(System.Drawing.Graphics graphics)
 {
     base.onDraw(graphics);
     if (MCM.readInt64(Minecraft.clientInstance.localPlayer.addr) > 0)
     {
         MCM.RECT mcRect = MCM.getMinecraftRect();
         float    playerX = Minecraft.clientInstance.localPlayer.currentX3, playerY = Minecraft.clientInstance.localPlayer.currentY3, playerZ = Minecraft.clientInstance.localPlayer.currentZ3;
         string   formatText = Math.Floor(playerX).ToString() + ":" + Math.Floor(playerY - 1).ToString() + ":" + Math.Floor(playerZ).ToString();
         graphics.DrawString(formatText, textFont, primary, 0, mcRect.Top * 130);
     }
 }
Пример #3
0
        void trueAdjust()
        {
            //If it is fullscreen, the title bar is larger
            WINDOWPLACEMENT placement = new WINDOWPLACEMENT();

            GetWindowPlacement(MCM.mcWinHandle, ref placement);
            if (placement.showCmd == SW_MAXIMIZE)
            {
                fullScOff = 8;
            }
            else
            {
                fullScOff = 0;
            }
            //Adust window position
            MCM.RECT mcRect = MCM.getMinecraftRect();
            x      = mcRect.Left + 9;
            y      = mcRect.Top + 34 + fullScOff;
            width  = mcRect.Right - mcRect.Left - 18;
            height = mcRect.Bottom - mcRect.Top - 43 - fullScOff;
            SetWindowPos(hWnd, MCM.isMinecraftFocusedInsert(), x, y, width, height, 0x0040);
        }