Hello,
I got the problem that KeyCode is not having any defenition..
Does anyone know how to fix it? i have the exact Code like in the Thread above
TXH
Hello,
I got the problem that KeyCode is not having any defenition..
Does anyone know how to fix it? i have the exact Code like in the Thread above
TXH
Hello,
So i get the Issue that my "KeyCode is not in an EventArgs Implemented... Does anyone know how to fix that?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
using GTA;
using GTA.Native;
using GTA.Math;
using NativeUI;
namespace GTA_Script1
{
public class Class1 : Script
{
MenuPool modMenuPool;
UIMenu mainMenu;
public Class1()
{
modMenuPool = new MenuPool();
mainMenu = new UIMenu("Mod Menu", "Select an Option");
modMenuPool.Add(mainMenu);
Tick += onTick;
KeyDown += onKeyDown;
}
void onTick(object sender, EventArgs e)
{
if (modMenuPool != null)
modMenuPool.ProcessMenus();
}
void onKeyDown(object sender, EventArgs e)
{
if (e.KeyCode == Keys.F10 && !modMenuPool.IsAnyMenuOpen())
{
mainMenu.Visible = !mainMenu.Visible;
}
}
}
}