GuiMouseScrollUp

Constructor:

GuiMouseScrollUp(mousePosition.x, mousePosition.y)

Description

This event is triggered when the middle mouse button is released from the GUI object.

Parameters

Name Type Description
mousePosition.x float X-coordinate of the mouse
mousePosition.y float Y-coordinate of the mouse

Examples

Add the following client script under ClientfirstLogic. Start the game, and middle-click the UiPanel and the UiButton. Observe whether the event is triggered or not.

wait(1)
local uipanel = RWObject.Create("UiPanel") -- create a UiPanel
local uibtn = RWObject.Create("UiButton") -- create a UiButton
uibtn.Parent = uipanel -- set the parent of the created UiButton to the new created UiPanel
local person = Players:GetLocalPlayer() -- retrieve the player
uipanel.Parent = person. GameUI -- Set the parent of the UiPanel as GameUI
uibtn.GuiMouseScrollUp:Connect(function(x,y) -- click the UiButton to trigger the event of mouse middle-clicking and releasing
    print("The event of mouse middle-clicking and releasing is triggered on the button".." x-coordinate:" ..x.." y-coordinate:" ..y)
end)
uipanel.GuiMouseScrollUp:Connect(function(x,y) -- click the UiPanel to trigger the event of mouse middle-clicking and releasing
    print("The event of mouse middle-clicking and releasing is triggered on the interface".." x-coordinate:" ..x.." y-coordinate:" ..y)
end)