Skip to content

usagirei/JankyUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JankyUI

Unity Immediate Mode GUI Wrapper


JankyUI is a Unity Immediate Mode GUI Wrapper for quickly writing User Interfaces from code.

Why?

  • Unity's new UI System is great, but creating Test UIs from Code with it is not.
  • Unity's Immediate Mode GUI is great for Code-Side UI, but writing the code to use it is not.

JankyUI Provides a Way of Writing Immediate Mode GUI without touching any of the GUI/GUILayout Functions.

Without worrying about UI Callbacks/Code,

Create This:

window

From This:

<?xml version="1.0" encoding="utf-8" ?>
<JankyUI xmlns='janky://Schema/v1'>
  <Window width='400' height='300' title='Window Title' on-mouse-over='@MouseState'>
    <Group type='vertical'>
      <Group type='horizontal'>
        <Group type='vertical' stretch='none'>
          <Label text='A Label' />
          <Label text='Another Label' />
        </Group>
        <Group type='vertical' stretch='horizontal'>
          <Textbox text='@BoundTextbox' stretch='horizontal' />
          <Textbox text='@AnotherBoundTextbox' stretch='horizontal' />
        </Group>
      </Group>
      <Label text='A Big Text Area:' stretch='horizontal' />
      <Textbox type='multiline' stretch='both' text='@BigBoundText' />
      <Group type='horizontal' stretch='horizontal' >
        <Space />
        <Button name='Button1' text='A Button' on-click='@Click' />
        <Button name='Button2' text='Another Button' on-click='@Click' />
      </Group>
    </Group>
  </Window>
</JankyUI>

Check the Wiki for Documentation and samples