Giter Club home page Giter Club logo

haxepunk-ui's Introduction

HaxePunk-UI is a port of the FlashPunk punk.ui project. Because it runs on HaxePunk, it's cross-platform and uses accelerated rendering.

This is a work in progress with known issues. The original version of Haxepunk-UI is available in the legacy branch.

haxepunk-ui's People

Contributors

bendmorris avatar wselken avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

haxepunk-ui's Issues

Error building demo

Pulled latest from git and I'm getting the error: "Type not found : com.haxepunk.ui.String" no line number or filed referenced. just an error building.

Getting to work

In order to get this to compile, I needed to move the assignment of defaultSkin into new(), rather than at the static variable declaration. Hopefully, this is obvious as to what to do, but if not, I'll get a diff or make a fork or something.

Error building demo

Using HaxePunk dev latest commit
Tried with nme 5.7.1 and openfl / lime 5.1.0 / 5.0.0 same result

/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/skins/Default.hx:9: characters 7-26 : Type not found : haxepunk.RenderMode
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/UI.hx:11: lines 11-64 : Defined in this class
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/Panel.hx:162: characters 3-29 : Not enough arguments, expected elapsed:Float
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/Panel.hx:218: characters 7-26 : haxepunk.ui.UIComponent has no field _camera
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/Panel.hx:220: characters 4-23 : haxepunk.ui.UIComponent has no field _camera
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/Panel.hx:220: characters 28-47 : haxepunk.ui.UIComponent has no field _camera
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/Panel.hx:222: characters 8-27 : haxepunk.ui.UIComponent has no field _camera
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/Panel.hx:234: characters 61-71 : Class<haxepunk.HXP> has no field buffer
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/UI.hx:47: characters 8-20 : Class<haxepunk.input.Input> has no field mouseX
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/UI.hx:48: characters 8-20 : Class<haxepunk.input.Input> has no field mouseY
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/TextArea.hx:10: characters 7-27 : Type not found : haxepunk.utils.Input
./Main.hx:7: lines 7-20 : Defined in this class
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/skins/NESSkin.hx:7: characters 7-26 : Type not found : haxepunk.RenderMode
./Main.hx:7: lines 7-20 : Defined in this class
/usr/local/lib/haxe/lib/HaxePunk-UI/git/haxepunk/ui/TextArea.hx:19: lines 19-136 : haxepunk.ui.TextArea is not ready to be accessed, separate your type declarations in several files

Text not appearing

I can get the almost all of the UI elements to appear, but the Label text isn't appearing. It's even intrinsic to the Label object itself, as no text appears even when I simply create a label. Here is my code:

package worlds;

import com.haxepunk.World;
import com.haxepunk.ui.Button;
import com.haxepunk.ui.Label;
import com.haxepunk.ui.TextArea;
import com.haxepunk.ui.TextField;
import com.haxepunk.ui.ToggleButton;

class UITest extends World 
{
    public function new()
    {
        super();

        add(new Button(10, 10, "Press me", 100, 25));
        add(new ToggleButton(10, 40, "Toggle me", 100, 25, false));
        add(new Label("Read me", 125, 10, 200, 200));
        add(new TextField(125, 40, 200, "Write something"));
        add(new TextArea(330, 10, 300, 228, "You could write a book here!"));
    }
}

Note: I added the UI module to my local HaxePunk in com.haxepunk.ui.

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.