Git Product home page Git Product logo

korgeexperiments's Introduction

Korge UI Experiments

A playground to work on additional UI components which would be especially useful in desktop and simulation or strategy games.

Window

A draggable container with a fixed width, a title bar, and can contain any other Container view. Styling is very flat just now. Should really use a Korge skin, or at least a 9-patch texture. Width could be more configurable - specify a minimum and maximum width, and resize to fit the content? Add a callback when the window is closed. What about other window behaviours, such as minimise?

val windowContents = text("This is the text which appears in a window")
val myWindow = window(200.0,200.0,Colors.WHITE,"Window Title",contents =  windowContents).xy(10,10)

Modal Window

An extension of Window, which cannot be dragged should block all other UI components. Currently implemented as a flag to the Window class. Ideally, this could trigger a dimming of the rest of the scene. How to disable input to all other elements in the scene?

val words = text("Do you wish to quit? Yes/No")
val dialog = window(200.0,200.0,Colors.WHITE,"Really Quit?", contents=words, modal = true).xy(10,10)

Tooltips

My number one requirement for Korge, as I don't think I can implement it myself. My challenge is that I can't get the tooltip to appear on top of all other elements, as it's inlined with its parent and later drawn objects can appear on top. Korge may need some sort of layering or Z-indexing support.

val somewords = text("Hover over me for more information") {
    tooltip("By clicking OK below, you are agreeing to all terms and conditions, even the ones we haven't written yet.")
}

korgeexperiments's People

Contributors

v79 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.