MouseArea:on_mouse_right_clicked

Called when the right mouse button is pressed and then released in a small area within this component.

Usage

mouse_area.on_mouse_right_clicked = function(self, player_index)
  -- your code here
end

Arguments

Name Type Description
player_index number Number identifying a player.

Examples

local ecs = crystal.ECS:new();
local input_system = ecs:add_system(crystal.InputSystem);
local draw_system = ecs:add_system(crystal.DrawSystem);

local entity = ecs:spawn(crystal.Entity);
local mouse_area = entity:add_component(crystal.MouseArea, love.physics.newCircleShape(10));

mouse_area.on_mouse_right_clicked = function(self, player_index)
  print("Right clicked");
end

This site uses Just the Docs, a documentation theme for Jekyll.