package net.abesto.kotlin.js.pixi.examples.example_06 import kotlin.browser.* import org.w3c.dom.* import net.abesto.kotlin.js.pixi.* import net.abesto.kotlin.js.extensions.* import net.abesto.kotlin.js.pixi.display.Sprite import net.abesto.kotlin.js.pixi.display.Stage import net.abesto.kotlin.js.pixi.utils.autoDetectRenderer import net.abesto.kotlin.js.pixi.textures.Texture class Button : Sprite(noImpl) { public var isdown: Boolean = false public var isOver: Boolean = false } fun main(args: Array) { // create an new instance of a pixi stage // the second parameter is interactivity... var interactive = true var stage = Stage(0x000000, interactive) // create a renderer instance. var renderer = autoDetectRenderer(620, 400) // add the renderer view element to the DOM document.body!!.appendChild(renderer.view) // create a background.. var background = Sprite.fromImage("button_test_BG.jpg") // add background to stage.. stage.addChild(background) // create some textures from an image path var textureButton = Texture.fromImage("button.png") var textureButtonDown = Texture.fromImage("buttonDown.png") var textureButtonOver = Texture.fromImage("buttonOver.png") var buttons: Array