Subversion Repositories Kolibri OS

Rev

Rev 7147 | Rev 7150 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7147 Rev 7148
Line 1... Line 1...
1
struct _colors
1
struct _colors
2
{
2
{
3
	int x,y;
3
	int x,y,w,h;
4
	unsigned rows, columns;
4
	unsigned rows, columns;
5
	unsigned cell_size;
5
	unsigned cell_size;
6
	dword mas[MAX_COLORS*MAX_COLORS];
6
	dword mas[MAX_COLORS*MAX_COLORS];
7
	dword image;
7
	dword image;
8
	void set_default_values();
8
	void set_default_values();
Line 14... Line 14...
14
	void move();
14
	void move();
15
} colors;
15
} colors;
Line 16... Line 16...
16
 
16
 
17
void _colors::set_default_values()
17
void _colors::set_default_values()
18
{
-
 
19
	columns = 2;
18
{
20
	rows = 2;
-
 
Line 21... Line 19...
21
	cell_size = 20;
19
	int i;
-
 
20
 
-
 
21
	columns = MAX_COLORS;
22
 
22
	rows = MAX_COLORS;
-
 
23
	cell_size = 5;
Line 23... Line -...
23
	set_color(0,0, 0x66b2ff); 
-
 
24
	set_color(0,1, 0x000066); 
24
	w = columns * cell_size;
25
 
25
	h = rows * cell_size;
Line 26... Line 26...
26
	set_color(1,0, 0x000066);
26
 
27
	set_color(1,1, 0x66b2ff);
27
	for (i = 0; i < columns*rows; i++) mas[i]=0xBFCAD2;
28
}
28
}
Line 73... Line 73...
73
	for (r = 0; r < rows; r++)
73
	for (r = 0; r < rows; r++)
74
	{
74
	{
75
		for (c = 0; c < columns; c++)
75
		for (c = 0; c < columns; c++)
76
		{
76
		{
77
			draw_cell(c*cell_size + x, r*cell_size + y, get_color(r, c));
77
			draw_cell(c*cell_size + x, r*cell_size + y, get_color(r, c));
78
			DefineHiddenButton(c*cell_size + x, r*cell_size + y, cell_size, cell_size, r*columns+c+300+BT_NOFRAME);
78
			//DefineHiddenButton(c*cell_size + x, r*cell_size + y, cell_size, cell_size, r*columns+c+300+BT_NOFRAME);
79
		}
79
		}
80
	}
80
	}
81
}
81
}
Line 82... Line 82...
82
 
82