# Enable/Disable Mouse Cursor Auto Hide

GrammarenableDisable mouse cursor auto hide for players, using a delay second delay for hiding
FlagsNative | Action

Auto hide causes the mouse cursor to automatically be hidden if the user hasn’t moved the cursor for a period of time. The cursor will also automatically be shown whenever the cursor is moved.

# Arguments

Returns — void

native void UISetCursorAutoHide(
	playergroup players,
	bool autoHide,
	fixed delay,
);

Category: UI / Game UI

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3273


    // Implementation
    UISetCursorAutoHide(PlayerGroupAll(), true, gv_c_MouseHideWait);
    if ((gv_controlTipDialog == c_invalidDialogId)) {
        libCamp_gf_CreateDialogInGrid(40.0, 25.0, c_anchorCenter, 0.0, -2.0, false);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3307

        Wait(0.5, c_timeGame);
    }
    UISetCursorAutoHide(PlayerGroupAll(), true, gv_c_MouseHideWait);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3446


    // Implementation
    UISetCursorAutoHide(PlayerGroupAll(), false, gv_c_MouseHideWait);
    libCamp_gf_CreateDialogInGrid(10.0, 15.0, c_anchorCenter, 0.0, 0.0, false);
    lv_dlg = DialogLastCreated();

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3563

    TriggerEnable(gt_ScoreScreenCloseButtonClicked, false);
    TriggerEnable(gt_ScoreScreenSpacebarPressed, false);
    UISetCursorAutoHide(PlayerGroupAll(), true, gv_c_MouseHideWait);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:4096

    TriggerExecute(gt_IntroCinematic, true, true);
    gf_FighterEnableDisableControl(true);
    UISetCursorAutoHide(PlayerGroupAll(), true, gv_c_MouseHideWait);
    libNtve_gf_DisplayScreenButton(gv_c_ScreenButton_Quit, StringExternal("Param/Value/6655B697"), 240, 80, c_anchorBottomRight, 40, 35, gt_QuitButtonClicked);
    libNtve_gf_SetDialogItemHandle(libNtve_gf_ScreenButton(gv_c_ScreenButton_Quit), "WoL_CantinaArcade_QuitButton", PlayerGroupAll());

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:8370

    }

    UISetCursorAutoHide(PlayerGroupAll(), true, 5.0);
    TriggerEnable(gt_EscapeKeyMenu, true);
    return true;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:8411


    UISetCursorVisible(PlayerGroupAll(), false);
    UISetCursorAutoHide(PlayerGroupAll(), true, 5.0);
    TriggerEnable(gt_EscapeKeyMenu, true);
    return true;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:8436

    gv_fighterMoveRightKeyDown = false;
    gv_fighterMoveUpKeyDown = false;
    UISetCursorAutoHide(PlayerGroupAll(), false, 5.0);
    UISetCursorVisible(PlayerGroupAll(), true);
    UIShowCustomDialog(PlayerGroupAll(), 1, StringExternal("Param/Value/2D8B36F5"), StringExternal("Param/Value/B690D296"), true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:3273


    // Implementation
    UISetCursorAutoHide(PlayerGroupAll(), true, gv_c_MouseHideWait);
    if ((gv_controlTipDialog == c_invalidDialogId)) {
        libCamp_gf_CreateDialogInGrid(40.0, 25.0, c_anchorCenter, 0.0, -2.0, false);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:3307

        Wait(0.5, c_timeGame);
    }
    UISetCursorAutoHide(PlayerGroupAll(), true, gv_c_MouseHideWait);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:3446


    // Implementation
    UISetCursorAutoHide(PlayerGroupAll(), false, gv_c_MouseHideWait);
    libCamp_gf_CreateDialogInGrid(10.0, 15.0, c_anchorCenter, 0.0, 0.0, false);
    lv_dlg = DialogLastCreated();

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:3563

    TriggerEnable(gt_ScoreScreenCloseButtonClicked, false);
    TriggerEnable(gt_ScoreScreenSpacebarPressed, false);
    UISetCursorAutoHide(PlayerGroupAll(), true, gv_c_MouseHideWait);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:4096

    TriggerExecute(gt_IntroCinematic, true, true);
    gf_FighterEnableDisableControl(true);
    UISetCursorAutoHide(PlayerGroupAll(), true, gv_c_MouseHideWait);
    libNtve_gf_DisplayScreenButton(gv_c_ScreenButton_Quit, StringExternal("Param/Value/6655B697"), 240, 80, c_anchorBottomRight, 40, 35, gt_QuitButtonClicked);
    libNtve_gf_SetDialogItemHandle(libNtve_gf_ScreenButton(gv_c_ScreenButton_Quit), "WoL_CantinaArcade_QuitButton", PlayerGroupAll());

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:8370

    }

    UISetCursorAutoHide(PlayerGroupAll(), true, 5.0);
    TriggerEnable(gt_EscapeKeyMenu, true);
    return true;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:8411


    UISetCursorVisible(PlayerGroupAll(), false);
    UISetCursorAutoHide(PlayerGroupAll(), true, 5.0);
    TriggerEnable(gt_EscapeKeyMenu, true);
    return true;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:8436

    gv_fighterMoveRightKeyDown = false;
    gv_fighterMoveUpKeyDown = false;
    UISetCursorAutoHide(PlayerGroupAll(), false, 5.0);
    UISetCursorVisible(PlayerGroupAll(), true);
    UIShowCustomDialog(PlayerGroupAll(), 1, StringExternal("Param/Value/2D8B36F5"), StringExternal("Param/Value/B690D296"), true);