2
0
Fork 0
mirror of https://github.com/GTA-ASM/SanAndreasUnity synced 2025-03-05 07:37:17 +00:00

add fire button

This commit is contained in:
in0finite 2019-07-23 01:18:34 +02:00
parent 3db52f9849
commit f2b4059c49

View file

@ -252,6 +252,19 @@ namespace SanAndreasUnity.Behaviours.Peds.States
customInput.SetButton("RightClick", isAimOn);
// fire - repeat button
bool isFireOn = false;
xPos -= buttonWidth + horizontalSpace;
GUI.contentColor = m_ped.IsFireOn ? Color.blue : Color.white;
if (GUI.RepeatButton(new Rect(xPos, topY, buttonWidth, buttonHeight), "Fire"))
{
isFireOn = true;
}
GUI.contentColor = Color.white;
xPos = originalXPos;
customInput.SetButton("LeftClick", isFireOn);
// fly
topY -= buttonHeight;
if (GUI.Button(new Rect(xPos, topY, buttonWidth, buttonHeight), "Fly"))