TODOS:
- Image scaling mode: fit, cover, manual
- Image positioning
- Image padding
- Multiple images
- Multiple borderImages
- Horizontal scroll and scrollbar
- Optional scrollbar
- Optional content scroll
| var client = new WebSocket("ws://IP:1337"); | |
| var last = Date.now(); | |
| client.addEventListener("message", function(event) { | |
| var delta = Date.now() - last; | |
| console.log("Time since last message ", delta, "ms"); |
| /* Paste that into console (F12) and hit enter */ | |
| window.clicker = setInterval(function() { | |
| $("button[value=INCREASE]").click() | |
| }, 5000); |
| /* Paste that into console (F12) and hit enter */ | |
| setInterval(function() { | |
| $("button[value=INCREASE]").click() | |
| }, 5000); |
| /* | |
| What I would like to have is a way to build an element out of components. | |
| Components can duplicate and order can be easily set. | |
| */ | |
| ".content button": [ | |
| ["image", "button.png", 0, 0], | |
| ["sprite", "flames", "center", "center"], |
TODOS:
| /* Properties are nothing more but a complex event handlers */ | |
| GUI.properties.myProperty = { | |
| /* Order of appliance when set in group */ | |
| order: 3, | |
| /* Rendering order to determine wheter it should be drawn before or after other properties */ |
| class GUIList extends GUIWidget { | |
| constructor(args) { | |
| super(args); | |
| this.scrollable = true; | |
| this.layout = { |
| var offsets = [ | |
| [0.0, 1.0], | |
| [0.0, 0.5], | |
| [0.0, 0.0], | |
| [0.5, 0.0], | |
| [0.5, 0.5], | |
| [0.5, 1.0] | |
| [1.0, 0.0], | |
| [1.0, 0.5], | |
| [1.0, 1.0] |
| var app = playground({ | |
| create: function() { | |
| app.loadData(...); | |
| }, | |
| ready: function() { |