# Enable/Disable Drag Selection
Grammar — enableDisable mouse drag selection for players
Flags —Native
|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
playergroup
— Playersbool
<preset::Enable_Disable_Option> — Enable/Disable
Returns — void
native void UISetDragSelectEnabled(
playergroup players,
bool enable,
);
# Related
Category: UI / Game UI
- Set Screen Mode —
void
— UISetMode - Set Minimum Letterbox Height —
void
— UISetMinimumLetterboxHeight - Show/Hide Game UI —
void
— libNtve_gf_HideGameUI - Add/Remove UI Frame Type For Global Filter List —
void
— libNtve_gf_AddRemoveUIFrameTypeForGlobalFilterList - UI Frame Flag — preset —
int
- UI Frame Flag Check —
bool
— libNtve_gf_UIFrameFlagCheck - For Each UI Frame — macro
- Show/Hide UI Frame —
void
— UISetFrameVisible - Set BattleNet Button Offset —
void
— UISetBattleNetButtonOffset - Clear BattleNet Button Offset —
void
— UIClearBattleNetButtonOffset - UI Frame Is Visible —
bool
— UIFrameVisible - Show/Hide World —
void
— UISetWorldVisible - Show/Hide Achievement Panel —
void
— AchievementPanelSetVisible - Show/Hide Mouse Cursor —
void
— UISetCursorVisible - Enable/Disable Mouse Cursor Auto Hide —
void
— UISetCursorAutoHide - Enable/Disable Drag Selection —
void
— UISetDragSelectEnabled - Set Hot Key Profile —
void
— UISetHotkeyProfile - Lock Ally Color Setting —
void
— UIUnitColorStyleOverride - Unlock Ally Color Setting —
void
— UIUnitColorStyleClearOverride - Lock Flyer Helper Display —
void
— UIFlyerHelperOverride - Unlock Flyer Helper Display —
void
— UIFlyerHelperClearOverride - Lock Status Bar Display —
void
— UIStatusBarOverride - Unlock Status Bar Display —
void
— UIStatusBarClearOverride - Set Achievement Toast Style —
void
— UISetAchievementToastStyle - Set Minimap Background Color —
void
— UISetMiniMapBackGroundColor - Show/Hide Minimap Camera Field of View —
void
— UISetMiniMapCameraFoVVisible - Set Minimap Bounds —
void
— UISetMiniMapBounds - Enable/Disable Command Type —
void
— UISetCommandAllowed - Turn Ability Highlight On/Off —
void
— UISetButtonHighlighted - Turn Button Highlight On/Off —
void
— UISetButtonFaceHighlighted - Set Command Type Disabled Message —
void
— UISetCommandDisallowedMessage - Show/Hide Resource —
void
— UISetResourceVisible - Enable/Disable Selection Type —
void
— UISetSelectionTypeEnabled - Launch Nydus Link —
void
— UILaunchNydusLink - Show/Hide Message Log —
void
— UIMessageLogPanelSetVisible - Set Targeting Order —
void
— UISetTargetingOrder - Enable/Disable Hotkey —
void
— UISetHotkeyAllowed - Target Mode Updated —
void
— TriggerAddEventTargetModeUpdate - Resources Requested —
void
— TriggerAddEventResourceRequest - Resources Traded —
void
— TriggerAddEventResourceTrade - Target Mode Ability Command —
abilcmd
— EventTargetModeAbilCmd - Target Mode State —
int
<preset::TargetModeState> — EventTargetModeState - Resource Requested Amount —
int
— EventResourceRequestAmount - Resource Traded Amount —
int
— EventResourceTradeAmount - Resource Traded Recipient —
int
— EventResourceTradeRecipient
# Examples
campaigns/voidstory.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6666
}
else {
UISetDragSelectEnabled(PlayerGroupAll(), true);
UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
UnitKill(libVCMI_gv_pM_FlyoverUnit);
mods/frontiers.sc2mod — base.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.stormmod — base.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.stormmod — base.stormdata/LibAtDe.galaxy:423
// Implementation
UISetDragSelectEnabled(PlayerGroupAll(), false);
UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, false);
libIGHS_gf_ShufflePickDebugMessage(StringExternal("Param/Value/lib_AtDe_A22E1F27"));
mods/heroesdata.stormmod — base.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.stormmod — base.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.stormmod — base.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.stormmod — base.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.stormmod — base.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.stormmod — base.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.sc2mod — base.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.sc2mod — base.sc2data/LibNCMI.galaxy:5785
}
else {
UISetDragSelectEnabled(PlayerGroupAll(), true);
UISetSelectionTypeEnabled(PlayerGroupAll(), c_localSelectionTypeUnknown, true);
UnitKill(libNCMI_gv_NM_FlyoverUnit);