More problems with my weapon wheel (minor ones this time)

so my weapon wheel is up and running real good with the new swapping implemented…i just have a few minor problems…

  1. when i first start the game and open the weapon wheel, the cursor doesn’t appear until i press escape atleast once …
  2. i have set my weaponwheel so that when the player holds down a certain key (f as of now)…it remains active and disabled…but this causes a strange problem that the sprite swap (embedded in the buttons) doesn’t function correctly when highlighting the button through hover…this problem is solved if i use a GetKeyDown based enable and disable metod…but since i want to keep them both as options…i need to know the solution…
  3. Since in unity, buttons can be directly controlled by keyboard…the same happens with the buttons on my wheel…with the difference being that the wheel has 16 buttons, since each weapon marker is semicircular and is hence occupied by four buttons each…i want to disable the key bindings of the buttons…

script 1

Here are my UImanager(basically manages the pausing and all)…and weapon wheel script…

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class UImanager : MonoBehaviour
{
  public GameObject pausemenu;
  public GameObject hud;
  public WeaponWheel wheel;
  public string pauseavailablity = "available";
  public bool pauseactive;
  public bool initialpause = false;
  public bool pausing;


    // Start is called before the first frame update
    void Start()
    {
      hud.SetActive(true);
      pausemenu.SetActive(false);
      pauseactive = initialpause;
    }

    public void Resume()
    {
      FindObjectOfType<AudioManager>().PlayClip("resume1");
      pausing = false;
    }

    public void Pause()
    {
      FindObjectOfType<AudioManager>().PlayClip("pause1");
      pausing = true;
    }

    // Update is called once per frame
    void Update()
    {
      if(SceneManager.GetActiveScene().buildIndex != 0)
      {
      if(pauseavailablity == "available")
      {
        if(Input.GetButtonDown("Cancel") && pausing && !wheel.wheelactive)
        {
          Resume();
        }
        else if(Input.GetButtonDown("Cancel") && !pausing && !wheel.wheelactive)
        {
          Pause();
        }

        if(pausing)
        {
          pauseactive = true;
          pausemenu.SetActive(true);
          Cursor.lockState = CursorLockMode.Confined;
        }
        else
        {
          pauseactive = false;
          pausemenu.SetActive(false);
        }

        if(wheel.wheelactive)
        {
          pauseactive = true;
          Cursor.lockState = CursorLockMode.Confined;
        }
        else if(!pausing)
        {
          pauseactive = false;
        }

      }
      else
      {
        Cursor.lockState = CursorLockMode.Confined;
      }
    }
}
 }

script 2

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class UImanager : MonoBehaviour
{
  public GameObject pausemenu;
  public GameObject hud;
  public WeaponWheel wheel;
  public string pauseavailablity = "available";
  public bool pauseactive;
  public bool initialpause = false;
  public bool pausing;


    // Start is called before the first frame update
    void Start()
    {
      hud.SetActive(true);
      pausemenu.SetActive(false);
      pauseactive = initialpause;
    }

    public void Resume()
    {
      FindObjectOfType<AudioManager>().PlayClip("resume1");
      pausing = false;
    }

    public void Pause()
    {
      FindObjectOfType<AudioManager>().PlayClip("pause1");
      pausing = true;
    }

    // Update is called once per frame
    void Update()
    {
      if(SceneManager.GetActiveScene().buildIndex != 0)
      {
      if(pauseavailablity == "available")
      {
        if(Input.GetButtonDown("Cancel") && pausing && !wheel.wheelactive)
        {
          Resume();
        }
        else if(Input.GetButtonDown("Cancel") && !pausing && !wheel.wheelactive)
        {
          Pause();
        }

        if(pausing)
        {
          pauseactive = true;
          pausemenu.SetActive(true);
          Cursor.lockState = CursorLockMode.Confined;
        }
        else
        {
          pauseactive = false;
          pausemenu.SetActive(false);
        }

        if(wheel.wheelactive)
        {
          pauseactive = true;
          Cursor.lockState = CursorLockMode.Confined;
        }
        else if(!pausing)
        {
          pauseactive = false;
        }

      }
      else
      {
        Cursor.lockState = CursorLockMode.Confined;
      }
    }
}
 }

Any and all help is appreciated, Thanks in Advance!

You have attached two identical scripts, so it is impossible to see what happens when you open the WeaponWheel.

Problem 1: The following code can be used to make the cursor visible:

Cursor.visible = true;
Cursor.lockState = CursorLockMode.Confined; // or .None

For example, you can call this function when opening the WeaponWheel:

void ShowCursor ()
{
    if (! Cursor.visible || Cursor.lockState == CursorLockMode.Locked)
    {
        Cursor.visible = true;
        Cursor.lockState = CursorLockMode.Confined;
    }
}

Problem 2: As far as I can see, it has already been resolved.

Problem 3: To disable the control of the Unity Buttons from the keyboard, you must disable navigation by these buttons (this also works with other types of UI elements):