#include "treeview.h" #include "japi/draw.h" #include "japi/font.h" #include "japi/input.h" namespace treeview { int width = 200; int scroll = 0; int current[3] = {-1, -1}; int selected[3] = {-1, -1}; int line = 0; int element = 0; int max_elements = 0; void start() { draw::setClip(0,48,treeview::width, draw::getWindowSize().y-48); draw::setColor(0xff181818); draw::fillrect(0,48,treeview::width, draw::getWindowSize().y-48); current[0] = current[1] = current[2] = line = element = 0; max_elements = (draw::getWindowSize().y-48) / 24; int mx = input::mouseX(); int my = input::mouseY(); if (mx>=0 && my>=48 && mx=scroll && line=0 && my>=opt_y && mxmax_elements && line