need help i have my mod for a game and im trying to make two of my gui.buttons work off a keybind
i made a mod for a game mysummercar awhile back still have it and it still a working mod but im trying to make my gui.buttons work off keybinds but has been giving me issues getting it to work i been on it for a week now trying to find away to get it to work
Answer by XxPlasma_TurtlexX · Aug 10, 2021 at 12:52 AM
this is my gui.button code i have alot of other codeing in my mod that allows the mod to work and alot of codeing that adds alot of cool stuff to my mod
(CODEING BELLOW FOR MY GUI.BUTTON)
public override void OnGUI()
{
GUIStyle myButtonStyle = new GUIStyle(GUI.skin.button);
myButtonStyle.fontSize = 20;
Font myFont = (Font)Resources.Load("Fonts/comic", typeof(Font));
myButtonStyle.font = myFont;
bool flag20 = GUI.Button(new Rect(Screen.width - 120, 880, 100, 60), "OPEN", myButtonStyle);
if (flag20)
{
FsmVariables.GlobalVariables.FindFsmBool("PlayerInMenu").Value = true;
guiShow = true;
guiColorSettings = false;
Custom1locations = false;
Morecolors = false;
flag20 = false;
}
not sure what i need to do to get it to work off a keybind like Keypad2
Your answer
![](https://koobas.hobune.stream/wayback/20220613041444im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
gui button textured how to 1 Answer
GUI Button Moving with a mouse 0 Answers
Why isn't WaitForSeconds working? 1 Answer
How do I destroy a GUI.button after it is clicked? 4 Answers
Button lag on android 1 Answer