Coder Social home page Coder Social logo

unixengine's Introduction

UnixEngine

A very basic View Engine for Unix.

Running

To run UnixEngine simply copy the code below and add your code in the functions.

#include "../engine/engine.h"
using namespace std;

// Function called when command is written in the console
void command_written(string command);

// Function called before the next frame is rendered
void render_frame(Canvas *canvas);

int main()
{
    UnixEngine *engine = new UnixEngine();
    engine->set_canvas(120, 40);
    engine->start(render_frame, command_written);
    delete engine;
    return 0;
}

Draw

To launch Draw you need to compile the app and the engine and then launch it.

 > make draw
 > ./draw

In Draw you can paint views on a canvas by setting its various properties to create the exact view you want.

x

 >  View(x:10)

y

 >  View(y:10)

Width

 >  View(width:10)

Height

 >  View(height:10)

Background color

 >  View(background_color:10)

Style

 >  View(style:10)

Border width

 >  View(border_width:10)

Border Style

 >  View(border_style:10)

Border color

 >  View(border_color:10)

To create a view you can combine any these properties in any order you want.

 >  View(width: 20, height: 10, style: #)

Screenshot 1

 >  View(x: 10, y: 5, width: 5, height: 5, background_color: magenta, style: *)

Screenshot 2

 >  View(x: 10, y: 5, width: 20, height: 10, border_width: 2, border_color: red, border_style: *)

Screenshot 3

 >  View(x: 20, y: 5, width: 25, height: 7, background_color: magenta, style: *, border_width: 1, border_color: red, border_style: #)

Screenshot 4

You can also draw views on top of each other.

 >  View(x: 10, y: 5, width: 20, height: 10, border_width: 2, border_color: blue, border_style: *)
 >  View(x: 20, y: 5, width: 25, height: 7, background_color: magenta, style: *, border_width: 1, border_color: red, border_style: #)

Screenshot 5

unixengine's People

Contributors

alextrowbridge 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.