Kha Image, 9-Slice Image, Button, 9-slice Button

This demo shows a combination of multiple cameras and the 4 types of images - A WynSprite, a 9-slice WynSprite, a WynButton, and a 9-slice WynButton.

The point of having multiple cameras is to demonstrate the button events which can be triggered from any number of cameras (mouse up, mouse down, mouse enter, mouse exit), and at any position and zoom.

Note: Mouse up/down/enter/exit events are logged in the console for button or 9-slice button.

Note: Red box is hitbox bounds, green box (behind the images) is the image bounds.

Controls

1 - (mode 0) Select image (top-left)

2 - (mode 1) Select 9-slice image (bottom-left)

3 - (mode 2) Select button (top-right)

4 - (mode 3) Select 9-slice button (bottom-right)

W,S,A,D - Move selected item

I,K,J,L - Resize selected item's image

Arrow keys 0 resize selected item's hitbox