# Enable/Disable Drag Selection

GrammarenableDisable mouse drag selection for players
FlagsNative | Action

If drag selection is disabled, the selection box will no longer appear when left clicking and holding down the button while moving the mouse cursor

# Arguments

Returns — void

native void UISetDragSelectEnabled(
	playergroup players,
	bool enable,
);

Category: UI / Game UI

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:476

    libVCMI_gv_pM_SoAExitInstantly = false;
    libVCMI_gv_pM_SoAForceExit = false;
    UISetDragSelectEnabled(PlayerGroupAll(), false);
    libVCUI_gf_PU_TargetingSetCharges(libVCMI_gv_pM_SoATargetingChargesTotal, libVCMI_gv_pM_SoATargetingChargesTotal);
    if ((libVCMI_gv_pM_SoATargetingOrder != null)) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:565


    libVCMI_gv_pM_SoATargetingTransitioning = true;
    UISetDragSelectEnabled(PlayerGroupAll(), true);
    if ((libVCMI_gv_pM_SoAExitInstantly == false)) {
        libVCMI_gf_PM_ResetFogAlphaOverTime(0.5);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6655

        UnitSelect(libVCMI_gv_pM_FlyoverUnit, 1, true);
        libNtve_gf_HideGameUI(false, PlayerGroupAll());
        UISetDragSelectEnabled(PlayerGroupAll(), false);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
        CameraFollowUnitGroup(1, UnitLastCreatedGroup(), true, false);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6666

    }
    else {
        UISetDragSelectEnabled(PlayerGroupAll(), true);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
        UnitKill(libVCMI_gv_pM_FlyoverUnit);

mods/frontiers.sc2modbase.sc2data/Lib6CB3363F.galaxy:347

    libNtve_gf_SetPlayerGroupAlliance(lib6CB3363F_gv_fT_PlayerGroup, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    UISetDragSelectEnabled(PlayerGroupAll(), false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeAchievementMenuButton, false);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeAlertPanel, false);

mods/heroesbrawlmods/arenamodemods/arenamode.stormmodbase.stormdata/LibAREN.galaxy:423

    UnitBehaviorRemove(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_core, "PalaceDamageResponseController", 1);
    TriggerEnable(libUIUI_gt_DeathTimerPanelUpdate, true);
    UISetDragSelectEnabled(PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    libGame_gf_AddCameraBoundsStorm(libAREN_gv_aRM_MechanicData[libAREN_gf_ArenaCurrentMechanicId()].lv_cameraBoundsRegion);

mods/heroesbrawlmods/arenamodemods/attackdefend.stormmodbase.stormdata/LibAtDe.galaxy:423


    // Implementation
    UISetDragSelectEnabled(PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    libIGHS_gf_ShufflePickDebugMessage(StringExternal("Param/Value/lib_AtDe_A22E1F27"));

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:13022

    AIRemovePlayerUnit(lv_lVController);
    UISetSelectionTypeEnabled(PlayerGroupSingle(lv_lVPlayer), c_localSelectionTypeUnknown, true);
    UISetDragSelectEnabled(PlayerGroupSingle(lv_lVPlayer), true);
    UISetFrameVisible(PlayerGroupSingle(lv_lVPlayer), c_syncFrameTypeControlGroupPanel, true);
    UnitControlGroupClear(lv_lVPlayer, 1);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:1400

    if ((libSprt_gv_dEBUGSelectionEnabled == false)) {
        libSprt_gv_dEBUGSelectionEnabled = true;
        UISetDragSelectEnabled(PlayerGroupAll(), true);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
        libNtve_gf_SetDialogItemChecked(libUIUI_gv_uIDebugPanel.lv_selectionEnabledCheckbox, true, PlayerGroupAll());

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:1407

    else {
        libSprt_gv_dEBUGSelectionEnabled = false;
        UISetDragSelectEnabled(PlayerGroupAll(), false);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
        libNtve_gf_SetDialogItemChecked(libUIUI_gv_uIDebugPanel.lv_selectionEnabledCheckbox, false, PlayerGroupAll());

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:8758

    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeLeaderPanel, false);
    UISetBattleNetButtonOffset(PlayerGroupAll(), 280, 0);
    UISetDragSelectEnabled(PlayerGroupAll(), false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
    UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeWorldPanelHero, true);

mods/heromods/samuro.stormmodbase.stormdata/LibHSAM.galaxy:228

    UnitControlGroupAddUnit(lv_samuroPlayer, 4, lv_samuro);
    UISetSelectionTypeEnabled(PlayerGroupSingle(lv_samuroPlayer), c_localSelectionTypeUnknown, true);
    UISetDragSelectEnabled(PlayerGroupSingle(lv_samuroPlayer), true);
    UISetFrameVisible(PlayerGroupSingle(lv_samuroPlayer), c_syncFrameTypeControlGroupPanel, true);
}

mods/heromods/samuro.stormmodbase.stormdata/LibHSAM.galaxy:1883

        UnitBehaviorAdd(UnitGroupUnit(libHSAM_gv_mirrorImageUnitGroup[lv_samuroPlayer], 2), "Ultimate2Unlocked", libGame_gv_players[lv_samuroPlayer].lv_heroUnit, UnitBehaviorCount(lv_samuro, "Ultimate2Unlocked"));
        UISetSelectionTypeEnabled(PlayerGroupSingle(lv_samuroPlayer), c_localSelectionTypeUnknown, true);
        UISetDragSelectEnabled(PlayerGroupSingle(lv_samuroPlayer), true);
        UISetFrameVisible(PlayerGroupSingle(lv_samuroPlayer), c_syncFrameTypeControlGroupPanel, true);
        UnitBehaviorAdd(lv_samuro, "SamuroIllusionMasterToggleAIBehaviorAbil", lv_samuro, 1);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:5774

        UnitSelect(libNCMI_gv_NM_FlyoverUnit, 1, true);
        libNtve_gf_HideGameUI(false, PlayerGroupAll());
        UISetDragSelectEnabled(PlayerGroupAll(), false);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
        CameraFollowUnitGroup(1, UnitLastCreatedGroup(), true, false);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:5785

    }
    else {
        UISetDragSelectEnabled(PlayerGroupAll(), true);
        UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
        UnitKill(libNCMI_gv_NM_FlyoverUnit);