HaxeUI Tutorial

Widget Layout XML File

John Gabriele

The default assets/main.xml file starts off containing:

You can get a lot done with some simple tags:

  • vbox, hbox (vertical and horizontal containers)
  • button
  • label (just text)
  • checkbox
  • optionbox (for radio buttons)
  • textfield (editable text)
  • image
  • switch (a toggle switch/button)
  • progress (progress bar)
  • slider (slider bar)
  • tabview (tabs)
  • scrollview (adds scroll bar when necessary)

(HaxeUI of course supports more widgets, but this tutorial will be limited to the ones listed above.)

As an example using those, make your assets/main.xml look like the following:

Build and run your app and you should get:

app screenshot
app screenshot

Click the “Click Me Once!” button and you should get the scrollview.

Note that, of course, no logic has yet been connected to these widgets. We cover that in the sections that follow.