Giter VIP home page Giter VIP logo

microui-go's Introduction

microui

A tiny, portable, immediate-mode UI library ported to Go (as of commit 05d7b46c9cf650dd0c5fbc83a9bebf87c80d02a5)

API changes

  • Functions and structs are renamed to be PascalCase and the prefix mu_ is removed, like this:

    mu_push_command -> PushCommand

    mu_begin_treenode_ex -> BeginTreeNodeEx

    mu_get_clip_rect -> GetClipRect

  • Every function that takes mu_Context (Context) instead has a Context reciever, so Button(ctx, label) becomes ctx.Button(label)

  • Stacks are now slices with variable length, append is used for push and slice = slice[:len(slice)-1] is used for pop

  • mu_Font (Font) is interface{}, since it doesn't store any font data. You can use reflect if you want to store values inside it

  • The library is split into separate files instead of one file

  • The library is ~1300 lines of code in total

Additional functions:

  • NewContext, which is a helper for creating a new Context
  • ctx.Render, which calls a function for every command inside the command list, then clears it

Notes

The library expects the user to provide input and handle the resultant drawing commands, it does not do any drawing itself.

microui-go's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

microui-go's Issues

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.