# Mouse Moved UI Pos X

Grammar — Mouse X position in the UI
FlagsNative | Function

Returns the mouse position in the X axis. Use in response to a “Mouse Moved” event.

Returns — int

native int EventMouseMovedPosXUI();

# Supported triggers

Category: UI / Input

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:6584

    }

    lv_newMouseXPos = EventMouseMovedPosXUI();
    lv_rotationAmount = (libVCUI_gf_PU_ArmyRotateNormalize(((lv_newMouseXPos - libVCUI_gv_pU_ArmyUnitRotateOldMouseXPos) * lv_rotationSensitivity), -180.0, 180.0) * -1.0);
    libVCUI_gv_pU_ArmyUnitRotateOldMouseXPos = lv_newMouseXPos;