Kree Documentation
  • Welcome to Kree Java
  • Changelog
  • Getting Started
    • Installing Kree
    • Installing Kree using CLI
    • Get Help on Discord
  • Core Components
    • Game
    • Window
    • SceneManager
    • Input
    • Debug
    • Sprite
    • GameObject
    • Transform
    • Vector2
    • SpriteSheet
    • Animation
    • Audio
    • Random
  • GameObject components
    • Animator
    • BoxCollider
    • LookAtObject
    • Mesh Renderer
    • ParticleSystem
    • RigidBody
    • SpriteRenderer
    • PlayerMovement
    • Prefs
  • Kree User Interface
    • Text
    • TextInput
    • ProgressBar
    • Button
    • Panel
  • Code Snippets
    • Launcher
    • Creating Scene
    • Follow Mouse On Click
    • Animating GameObject
    • Implementing Particle System
    • Creating Custom Components
    • Playing Audio
  • Game Tutorials
  • Avoid the Enemy!
  • High score
Powered by GitBook
On this page

Was this helpful?

  1. Kree User Interface

Button

This User Interface Component Add more interaction between your game and your user

PreviousProgressBarNextPanel

Last updated 5 years ago

Was this helpful?

Component Author: Release Date: April 15, 2020

new Button(Scene parentScene, String text, Vector2 position, Vector2 scale);
getTransform(); // Returns Transform Object

setColor(Color backgroundColor, Color foregroundColor, Color hoverColor);

setFont(Font font); // Sets the text font

setText(String text); // Sets the text of the button

setBackgroundImage(Sprite spr);

onClick(); // Returns true if the user clicked the button

onHover(); // Returns true if the user is hovering on the button
Jabo