Coder Social home page Coder Social logo

openui's Introduction

OpenUi

openui_

An easy to use Ui-Kit for Unity.

Open Sampel scene. there is a single ui-manager object that controls which menu type should be loaded as main menu. We have two major kinds of ui elements. Window and Modal. A window is used for each state of your app/game while a modal is shown inside each window. you can not see more than one window at a time but you can see any number of modals in each window. ie1: You want to show a popup to user and ask "Are you sure? Yes/No" in shop, in this scenario, popup is a modal and shop menu is Window. ie2: You want to show coin count both in main menu and shop, you can put coin ui elements inside main menu and shop menu separately, but the best approach is to have a single coin-modal and use it in every place you want. so when coin elements need a change, you only change it once in its own modal.

Add new Window:

  1. Open WindowType.cs
  2. Add/Remove your Window types.
  3. Make your window Ui in unity editor, add "Window" component, set window type.
  4. Make a prefab of your window at "Resources/window/" (you can change this path in UiManagerSetting.cs)

Add new Modal:

  1. Open ModalType.cs
  2. Add/Remove your modal types.
  3. make your modal Ui in unity editor, add "Modal" component, set modal type.
  4. Make a prefab of your modal at "Resources/modal/" (you can change this path in UiManagerSetting.cs)

Change Window:

  1. If you have a button, just Add ChangeWindowButton component on your button.

  2. or call:

    UiManager.instance.ChangeWindow(WindowType windowType);
    

Show/Hide Modal:

  1. If you have a button, just Add ShowModalButton or HideModalButton component on your button.

  2. or call:

    UiManager.instance.ShowModal(ModalType modalType);
    UiManager.instance.HideModal(ModalType modalType);
    

Transisions:

Scale: (x/y/both)

openui_scale

Slide: (up/down/left/right)

openui_slide

Fade: (in/out)

openui_fade

Requirements:

openui's People

Contributors

omid3098 avatar

Watchers

 avatar  avatar

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.