# Click proc (client)

Source: https://ref.dm-lang.org/client/proc/Click

### Format
> `Click(object,location,control,params)`

### When
> Called when the player clicks on the map or in the stat panels.

### Args
- `object`: the object clicked
- `location`: the client stat panel, location (turf) of object on map, grid cell, or other control-specific info
- `control`: the name of the skin control involved
- `params`: other parameters including mouse/keyboard flags, icon offsets, etc.; see [mouse handling](https://ref.dm-lang.org/DM/mouse/index.md)


### Default action
> Call object.Click(location,control,params).

```dm /Click/
client
  Click(O)
    usr << "You clicked [O]"
    ..() // do default action
```

Note that due to network lag, it is possible when clicking on moving objects for the location of those objects to have changed by the time the Click() proc is executed. That is the reason for the location argument. It tells you where the click originally took place.

The argument format for this verb is:

```dm /Click/
Click(object as null|atom in usr.client,\
      location as null|turf|text in usr.client,\
      control as text, params as text)
```

### See also
- [Click proc (atom)](https://ref.dm-lang.org/atom/proc/Click.md)
- [DblClick proc (client)](https://ref.dm-lang.org/client/proc/DblClick.md)
- [MouseDown proc (client)](https://ref.dm-lang.org/client/proc/MouseDown.md)
- [MouseDrag proc (client)](https://ref.dm-lang.org/client/proc/MouseDrag.md)
- [MouseDrop proc (client)](https://ref.dm-lang.org/client/proc/MouseDrop.md)
- [MouseEntered proc (client)](https://ref.dm-lang.org/client/proc/MouseEntered.md)
- [MouseExited proc (client)](https://ref.dm-lang.org/client/proc/MouseExited.md)
- [MouseMove proc (client)](https://ref.dm-lang.org/client/proc/MouseMove.md)
- [MouseUp proc (client)](https://ref.dm-lang.org/client/proc/MouseUp.md)
- [MouseWheel proc (client)](https://ref.dm-lang.org/client/proc/MouseWheel.md)
- [mouse_opacity var (atom)](https://ref.dm-lang.org/atom/var/mouse_opacity.md)
- [mouse_over_pointer var (atom)](https://ref.dm-lang.org/atom/var/mouse_over_pointer.md)
- [show_popup_menus var (client)](https://ref.dm-lang.org/client/var/show_popup_menus.md)
