Code Monkey home page Code Monkey logo

microui-odin's Introduction

Now part of official Odin vendor collection! https://github.com/odin-lang/Odin/tree/master/vendor/microui

As a result of being included in the official vendor collection, this repo will no longer be maintained. Any issues or PRs is expected on the official vendor library from now on.

Old README follows below.


microui-odin

Description

A tiny, portable, immediate-mode UI library written in Odin. (Ported from rxi/microui.)

screenshot

Browser Demo (rxi's microui)

Features

  • Tiny: around 1200 sloc of Odin
  • Works within a fixed-sized memory region: no additional memory is allocated
  • Built-in controls: window, panel, button, slider, textbox, label, checkbox, wordwrapped text
  • Easy to add custom controls
  • Simple layout system

Usage

See the demo-sdl2 directory for a usage example (using SDL2).

cd demo-sdl2
odin run .

Notes

  • This library assumes you are using the latest nightly build or GitHub master of the Odin compiler. Since Odin is still under development this means this library might break in the future. Please create an issue or PR if that happens. Last verified against: odin version dev-2021-07:481fc8a5
  • The library expects the user to provide input and handle the resultant drawing commands, it does not do any drawing itself.

License

This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.

microui-odin's People

Contributors

hdooley avatar oskarnp avatar

Stargazers

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

Watchers

 avatar

Forkers

jockus hdooley

microui-odin's Issues

"Static is not supported for global variables nor required"

@static unclipped_rect := Rect{0, 0, 0x1000000, 0x1000000};

@static default_style := Style{

These two lines produce the following errors:

D:/odin_game/lib/microui-odin/microui.odin(233:9) @(static) is not supported for global variables, nor required
D:/odin_game/lib/microui-odin/microui.odin(235:9) @(static) is not supported for global variables, nor required

I'm still sort of completely novice to odin, so I don't feel that confident suggesting a fix, but I assume removing the static flag is not enough

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.