/programs/cmm/lib/gui.h |
---|
350,13 → 350,13 |
//this function increase falue and return it |
//useful for list of controls which goes one after one |
struct incn |
:struct incn |
{ |
dword n; |
dword inc(dword _addition); |
}; |
dword incn::inc(dword _addition) |
:dword incn::inc(dword _addition) |
{ |
n+=_addition; |
return n; |
411,7 → 411,7 |
== |
/========================================================*/ |
struct more_less_box |
:struct more_less_box |
{ |
signed x,y; |
unsigned value, min, max; |
421,7 → 421,7 |
void draw(); |
}; |
bool more_less_box::click(unsigned id) |
:bool more_less_box::click(unsigned id) |
{ |
if (id==bt_id_less) { value = math.max(value-1, min); draw(); return 1; } |
if (id==bt_id_more) { value = math.min(value+1, max); draw(); return 1; } |
428,7 → 428,7 |
return 0; |
} |
void more_less_box::draw() |
:void more_less_box::draw() |
{ |
#define VALUE_FIELD_W 34 |
#define SIZE 18 |
/programs/cmm/lib/kfont.h |
---|
71,7 → 71,7 |
if(font)free(font); |
label_io.read(font_path); |
if(!EAX) { |
debugln(font_path); |
//debugln(font_path); |
label_io.run("/sys/@notify", "'Error: KFONT is not loaded.' -E"); |
return false; |
} |
/programs/cmm/lib/kolibri.h |
---|
442,7 → 442,7 |
#define DRAW_DESKTOP_BG_TILE 1 |
#define DRAW_DESKTOP_BG_STRETCH 2 |
void SetBackgroundImage(dword w,h, image, mode) |
:void SetBackgroundImage(dword w,h, image, mode) |
{ |
$mov eax,15 // SF_BACKGROUND_SET 15 - work with desktop background graphics |
$mov ebx,4 // SSF_MODE_BG 4 - set drawing mode for the background |
536,7 → 536,7 |
$int 0x40 |
} |
void DefineDragableWindow(dword _x, _y, _w, _h) |
:void DefineDragableWindow(dword _x, _y, _w, _h) |
{ |
DefineAndDrawWindow(_x, _y, _w, _h, 0x41,0x000000,NULL,0b); |
} |
/programs/cmm/lib/list_box.h |
---|
33,15 → 33,16 |
int KeyLeft(); |
int KeyRight(); |
void CheckDoesValuesOkey(); |
void debug(); |
//void debug(); |
}; |
/* |
void llist::debug() |
{ |
char yi[128]; |
sprintf(#yi, "%s %d %s %d %s %d %s %d %s %d %s %d", "first:", first, "visible:", visible, "count:", count, "col_max:", column_max, "cur_y:", cur_y, "cur_x:", cur_x); |
debugln(#yi); |
} |
}*/ |
void llist::ClearList() |
/programs/cmm/lib/mem.h |
---|
5,7 → 5,7 |
#include "../lib/kolibri.h" |
#endif |
dword mem_init() |
:dword mem_init() |
{ |
$push ebx |
$mov eax, 68 |
16,7 → 16,7 |
return EAX; |
} |
dword malloc(dword size) |
:dword malloc(dword size) |
{ |
$push ebx |
$push ecx |
31,7 → 31,7 |
return EAX; |
} |
stdcall dword realloc(dword mptr, size) |
:stdcall dword realloc(dword mptr, size) |
{ |
$push ebx |
$push ecx |
49,7 → 49,7 |
return EAX; |
} |
dword free(dword mptr) |
:dword free(dword mptr) |
{ |
$push eax |
$push ebx |