Subversion Repositories Kolibri OS

Rev

Rev 9439 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9439 Rev 9527
Line 153... Line 153...
153
	
153
	
Line 154... Line 154...
154
	mcall	48,3,sc,sizeof.system_colors	; load system colors
154
	mcall	48,3,sc,sizeof.system_colors	; load system colors
Line -... Line 155...
-
 
155
 
-
 
156
	; DEBUGF  DBG_INFO, "sc.work = %x\n", [sc.work]
-
 
157
 
-
 
158
	mov esi, [sc.work]
-
 
159
	add esi, 0x1a1a1a
-
 
160
	mov ebx, esi
-
 
161
	and ebx, 0xFF000000
-
 
162
	test ebx, ebx
-
 
163
	jz @f
-
 
164
	mov esi, 0x00FFFFFF
-
 
165
@@:
-
 
166
	mov [active_color], esi
-
 
167
 
-
 
168
	mov  esi, [sc.work]
-
 
169
	cmp  esi, 0xdfdfdf
-
 
170
	jb   @f
-
 
171
	sub  esi, 0x1b1b1b
155
 
172
@@:
156
	; DEBUGF  DBG_INFO, "sc.work = %x\n", [sc.work]
173
	mov [work_color], esi
157
 
174
 
158
	mov eax, 68
175
	mov eax, 68
159
	mov ebx, 22
176
	mov ebx, 22
Line 164... Line 181...
164
	jnz @f
181
	jnz @f
165
	mov [no_shared_resources], 1
182
	mov [no_shared_resources], 1
166
	DEBUGF DBG_ERR, "Failed to get ICONS18W from @RESHARE.\nTry rerun @RESHARE.\n"
183
	DEBUGF DBG_ERR, "Failed to get ICONS18W from @RESHARE.\nTry rerun @RESHARE.\n"
167
	jmp .no_res
184
	jmp .no_res
168
@@:
185
@@:
169
	mov [shared_icons_ptr], eax
-
 
170
	mov [shared_icons_size], edx
186
	mov [shared_icons_size], edx
171
	; copy shared icons to active icons
187
	; copy shared icons
172
	mov esi, eax
188
	mov esi, eax
173
	mov ecx, edx
189
	mov ecx, edx
174
	mcall 68, 12, edx
190
	mcall 68, 12, edx
175
	mov edi, eax
191
	mov edi, eax
-
 
192
	mov [shared_icons_ptr], eax
-
 
193
	shr ecx, 2 ; /= 4; ecx = how many dwords in shared icons
-
 
194
	cld
-
 
195
	rep movsd
-
 
196
 
-
 
197
	; copy shared icons to active icons
-
 
198
	mov esi, [shared_icons_ptr]
-
 
199
	mov ecx, edx
-
 
200
	mcall 68, 12, edx
-
 
201
	mov edi, eax
176
	mov [shared_icons_active_ptr], eax
202
	mov [shared_icons_active_ptr], eax
177
	shr ecx, 2 ; /= 4; ecx = how many dwords in shared icons
203
	shr ecx, 2 ; /= 4; ecx = how many dwords in shared icons
178
	cld
204
	cld
179
	rep movsd
205
	rep movsd
-
 
206
 
180
	; change work color to work_light color
207
	; fix colors:
181
	mov esi, [shared_icons_active_ptr]
208
	mov esi, [shared_icons_active_ptr]
-
 
209
	mov edi, [shared_icons_ptr]
182
	xor ecx, ecx
210
	xor ecx, ecx
183
.for1:
211
.for1:
184
	cmp ecx, [shared_icons_size]
212
	cmp ecx, [shared_icons_size]
185
	jae .end_for1
213
	jae .end_for1
Line 188... Line 216...
188
	add eax, ecx
216
	add eax, ecx
189
	mov edx, [eax]
217
	mov edx, [eax]
190
	cmp edx, [sc.work]
218
	cmp edx, [sc.work]
191
	; DEBUGF DBG_INFO, "eax = %x, sc.work = %x\n", eax, [sc.work]
219
	; DEBUGF DBG_INFO, "eax = %x, sc.work = %x\n", eax, [sc.work]
192
	jne @f
220
	jne @f
193
	mov ebx, [sc.work] ;[sc.work_light]
221
	mov ebx, [active_color]
-
 
222
	mov [eax], ebx
-
 
223
@@:
-
 
224
 
-
 
225
	mov eax, edi
194
	add ebx, 0x1a1a1a ;;
226
	add eax, ecx
-
 
227
	mov edx, [eax]
-
 
228
	cmp edx, [sc.work]
-
 
229
	jne @f
-
 
230
	mov ebx, [work_color]
195
	mov [eax], ebx
231
	mov [eax], ebx
196
@@:
232
@@:
-
 
233
 
197
	add ecx, 4
234
	add ecx, 4
198
	jmp .for1
235
	jmp .for1
199
.end_for1:
236
.end_for1:
200
.no_res:
237
.no_res:
Line 894... Line 931...
894
	imul	ecx,BTN_HEIGHT
931
	imul	ecx,BTN_HEIGHT
895
	mov [draw_y], ecx
932
	mov [draw_y], ecx
896
	shl	ecx,16
933
	shl	ecx,16
897
	add	ecx,BTN_HEIGHT
934
	add	ecx,BTN_HEIGHT
898
; edx = button identifier
935
; edx = button identifier
899
	mov	esi,[sc.work]
936
	mov	esi, [work_color]
900
	cmp	esi,0xdfdfdf
-
 
901
	jb	nocorrect
-
 
902
	sub	esi,0x1b1b1b
-
 
Line 903... Line -...
903
	
-
 
904
;--------------------------------------
-
 
905
align 4
-
 
906
nocorrect: 
937
 
907
	mov [is_icon_active], 0
938
	mov [is_icon_active], 0
908
	inc	dl
939
	inc	dl
909
	cmp	[edi + cur_sel],dl
940
	cmp	[edi + cur_sel],dl
910
	jne	.nohighlight
941
	jne	.nohighlight
911
	mov [is_icon_active], 1
-
 
912
	cmp esi,0
-
 
913
	jne @f
-
 
914
	mov esi,0x2a2a2a
942
	mov [is_icon_active], 1
915
@@:
943
 
916
	add	esi,0x1a1a1a
944
	mov	esi, [active_color]
917
;--------------------------------------
945
;--------------------------------------
918
align 4
946
align 4
919
.nohighlight:
947
.nohighlight:
920
	or	edx,BT_NOFRAME + BT_HIDE
948
	or	edx,BT_NOFRAME + BT_HIDE
Line 1146... Line 1174...
1146
has_icon db ?
1174
has_icon db ?
1147
icon_number dd ?
1175
icon_number dd ?
1148
is_icon_active dd ?
1176
is_icon_active dd ?
1149
no_shared_resources dd 0
1177
no_shared_resources dd 0
1150
tmp dd ?
1178
tmp dd ?
-
 
1179
active_color dd ?
-
 
1180
work_color dd ?
1151
;------------------------------------------------------------------------------
1181
;------------------------------------------------------------------------------
1152
align 4
1182
align 4
1153
bootparam:
1183
bootparam:
1154
procinfo:
1184
procinfo:
1155
	rb 1024
1185
	rb 1024