Exemplo n.º 1
0
        static void Main(string[] args)
        {
            DX9Overlay.SetParam("use_window", "1");                                                                          // Use the window name to find the process
            DX9Overlay.SetParam("window", "GTA:SA:MP");                                                                      // Set the window name

            overlayText = DX9Overlay.TextCreate("Arial", 12, false, false, 200, 200, 0xFF00FFFF, "Hello world", true, true); // Initialize 'overlayText'
            if (overlayText == -1)
            {
                Console.WriteLine("A error is occurred at the intializing.");
                Console.WriteLine("Press any key to close the application!");

                Console.ReadKey();
                return;
            }
            Console.WriteLine("Enter 'exit' to close the application!");
            string input = Console.ReadLine(); // Get the input

            while (input != "exit")
            {
                DX9Overlay.TextSetString(overlayText, input); // Set 'overlayText' string to the value of 'input'
                input = Console.ReadLine();
            }

            DX9Overlay.TextDestroy(overlayText); // Destroy text if the input is 'exit'
        }
        static void Main(string[] args)
        {
            DX9Overlay.SetParam("process", "GFXTest32.exe"); // Set the process name

            DX9Overlay.DestroyAllVisual();

            overlayText = DX9Overlay.TextCreateUnicode("Arial", 12, false, false, 200, 200, 0xFF00FFFF, "Hello world!\n€ÖÜŒœЄϿ", true, true); // Initialize 'overlayText'
            overlayBox  = DX9Overlay.BoxCreate(200, 200, 100, 100, 0x50FF00FF, true);                                                         // Initialize 'overlayBox'
            overlayLine = DX9Overlay.LineCreate(0, 0, 300, 300, 5, 0xFFFFFFFF, true);                                                         // Initialize 'overlayLine'

            if (overlayText == -1 || overlayBox == -1 || overlayLine == -1)
            {
                Console.WriteLine("A error is occurred at the intializing.");
                Console.WriteLine("Press any key to close the application!");

                Console.ReadKey();
                return;
            }
            Console.WriteLine("Enter 'exit' to close the application!");
            string input = Console.ReadLine(); // Get the input

            while (input != "exit")
            {
                DX9Overlay.TextSetString(overlayText, input); // Set 'overlayText' string to the value of 'input'
                input = Console.ReadLine();
            }

            DX9Overlay.TextDestroy(overlayText); // Destroy text if the input is 'exit'
            DX9Overlay.BoxDestroy(overlayBox);   // Destroy box if the input is 'exit'
            DX9Overlay.LineDestroy(overlayLine); // Destroy line if the input is 'exit'
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            //DX9Overlay.SetParam("use_window", "1"); // Use the window name to find the process
            //DX9Overlay.SetParam("window", "GTA:SA:MP"); // Set the window name
            //DX9Overlay.SetParam("process", "CastlevaniaLoSUE.exe");

            if (args.Length < 1)
            {
                return;
            }

            var proc = args[0];

            DX9Overlay.SetParam("process", proc);
            DX9Overlay.DestroyAllVisual();

            overlayText = DX9Overlay.TextCreate("Consolas", 12, false, false, 10, 14, 0xFF00FFFF, "DualShock 3 #1 (USB, Battery: 80%)", true, true); // Initialize 'overlayText'
            if (overlayText == -1)
            {
                Console.WriteLine("A error is occurred at the intializing.");
                Console.WriteLine("Press any key to close the application!");

                Console.ReadKey();
                return;
            }

            DX9Overlay.ImageCreate(@"D:\Temp\battery_discharging_080.png", 165, 5, 0.7f, 0.7f, 90, 1, true);

            //DX9Overlay.BoxCreate(10, 50, 100, 100, 0x15FF0000, true);

            Console.WriteLine("Enter 'exit' to close the application!");
            string input = Console.ReadLine(); // Get the input

            while (input != "exit")
            {
                Console.WriteLine("FPS = {0}", DX9Overlay.GetFrameRate());
                DX9Overlay.TextSetString(overlayText, input); // Set 'overlayText' string to the value of 'input'
                input = Console.ReadLine();
            }

            DX9Overlay.DestroyAllVisual();
        }