Git Product home page Git Product logo

simplepopup's Introduction

SimplePopup

SimplePopup is a tool to show popups(dialogs) in Unity. It can be useful while creating prototypes.

Requirements

  • Unity 5

Installation

Dowload and import SimplePopup_v1.1.unitypackage to your project.

Usage

  1. Drag and Drop SimplePopupManager.prefab from Assets/SimplePopup/SimplePopupManager to your scene.
  2. At top of your file,
      using SimplePopup;
  1. You can show your popup easily like that:
      SimplePopupManager.Instance.CreatePopup("Are you sure you want to quit?");
      SimplePopupManager.Instance.AddButton("Yes", delegate { Debug.Log("clicked on yes"); });
      SimplePopupManager.Instance.AddButton("No", delegate { Debug.Log("clicked on no"); });
      SimplePopupManager.Instance.ShowPopup();

  1. You can customize your popup also:
        SimplePopupManager.Instance.CreatePopup("Are you sure you want to quit?", Color.white, new Color(26 / 255.0f,30/255.0f,48/255.0f));
        SimplePopupManager.Instance.AddButton("Yes", Color.white,new Color(64/255.0f,208/255.0f,116/255.0f), delegate {
            Debug.Log("on click to yes");
        });
        SimplePopupManager.Instance.AddButton("No", Color.white, new Color(208/255.0f,64/255.0f, 64 / 255.0f), delegate {
            Debug.Log("on click to no"); 
        });
        SimplePopupManager.Instance.AddButton("Maybe", Color.white, new Color(208/255.0f,189/255.0f, 64 / 255.0f), delegate {
            Debug.Log("on click to maybe");
        });
        SimplePopupManager.Instance.ShowPopup();

License

MIT

Contact

Gri Games Facebook Page

simplepopup's People

Contributors

mttirnavali avatar

Stargazers

 avatar Derrick avatar ShockRabbit avatar Erk Ekin avatar Dennis Keirsgieter avatar  avatar Eunpyoung Kim avatar Peter Chen avatar  avatar Uğur KUBAT avatar Batuhan Taşdöven avatar

Watchers

 avatar Uğur KUBAT 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.