Files
gambling-curses/main.c

65 lines
1.2 KiB
C

/*
* Copyright (C) Artsiom D.
* Copyright (C) shit-co.de
*/
#include <stdlib.h>
#include <unistd.h>
#include <curses.h>
#include "box.h"
#include "ui.h"
int
main(void)
{
struct box *ui, *top, *bottom, *left, *right, *buy, *sell, *scam,
*title, *desc;
struct chart chart;
ui_init();
title = new_button_box("Bitcoin");
desc = new_button_box("A crypto-scam :-)");
top = new_vertical_box();
append_box(top, title);
append_box(top, desc);
chart = new_chart(400);
left = new_chart_box(&chart);
left->fills = 5;
buy = new_button_box("buy");
buy->color = UI_GREEN;
sell = new_button_box("sell");
sell->color = UI_RED;
scam = new_button_box("scam");
sell->color = UI_BLUE;
right = new_vertical_box();
append_box(right, buy);
append_box(right, sell);
append_box(right, scam);
bottom = new_horizontal_box();
bottom->fills = 3;
append_box(bottom, left);
append_box(bottom, right);
ui = new_vertical_box();
append_box(ui, top);
append_box(ui, bottom);
draw_box(ui, 0, 0, ui_width(), ui_height());
ui_refresh();
sleep(300);
ui_end();
}