Coder Social home page Coder Social logo

linkinterfacemenuframework's Introduction

LinkInterfaceMenuFramework

A framework for a composition-oriented generic component-based Menu system

Overview

While working on a prototype for Unity and finding myself in the need of making menus for it, I remembered how I have written menu code in the past. Like most novice programmers, I would write a script that would have a bunch of references to the physical buttons on the scene, have a stack for navigating down the menu, have the navigation code by checking for directional input and confirmation on update and so on.

Given that, this time I wanted to do it better. Not just as a matter of personal pride but because I wanted to be able to reuse a large majority of code and components over my menus, with the little remainder used to write subclasses that implement specific behavior for those special cases. There were a few other goals I wanted to fulfill:

  • To eliminate needing to write or handle navigation manually when using the framework. I wanted this to be automated. I wanted to remove the dependency between the menus and how they are navigated.
  • To consolidate the different ways menus buttons are used among different components. For example sometimes a menu button may open another window, or execute a function. Or lead on to modifying a property. Etc.
  • Implement the framework through the Observer pattern using event-driven programming, which would allow me to easily extend functionality. (I pass in events around rather than doing direct function calls)

As of now I strongly believe I have fulfilled that promise with the way the framework is as of now. While the prototype of it has been currently implemented in Unity through C#, it could be implemented and used in any ECS engine with a robust, customizable editor. I will be going over the design and classes, leaving language-specific implementation details as an exercise to the reader.

Dependencies

  • Stratus Framework: It uses the event system heavily in order to follow the observer pattern. The framework has the following dependencies:
  • Ludiq Reflection: It uses a couple of its inspector drawers (UnityVariable, UnityMethod) for some link behavior.

Documentation | Web

Changelog

  • (7/28/2016) Repository uploaded! Cleaned up the tentatively-named framework so it is truly modular. Given further thinking, decided to remove
  • (7/29/2016) Interface improved! Added the LinkController class which LinkStyle's will override those of its child links. Windows now reposition to the center of the canvas by default, allowing easier design of the menus.

linkinterfacemenuframework's People

Contributors

azurelol avatar

Watchers

 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.