Search Unity

How to disable the GUI.horizontalSlider?

Discussion in 'Scripting' started by BooBi, Jun 24, 2013.

  1. BooBi

    BooBi

    Joined:
    Jan 18, 2010
    Posts:
    534
    Hi,

    On my interface, I've got a couple of GUI.verticalslider and a GUi.horizontalslider. At some point the user can open an info page. The page is a label with a close button and on the bg I've got a fullscreen transparent black background (that separates the page and the interface).

    I've got a simple bool called pageOnOff which is connected to the page and every button of my interface as:
    if(GUI.button()!pageOnOff)
    That way when the page is ON you can't click on the buttons.

    How can I block the user from using the sliders the same way ?

    Thanks a lot for the help

    B.