#ifndef TAB_PADDING #define TAB_PADDING 15 #endif #define TAB_HEIGHT 28 #define NAME_SIZE 64 :struct _tabs { int x,y,w; int base_id; int active_tab; int count; dword events[10]; dword names[10]; int click(); void draw(); void draw_active_tab(); void add(); dword draw_button(); }; :void _tabs::draw() { int i, xx=x; if (w) { DrawBar(x+1,y+0+TAB_HEIGHT,w,1, sc.work_graph); DrawBar(x+1,y+1+TAB_HEIGHT,w,1, sc.work_light); } for (i=0; i base_id + count) || (_id == active_tab) { return false; } active_tab = _id - base_id; events[active_tab](); return true; }