Subversion Repositories Kolibri OS

Rev

Rev 6342 | Rev 6359 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
255 heavyiron 1
;-----------------------------------------------------------
2
;---load icons  in memory and draw icons on panel-----------
3
;-----------------------------------------------------------
4
load_icons:
6328 IgorA 5
	stdcall [img_decode], panel_picture, panel_picture.end-panel_picture, 0
6
	mov ebx,eax
7
	mov edi,[ScreenPointer]
6342 IgorA 8
	add edi,mem_screen
6328 IgorA 9
	stdcall [img_to_rgb2], ebx,edi ;преобразуем изображение к формату rgb
10
	stdcall [img_destroy], ebx ;удаляем временный буфер с параметрами изображения
11
	ret
255 heavyiron 12
 
13
draw_icons:
14
 
15
	 mov [Icon_X],7
16
	 mov [Icon_Y],20+15+4
17
 
18
	 ;draw panel picture
19
	 mov edx,[Icon_X]
20
	 shl edx,16
21
	 add edx,[Icon_Y]
22
	 mov ebx,[ScreenPointer]
6342 IgorA 23
	 add ebx,mem_screen
255 heavyiron 24
	 mov ecx,417*65536+46
6342 IgorA 25
	 mcall SF_PUT_IMAGE
255 heavyiron 26
 
27
 
28
	 ;main buttons of instrumnts
29
 
30
	 and [counter],0
2038 leency 31
	 mov [Icon_X],9
32
	 mov [Icon_Y],21+15+4+1
255 heavyiron 33
 
34
   main_buttons:
35
 
36
	 mov ebx,[Icon_X]
37
	 mov ecx,[Icon_Y]
38
	 dec ebx
39
	 dec ecx
40
	 shl ebx,16
41
	 shl ecx,16
2038 leency 42
	 add ebx,18
43
	 add ecx,19
255 heavyiron 44
	 mov edx,[counter]
45
	 add edx,10
46
	 add edx,1000000000000000000000000000000b
6357 IgorA 47
	 mcall SF_DEFINE_BUTTON
255 heavyiron 48
 
49
 
50
	 add [Icon_X],22
51
 
52
	 inc [counter]
53
	 cmp [counter],19
54
	 jne main_buttons
55
 
56
 
57
	 ;buttons of brushes(and lines width)
58
	 and [counter],0
59
 
2038 leency 60
	 mov [Icon_X],8+1
255 heavyiron 61
	 mov [Icon_Y],20+15+4+25+1
62
 
63
	 next_button_brush:
64
 
65
	 mov ebx,[Icon_X]
66
	 mov ecx,[Icon_Y]
67
	 dec ebx
68
	 dec ecx
69
	 shl ebx,16
70
	 shl ecx,16
2038 leency 71
	 add ebx,18
72
	 add ecx,19
255 heavyiron 73
	 mov edx,[counter]
74
	 add edx,40
75
	 add edx,1000000000000000000000000000000b
6357 IgorA 76
	 mcall SF_DEFINE_BUTTON
255 heavyiron 77
 
78
	 add [Icon_X],19
79
 
80
	 inc [counter]
81
	 cmp [counter],5
82
	 jne next_button_brush
83
 
84
 
85
	 ;buttons of zoom
86
	 and [counter],0
87
 
2038 leency 88
	 mov [Icon_X],8+155+1
255 heavyiron 89
	 mov [Icon_Y],20+15+4+25+1
90
 
91
	 next_button_zoom:
92
 
93
	 mov ebx,[Icon_X]
94
	 mov ecx,[Icon_Y]
95
	 dec ebx
96
	 dec ecx
97
	 shl ebx,16
98
	 shl ecx,16
2038 leency 99
	 add ebx,18
100
	 add ecx,19
255 heavyiron 101
	 mov edx,[counter]
102
	 add edx,45
103
	 add edx,1000000000000000000000000000000b
6357 IgorA 104
	 mcall SF_DEFINE_BUTTON
255 heavyiron 105
 
106
	 add [Icon_X],19
107
 
108
	 inc [counter]
109
	 cmp [counter],6
110
	 jne next_button_zoom
111
 
112
 
113
	 ; button of palette
114
	 mov [Icon_X],7+105+1
2038 leency 115
	 mov [Icon_Y],19+15+4+25+1
255 heavyiron 116
 
117
	 mov ebx,[Icon_X]
118
	 mov ecx,[Icon_Y]
119
	 dec ebx
120
	 dec ecx
121
	 shl ebx,16
122
	 shl ecx,16
123
	 add ebx,20
124
	 add ecx,21
125
	 mov edx,51
126
	 add edx,1000000000000000000000000000000b
6357 IgorA 127
	 mcall SF_DEFINE_BUTTON
255 heavyiron 128
 
129
	 ; button of color
130
	 mov [Icon_X],7+128+1
2038 leency 131
	 mov [Icon_Y],19+15+4+25+1
255 heavyiron 132
 
133
	 mov ebx,[Icon_X]
134
	 mov ecx,[Icon_Y]
135
	 dec ebx
136
	 dec ecx
137
	 shl ebx,16
138
	 shl ecx,16
139
	 add ebx,20
2038 leency 140
	 add ecx,20
255 heavyiron 141
	 mov edx,52
142
	 add edx,1000000000000000000000000000000b
6357 IgorA 143
	 mcall SF_DEFINE_BUTTON
255 heavyiron 144
 
6357 IgorA 145
	 mcall SF_DRAW_RECT, 136*65536+19,64*65536+19,[Color]
255 heavyiron 146
 
147
	 ret