2,7 → 2,7 |
; Hot Angles Config ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
; Compile with FASM |
; Version 0.3.7: Oct 14, 2018 |
; Version 0.3.8: Oct 14, 2018 |
|
; Copyright (c) 2018, Efremenkov Sergey aka TheOnlyMirage |
; All rights reserved. |
91,6 → 91,8 |
stdcall [kmenuitem_new], KMENUITEM_SUBMENU, valueModeMenu1, [modeMenu] |
|
call loadConfig ;çàãðóæàåì êîíôèãóðàöèþ èç ôàéëà, åñëè íåò - òî âûñòàâëÿåì ïàðàìåòðû ïî óìîë÷àíèþ |
call defaultElems ;óñòàíàâëèâàåì ðàçìåðû ýëåìåíòîâ â çàâèñèìîñòè îò íàñòðîåê |
call resizeElems |
call draw_window ;îòðèñîâàòü îêíî ïðèëîæåíèÿ |
|
; Îáðàáîòêà öèêëà ñîáûòèé |
114,7 → 116,6 |
invoke edit_box_mouse, editLD |
invoke edit_box_mouse, editRU |
invoke edit_box_mouse, editRD |
;stdcall [kmainmenu_dispatch_cursorevent], [modeMenu] ;ïðîâåðêà ìûøè äëÿ êîìáîáîêñà |
invoke edit_box_mouse, editRadius |
|
jmp event_wait |
226,11 → 227,13 |
mcall 9, pi, -1 ;get window coord |
|
mov eax, dword[pi+34] |
add eax, buttonModeX ;+ 5 |
add eax, Otstup ;buttonModeX ;+ 5 |
mov word[coordModeMenu.x], ax |
|
mov eax, dword[pi+38] |
add eax, buttonModeY + 13 ;17 |
add ax, word[elem.butModeY] |
add ax, word[elem.butDialHeight] |
dec ax ;add eax, buttonModeY + 13 ;17 |
mov word[coordModeMenu.y], ax |
|
stdcall [ksubmenu_draw], [modeMenu], coordModeMenu |
334,11 → 337,6 |
add ecx, dword[keystr.size] ;ðàçìåð ñêàíêîäà àêòèâàöèîííîé êíîïêè |
inc ecx ; åù¸ 1 áàéò äëÿ õðàíåíèÿ ðàçìåðà ýëåìåíòîâ |
|
;cmp dword[keystr.size], 3 |
;jbe @f |
;mcall -1 |
;@@: |
|
;åñëè çàäàíû ïóñòûå ñòðîêè, òî ìû àâòîìàòè÷åñêè äîáàâëÿåì çíàê ìèíóñ, çíà÷èò ðàçìåð +1 áàéò |
cmp dword[editLU.size], 0 |
jne @f |
374,8 → 372,8 |
push esi ebx |
call UpdateEditsSizes ;îáíîâèòü ðàçìåðû òåêñòà â edit'àõ |
|
mov esi, dataBuffer.1 ;editLU.text |
mov ebx, dataBuffer.size1 ;editLU.size |
mov esi, dataBuffer.1 |
mov ebx, dataBuffer.size1 |
call copyParam |
call addPerenos ;äîáàâëÿåì ïåðåíîñ ñòðîêè |
|
676,31 → 674,29 |
@@: |
cmp byte[sizeStyle], 'a' |
je .auto |
;cmp byte[sizeStyle], 's' |
;je .system |
cmp byte[sizeStyle], 'x' |
je .x |
.system: ;èíà÷å çíà÷åíèå ïî óìîë÷àíèþ: s - ñèñòåìíàÿ |
; push ebx ecx |
;!!! |
; mov eax, 9 |
; mcall 48, 11 ;ïîëó÷àåì ñèñòåìíûé ðàçìåð øðèôòà |
;eax - âûñîòà øðèôòà â ïèêñåëÿõ |
; mov ecx, eax |
; push eax |
; mcall 48, 12, ecx ;ïðèìåíÿåì ðàçìåð øðèôòà |
; pop eax |
; pop ecx ebx |
;temp fix - äåëèì íà òåêóùèé ðàçìåð øðèôòà and -1 |
; push ebx edx |
; mov ebx, 9 |
;div ebx |
; pop edx ebx |
;cmp eax, 0 |
;je .end |
;dec eax |
mov eax, 0 ;xor eax, eax ;test temp |
push ebx ecx edx |
mcall 48, 11 ;ïîëó÷àåì ñèñòåìíûé ðàçìåð øðèôòà |
;òåïåðü eax - âûñîòà øðèôòà â ïèêñåëÿõ |
mov ebx, 9 ;temp fix - äåëèì íà òåêóùèé ðàçìåð øðèôòà and -1 |
mov edx, 0 |
div ebx |
pop edx ecx ebx |
|
cmp eax, 0 |
je .end |
cmp eax, 7 |
jae .size7 |
dec eax |
;mov eax, 0 ;test |
jmp .end |
.x: |
mov byte[sizeStyle], 'x' |
mov eax, 0 |
jmp .end |
.auto: ;a - âûñòàâëÿåì â çàâèñèìîñòè îò ðàçðåøåíèÿ ýêðàíà |
;!!! |
mcall 14 |
push ebx |
xor ebx, ebx |
711,8 → 707,10 |
mov ax, bx |
.a: |
pop ebx |
cmp ax, 1919 ;ðàçìåðû ïîëó÷åííûå âûøå îò 0 è íà 1 ìåíüøå |
cmp ax, 1300 ;1919 ;ðàçìåðû ïîëó÷åííûå âûøå îò 0 è íà 1 ìåíüøå |
jb .size0 |
cmp ax, 1899 ;919 |
jb .x |
cmp ax, 2047 |
jb .size1 |
cmp ax, 4095 |
719,8 → 717,14 |
jb .size2 |
cmp ax, 8191 |
jb .size3 |
cmp ax, 16383 |
jb .size4 |
cmp ax, 32767 |
jb .size5 |
cmp ax, 65535 |
jb .size6 |
|
jmp .size4 |
jmp .size7 |
|
.size0: |
mov eax, 0 |
947,6 → 951,8 |
je .setValue |
cmp byte[eax], 's' |
je .setValue |
cmp byte[eax], 'x' |
je .setValue |
cmp byte[eax], '0' |
je .setValue |
cmp byte[eax], '1' |
1078,6 → 1084,27 |
pop edi esi ecx ebx eax |
ret |
|
|
|
|
reg: dw 0 |
shlRegForSizeElems: |
push eax edx |
xor eax, eax |
xor edx, edx |
mov ax, word[reg] |
mov dl, byte[mysize] |
@@: |
cmp dl, 0 |
je @f |
shl ax, 1 |
dec dl |
jmp @b |
@@: |
mov word[reg], ax |
pop edx eax |
ret |
|
WindowsWidth = 450 |
WindowsHeight = 195 + 35 - 5 |
coord: ;êîîðäèíàòû îêíà ïðèëîæåíèÿ |
1084,6 → 1111,73 |
.y dw 0 |
.x dw 0 |
|
|
|
|
|
BaseY = 36 ;ñìåùåíèå äî ïåðâîãî, ñàìîãî âåðõíåãî, ýëåìåíòà âíóòðè îêíà |
|
elem: |
.winWidth: dw 450 |
.winHeight: dw 225 |
.butAppleWidth: dw 80 |
.butAppleHeight: dw 20 |
.textDelta: dw 3 ;îòñòóï ìåæäó ñòðîêàìè ìíîãîñòðî÷íîãî òåêñòà |
.butDialWidth: dw 30 ;âûñîòà è øèðèíà äëÿ 4 êíîïîê äèàëîãîâîãî îêíà |
.butDialHeight: dw 14 |
.textHeight: dw 9 ;ðàçìåð âûñîòà øðèôòà |
;.editHeight: dw |
.editCommandWidth: dw 150 ;180-butDialWidth |
.butModeWidth: dw 221 |
;.textCommandUpY: dw 74 |
.butModeY: dw 160 |
;.editRadiusWidth: dw 40 |
elemEnd: |
|
|
;âûñòàâëÿåì âñå çíà÷åíèÿ ïî óìîë÷àíèþ |
defaultElems: |
mov word[elem.winWidth], 450 |
mov word[elem.winHeight], 225 |
mov word[elem.butAppleWidth], 80 |
mov word[elem.butAppleHeight], 20 |
mov word[elem.textDelta], 3 |
mov word[elem.butDialWidth], 30 |
mov word[elem.butDialHeight], 14 |
mov word[elem.textHeight], 9 |
mov word[elem.editCommandWidth], 150 |
mov word[elem.butModeWidth], 221 |
mov word[elem.butModeY], 160 |
;mov word[elem.editRadiusWidth], 40 |
ret |
|
;ïðîõîäèì ïî âñåì ýëåìåíòàì è ïåðåâû÷èñëÿåì ïàðàìåòðû (ôóíêöèÿ âûïîëíÿåòñÿ 1 ðàç ïðè çàãðóçêå êîíôèãóðàöèè) |
resizeElems: |
push ebx esi |
xor ebx, ebx |
mov esi, elem |
@@: |
cmp esi, elemEnd |
jae @f |
|
mov bx, word[esi] |
mov word[reg], bx |
call shlRegForSizeElems |
mov bx, word[reg] |
mov word[esi], bx |
add esi, 2 |
jmp @b |
@@: |
pop esi ebx |
ret |
|
|
|
|
|
|
|
|
draw_window: |
;óäàëÿåì êíîïêó, åñëè åñòü |
mov edx, 0x80000002 |
1103,6 → 1197,24 |
mov ebx, 1 ; 1, start of draw |
mcall |
|
cmp byte[sizeStyle], 'x' |
je draw_window_x |
jmp draw_window_old |
|
draw_window_x: |
mov word[elem.winWidth], 450+150 |
mov word[elem.winHeight], 225+220/2 |
mov word[elem.butAppleWidth], 80+80/3 |
mov word[elem.butAppleHeight], 20+20/3 |
mov word[elem.textDelta], 3 |
mov word[elem.butDialWidth], 30+10 |
mov word[elem.butDialHeight], 14+7 |
mov word[elem.textHeight], 9*2 |
mov word[elem.editCommandWidth], 150+50 |
mov word[elem.butModeWidth], 221 |
mov word[elem.butModeY], 160+90 |
|
draw_window_old: |
;îòîáðàçèì îêíî ïî öåíòðó ýêðàíà äëÿ ýòîãî: |
mcall 14 ;ïîëó÷èì ðàçìåðû ýêðàíà |
mov dword[coord], eax ;ïîëîæèì ðàçìåðû ýêðàíà â êîîðäèíàòû |
1110,19 → 1222,24 |
shr word[coord.y], 1 |
|
;âû÷èñëÿåì êîîðäèíàòû îêíà, ÷òîáû îêíî áûëî ïî ñåðåäèíå ýêðàíà |
sub word[coord.x], WindowsWidth/2 |
sub word[coord.y], WindowsHeight/2 |
mov bx, word[elem.winWidth] ;îòíèìàåì îò ñåðåäèíû ýêðàíà ïîëîâèíó ðàçìåðà îêíà |
shr bx, 1 |
sub word[coord.x], bx |
|
mov bx, word[elem.winHeight] |
shr bx, 1 |
sub word[coord.y], bx |
|
mov eax, 0 ; function 0 : define and draw window |
mov ebx, 0 ; [x start] *65536 + [x size] |
mov bx, word[coord.x] |
shl ebx, 16 |
mov bx, WindowsWidth |
mov bx, word[elem.winWidth] |
|
mov ecx, 0 |
mov cx, word[coord.y] ; [y start] *65536 + [y size] |
shl ecx, 16 |
mov cx, WindowsHeight |
mov cx, word[elem.winHeight] |
|
mov edx, 0x14ffffff ; color of work area RRGGBB |
; 0x02000000 = window type 4 (fixed size, skinned window) |
1131,6 → 1248,75 |
mov edi, title |
mcall |
|
|
;ðàçìåðû è êîîðäèíàòû |
;push eax |
xor eax, eax ;mov eax, 0 |
mov ax, word[elem.editCommandWidth] |
mov dword[editLU.width], eax |
mov dword[editLD.width], eax |
mov dword[editRU.width], eax |
mov dword[editRD.width], eax |
|
;mov ax, word[elem.editRadiusWidth] |
mov ax, word[elem.winWidth] |
sub ax, word[elem.butModeWidth] |
sub ax, Otstup |
sub ax, word[elem.butAppleHeight] ;Otstup |
shr ax, 1 |
sub ax, Otstup |
mov dword[editRadius.width], eax |
|
;mov ax, word[elem.butDialHeight] |
xor ecx, ecx |
call setNewSizeForText |
mov dword[editLU.text_color], ecx ;0x90000000 ;eax |
mov dword[editLD.text_color], ecx |
mov dword[editRU.text_color], ecx |
mov dword[editRD.text_color], ecx |
mov dword[editRadius.text_color], ecx |
|
;mov ecx, dword[editRadius.height] |
;mov word[elem.butDialHeight], cx |
|
;mov eax, 0 |
mov ax, word[elem.winWidth] |
sub ax, Otstup |
sub ax, word[elem.butDialWidth] |
sub ax, word[elem.editCommandWidth] |
mov dword[editRU.left], eax |
mov dword[editRD.left], eax |
|
mov ax, Otstup |
add ax, word[elem.butDialWidth] |
mov dword[editLU.left], eax |
mov dword[editLD.left], eax |
|
mov ax, word[elem.textHeight] |
add ax, word[elem.textDelta] |
shl ax, 2 |
add ax, BaseY+2 |
mov dword[editLU.top], eax |
mov dword[editRU.top], eax |
|
add ax, 4 |
;mov ax, word[elem.textHeight] |
;add ax, word[elem.textDelta] |
;shl ax, 2 |
sub ax, word[elem.textHeight] |
;add ax, BaseY |
add ax, word[elem.textHeight] |
;add ax, 6 |
add ax, word[elem.butDialHeight] |
add ax, word[elem.textHeight] |
add ax, word[elem.textHeight] |
mov dword[editLD.top], eax |
mov dword[editRD.top], eax |
|
;pop eax |
;mcall 48,3,sc,40 |
;edit_boxes_set_sys_color editRadius, sc ;editLU, editLD, editRU, editRD, editRadius, sc |
|
invoke edit_box_draw, editLU ;ðèñîâàíèå edit box'îâ |
invoke edit_box_draw, editLD |
invoke edit_box_draw, editRU |
1137,15 → 1323,35 |
invoke edit_box_draw, editRD |
|
;ðèñóåì êíîïêó |
buttonAppleY = WindowsHeight-35 ;160 |
mov ebx, (WindowsWidth-80-Otstup)*65536 + 80 ;êîîðäèíàòà X, øèðèíà êíîïêè |
mov ecx, buttonAppleY*65536 + 20 ;êîîðäèíàòà Y, âûñîòà êíîïêè |
mov edx, 0x00000002 ;2 ;íîìåð êíîïêè |
mov bx, word[elem.winWidth] ;êîîðäèíàòà X êíîïêè |
sub bx, word[elem.butAppleWidth] |
sub bx, Otstup |
shl ebx, 16 |
add bx, word[elem.butAppleWidth] ;øèðèíà êíîïêè |
|
mov cx, word[elem.winHeight] ;êîîðäèíàòà Y |
sub cx, word[elem.butAppleHeight] |
sub cx, 15 |
shl ecx, 16 |
add cx, word[elem.butAppleHeight] ;âûñîòà êíîïêè |
|
mov edx, 0x00000002 ;íîìåð êíîïêè |
mov esi, 0x00AABBCC ;öâåò êíîïêè |
mcall 8 |
;ðèñóåì òåêñò êíîïêè |
mov ebx, (WindowsWidth-80-Otstup+25-buttonTextXoffset) * 65536 + (buttonAppleY+6) ;êîîðäèíàòû òåêñòà (x, y) |
mov bx, word[elem.winWidth] ;êîîðäèíàòà X òåêñòà |
sub bx, word[elem.butAppleWidth] |
sub bx, Otstup |
add bx, 25 |
sub bx, buttonTextXoffset ;!!!use size |
shl ebx, 16 |
add bx, word[elem.winHeight] ;êîîðäèíàòà Y òåêñòà |
sub bx, word[elem.butAppleHeight] |
sub bx, 15 |
add bx, 6 ;!!!use size |
|
mov ecx, 0xFFFFFF ;áåëûé öâåò òåêñòà |
call setNewSizeForText |
mov edx, buttonText |
mov esi, buttonTextSize ;ðàçìåð òåêñòà â ñèìâîëàõ |
mcall 4 |
1154,27 → 1360,94 |
;íîìåðà 4,5,6 è 7 |
buttonH = 14 |
buttonW = 30 |
|
|
;ëåâûé âåðõíèé óãîë |
mov ebx, Otstup*65536 + buttonW ;êîîðäèíàòà X, øèðèíà êíîïêè |
mov ecx, 85*65536 + buttonH ;êîîðäèíàòà Y, âûñîòà êíîïêè |
mov ebx, Otstup ;êîîðäèíàòà X |
shl ebx, 16 |
add bx, word[elem.butDialWidth] ;øèðèíà êíîïêè |
|
;mov ecx, 85 ;êîîðäèíàòà Y 36+3*9+2*3+ 5 +9+2 |
;BaseY+4*(word[elem.textHeight]+word[elem.textDelta])+2 |
mov cx, word[elem.textHeight] |
add cx, word[elem.textDelta] |
shl cx, 2 |
add cx, BaseY+2 |
shl ecx, 16 |
add cx, word[elem.butDialHeight] ;âûñîòà êíîïêè |
|
mov edx, 0x00000004 ;íîìåð êíîïêè |
mov esi, 0x00AABBCC ;öâåò êíîïêè |
mcall 8 |
|
;ëåâûé íèæíèé óãîë |
mov ebx, Otstup*65536 + buttonW ;êîîðäèíàòà X, øèðèíà êíîïêè |
mov ecx, 120*65536 + buttonH ;êîîðäèíàòà Y, âûñîòà êíîïêè |
mov ebx, Otstup ;êîîðäèíàòà X |
shl ebx, 16 |
add bx, word[elem.butDialWidth] ;øèðèíà êíîïêè |
;mov ecx, 120 ;êîîðäèíàòà Y |
mov cx, word[elem.textHeight] |
add cx, word[elem.textDelta] |
shl cx, 2 |
sub cx, word[elem.textHeight] |
add cx, BaseY |
add cx, word[elem.textHeight] |
add cx, 6 |
add cx, word[elem.butDialHeight] |
add cx, word[elem.textHeight] |
add cx, word[elem.textHeight] |
|
shl ecx, 16 |
add cx, word[elem.butDialHeight] ;âûñîòà êíîïêè |
|
mov edx, 0x00000005 ;íîìåð êíîïêè |
mov esi, 0x00AABBCC ;öâåò êíîïêè |
mcall 8 |
|
;ïðàâûé âåðõíèé óãîë |
mov ebx, (WindowsWidth-Otstup-buttonW)*65536 + buttonW ;êîîðäèíàòà X, øèðèíà êíîïêè |
mov ecx, 85*65536 + buttonH ;êîîðäèíàòà Y, âûñîòà êíîïêè |
;mov ebx, (WindowsWidth-Otstup-buttonW)*65536 + buttonW ;êîîðäèíàòà X, øèðèíà êíîïêè |
mov bx, word[elem.winWidth] ;êîîðäèíàòà X |
sub bx, Otstup |
sub bx, word[elem.butDialWidth] |
|
shl ebx, 16 |
add bx, word[elem.butDialWidth] ;øèðèíà êíîïêè |
|
;mov ecx, 85 ;êîîðäèíàòà Y 36+3*9+2*3+ 5 +9+2 |
;BaseY+4*(word[elem.textHeight]+word[elem.textDelta])+2 |
mov cx, word[elem.textHeight] |
add cx, word[elem.textDelta] |
shl cx, 2 |
add cx, BaseY+2 |
shl ecx, 16 |
add cx, word[elem.butDialHeight] ;âûñîòà êíîïêè |
|
mov edx, 0x00000006 ;íîìåð êíîïêè |
mov esi, 0x00AABBCC ;öâåò êíîïêè |
mcall 8 |
|
|
|
|
;ïðàâûé íèæíèé óãîë |
mov ebx, (WindowsWidth-Otstup-buttonW)*65536 + buttonW ;êîîðäèíàòà X, øèðèíà êíîïêè |
mov ecx, 120*65536 + buttonH ;êîîðäèíàòà Y, âûñîòà êíîïêè |
mov bx, word[elem.winWidth] ;êîîðäèíàòà X |
sub bx, Otstup |
sub bx, word[elem.butDialWidth] |
shl ebx, 16 |
add bx, word[elem.butDialWidth] ;øèðèíà êíîïêè |
|
mov cx, word[elem.textHeight] ;êîîðäèíàòà Y |
add cx, word[elem.textDelta] |
shl cx, 2 |
sub cx, word[elem.textHeight] |
add cx, BaseY |
add cx, word[elem.textHeight] |
add cx, 6 |
add cx, word[elem.butDialHeight] |
add cx, word[elem.textHeight] |
add cx, word[elem.textHeight] |
shl ecx, 16 |
add cx, word[elem.butDialHeight] ;âûñîòà êíîïêè |
|
mov edx, 0x00000007 ;íîìåð êíîïêè |
mov esi, 0x00AABBCC ;öâåò êíîïêè |
mcall 8 |
1181,18 → 1454,74 |
|
;ðèñóåì òåêñòû äëÿ ýòèõ 4 êíîïîê |
mov ecx, 0xFFFFFF ;áåëûé öâåò òåêñòà |
call setNewSizeForText |
mov edx, commonButtonText ;ñòðîêà òåêñòà |
mov esi, commonButtonTextSize ;ðàçìåð òåêñòà â ñèìâîëàõ |
;êîîðäèíàòû òåêñòà (x, y) |
deltaCommonTextX = 7 |
deltaCommonTextY = 2 |
mov ebx, (Otstup+deltaCommonTextX) * 65536 + (85 + deltaCommonTextY) |
;mov ebx, (Otstup+deltaCommonTextX) * 65536 + (85 + deltaCommonTextY) |
mov ebx, Otstup+deltaCommonTextX |
shl ebx, 16 |
mov bx, word[elem.textHeight] |
add bx, word[elem.textDelta] |
shl bx, 2 |
add bx, BaseY+2 |
add bx, deltaCommonTextY |
|
mcall 4 |
mov ebx, (Otstup+deltaCommonTextX) * 65536 + (120 + deltaCommonTextY) |
|
; |
;mov ebx, (Otstup+deltaCommonTextX) * 65536 + (120 + deltaCommonTextY) |
mov ebx, Otstup+deltaCommonTextX |
shl ebx, 16 |
mov bx, word[elem.textHeight] ;êîîðäèíàòà Y |
add bx, word[elem.textDelta] |
shl bx, 2 |
sub bx, word[elem.textHeight] |
add bx, BaseY |
add bx, word[elem.textHeight] |
add bx, 6 |
add bx, word[elem.butDialHeight] |
add bx, word[elem.textHeight] |
add bx, word[elem.textHeight] |
add bx, deltaCommonTextY |
|
mcall 4 |
mov ebx, (WindowsWidth-Otstup-buttonW+deltaCommonTextX) * 65536 + (85 + deltaCommonTextY) |
|
|
;mov ebx, (WindowsWidth-Otstup-buttonW+deltaCommonTextX) * 65536 + (85 + deltaCommonTextY) |
mov bx, word[elem.winWidth] ;êîîðäèíàòà X |
sub bx, Otstup |
sub bx, word[elem.butDialWidth] |
add bx, deltaCommonTextX |
shl ebx, 16 |
mov bx, word[elem.textHeight] |
add bx, word[elem.textDelta] |
shl bx, 2 |
add bx, BaseY+2 |
add bx, deltaCommonTextY |
|
mcall 4 |
mov ebx, (WindowsWidth-Otstup-buttonW+deltaCommonTextX) * 65536 + (120 + deltaCommonTextY) |
|
;mov ebx, (WindowsWidth-Otstup-buttonW+deltaCommonTextX) * 65536 + (120 + deltaCommonTextY) |
mov bx, word[elem.winWidth] ;êîîðäèíàòà X |
sub bx, Otstup |
sub bx, word[elem.butDialWidth] |
add bx, deltaCommonTextX |
shl ebx, 16 |
mov bx, word[elem.textHeight] ;êîîðäèíàòà Y |
add bx, word[elem.textDelta] |
shl bx, 2 |
sub bx, word[elem.textHeight] |
add bx, BaseY |
add bx, word[elem.textHeight] |
add bx, 6 |
add bx, word[elem.butDialHeight] |
add bx, word[elem.textHeight] |
add bx, word[elem.textHeight] |
add bx, deltaCommonTextY |
|
mcall 4 |
|
;delete mode button, if it exist |
1199,34 → 1528,73 |
mov edx, 0x80000008 |
mcall 8 |
;draw button Mode |
buttonModeX = 30 ;433 |
buttonModeY = 160 ;50 |
buttonModeX = 30 |
buttonModeY = 160 |
buttonModeWidth = 221 |
buttonModeHeight = 14 ;20 |
buttonModeTextYoffset = 3;6 |
buttonModeHeight = 14 |
buttonModeTextYoffset = 3 |
buttonModeTextXoffset = 5 |
mov ebx, buttonModeX*65536 + buttonModeWidth ;X + Width |
mov ecx, buttonModeY*65536 + buttonModeHeight ;Y + Height |
;mov ebx, buttonModeX*65536 + buttonModeWidth ;X + Width |
mov ebx, Otstup |
shl ebx, 16 |
add bx, word[elem.butModeWidth] |
|
mov cx, word[elem.butModeY] ;buttonModeY;*65536 + buttonModeHeight ;Y + Height |
shl ecx, 16 |
mov cx, word[elem.butDialHeight] |
|
mov edx, 0x00000008 ;button id |
mov esi, 0x00FFFFFF ;color button |
mcall 8 |
mov ebx, (buttonModeX+2+buttonModeWidth-20)*65536 + (20-2) ;X + Width |
mov ecx, (buttonModeY+1)*65536 + buttonModeHeight-2 ;Y + Height |
|
;mov ebx, (buttonModeX+2+buttonModeWidth-20)*65536 + (20-2) ;X + Width |
mov ebx, Otstup+2 |
add bx, word[elem.butModeWidth] |
sub bx, 20 |
shl ebx, 16 |
add bx, 20-2 |
|
; mov ecx, (buttonModeY+1)*65536 + buttonModeHeight-2 ;Y + Height |
mov cx, word[elem.butModeY] |
inc ecx |
shl ecx, 16 |
mov cx, word[elem.butDialHeight] |
sub cx, 2 |
|
mov edx, 0xAABBCC |
mcall 13 |
;draw text for button Mode |
mov ebx, (buttonModeX+buttonModeTextXoffset) * 65536 + (buttonModeY+buttonModeTextYoffset) ;(x, y) |
mov ebx, (Otstup+buttonModeTextXoffset) * 65536 ;(x, y) |
mov bx, word[elem.butModeY] |
add bx, buttonModeTextYoffset |
mov ecx, 0x000000 |
call setNewSizeForText |
and ecx, 0x7FFFFFFF |
call setTextModeMenu |
mov esi, valueModeMenuSize |
cmp byte[sizeStyle], 'x' |
jne @f |
mov esi, 25 ;valueModeMenuSize -3 ;ðåæèì æåñòà ïî êëàâèøå àê |
@@: |
mcall 4 |
mov ebx, (buttonModeX+buttonModeWidth-12) * 65536 + (buttonModeY+buttonModeTextYoffset) |
mov ecx, 0x80FFFFFF |
|
mov ebx, (Otstup-12) |
add bx, word[elem.butModeWidth] |
shl ebx, 16 |
mov bx, word[elem.butModeY] |
add bx, buttonModeTextYoffset |
|
mov ecx, 0x80FFFFFF ;80 |
call setNewSizeForText |
and ecx, 0x7FFFFFFF |
;or ecx, 0x80000000 |
|
mov edx, symbolDownArrow |
mov esi, 1 |
mcall 4 |
|
;êíîïêà âûáîðà ãîðÿ÷åé êëàâèøè |
buttonHotKeyX = 280-10 |
buttonHotKeyX = 270 |
buttonHotKeyWidth = 90 |
mov edx, 0x80000009 ;óäàëÿåì |
mcall 8 |
1234,22 → 1602,68 |
jbe @f |
;ðèñóåì íîâóþ |
push eax ebx ecx edx esi |
mov ebx, buttonHotKeyX*65536 + buttonHotKeyWidth ;X + Width |
mov ecx, buttonModeY*65536 + buttonModeHeight ;Y + Height |
; mov ebx, buttonHotKeyX*65536 + buttonHotKeyWidth ;X + Width |
mov ebx, Otstup |
add bx, word[elem.butModeWidth] |
add bx, word[elem.butAppleHeight] |
shl ebx, 16 |
mov bx, word[elem.winWidth] ;buttonHotKeyWidth |
sub bx, word[elem.butModeWidth] |
sub bx, Otstup |
sub bx, word[elem.butAppleHeight] ;Otstup |
shr bx, 1 |
sub bx, Otstup |
; mov ecx, buttonModeY*65536 + buttonModeHeight ;Y + Height |
mov cx, word[elem.butModeY] |
shl ecx, 16 |
mov cx, word[elem.butDialHeight] |
|
mov edx, 0x00000009 ;button id |
mov esi, 0x00FFFFFF ;color button |
mcall 8 |
pop esi edx ecx ebx eax |
;òåêñò ïîäñêàçêè äëÿ ãîðÿ÷åé êëàâèøè |
mov ebx, (buttonHotKeyX+buttonModeTextXoffset) * 65536 + (buttonModeY+buttonModeTextYoffset) ;(x, y) |
mov ecx, 0x80224466 |
;mov ebx, (buttonHotKeyX+buttonModeTextXoffset) * 65536 + (buttonModeY+buttonModeTextYoffset) ;(x, y) |
mov ebx, Otstup |
add bx, word[elem.butModeWidth] |
add bx, word[elem.butAppleHeight] |
add bx, buttonModeTextYoffset |
shl ebx, 16 |
mov bx, word[elem.butModeY] |
add bx, buttonModeTextYoffset |
|
; xor ecx, ecx |
; mov ch, byte[mysize] |
; shl ecx, 16 |
; add ecx, 0x80224466 |
mov ecx, 0x224466 |
call setNewSizeForText |
;and ecx, 0x7FFFFFFF |
or ecx, 0x80000000 |
|
call setTextForHotKey |
mov esi, valueModeMenuSize |
mcall 4 |
;çàãîëîâîê |
push eax ebx ecx edx edi esi |
mov ebx, buttonHotKeyX * 65536 + (buttonModeY-11) |
mov ecx, 0x80224466 |
;mov ebx, buttonHotKeyX * 65536 + (buttonModeY-11) |
mov ebx, Otstup ;buttonHotKeyX ;Otstup |
add bx, word[elem.butModeWidth] |
add bx, word[elem.butAppleHeight] |
shl ebx, 16 |
add bx, word[elem.butModeY] |
sub bx, 2 |
sub bx, word[elem.textHeight] |
|
; xor ecx, ecx |
; mov ch, byte[mysize] |
; shl ecx, 16 |
; add ecx, 0x80224466 |
mov ecx, 0x224466 |
call setNewSizeForText |
;and ecx, 0x7FFFFFFF |
or ecx, 0x80000000 |
|
mov edx, hkCaption |
mov esi, 3 |
mcall 4 |
1261,12 → 1675,40 |
jne @f |
;çàãîëîâîê |
push eax ebx ecx edx edi esi |
mov ebx, (buttonHotKeyX + buttonHotKeyWidth + 20) * 65536 + (buttonModeY-11) |
mov ecx, 0x80224466 |
xor ebx, ebx |
mov bx, word[elem.winWidth] |
sub bx, Otstup |
sub ebx, dword[editRadius.width] |
shl ebx, 16 |
add bx, word[elem.butModeY] |
sub bx, 2 |
sub bx, word[elem.textHeight] |
|
; mov ecx, 0 |
; mov ch, byte[mysize] |
; shl ecx, 16 |
; add ecx, 0x80224466 |
|
mov ecx, 0x224466 |
call setNewSizeForText |
;and ecx, 0x7FFFFFFF |
or ecx, 0x80000000 |
|
;mov ecx, 0x80224466 |
mov edx, radiusCaption |
mov esi, 3 |
mcall 4 |
pop esi edi edx ecx ebx eax |
|
|
xor eax, eax |
mov ax, word[elem.winWidth] |
sub ax, Otstup |
sub eax, dword[editRadius.width] |
mov dword[editRadius.left], eax |
mov ax, word[elem.butModeY] |
mov dword[editRadius.top], eax |
|
invoke edit_box_draw, editRadius |
@@: |
|
1273,14 → 1715,11 |
call draw_super_text |
|
LineLength = 62 |
mov ebx, 40 * 65536 + 36 ; draw info text with function 4 (x, y) |
mov ebx, 40 * 65536 + BaseY ; draw info text with function 4 (x, y) |
|
;xor ecx, ecx |
;mov cl, 1 ;byte[mysize] |
;shl ecx, 24 |
;add ecx, 0x224466 |
;or ecx, 0x00224466 ;80224466 |
mov ecx, 0x224466 |
call setNewSizeForText |
and ecx, 0x7FFFFFFF |
|
mov edx, text |
mov esi, LineLength |
1288,7 → 1727,9 |
|
.newline: ; text from the DATA AREA |
mcall |
add ebx, 12 |
add bx, word[elem.textHeight] ;9*n+3 ;12 |
add bx, word[elem.textDelta] |
|
add edx, LineLength |
cmp byte[edx], 0 |
jne .newline |
1299,6 → 1740,24 |
|
ret |
|
|
setNewSizeForText: |
push ebx |
mov ebx, ecx |
cmp byte[sizeStyle], 'x' |
je .x |
mov ecx, 0 |
mov ch, byte[mysize] |
shl ecx, 16 |
jmp @f |
.x: |
mov ecx,[sc.work_text] |
or ecx,0x90000000 |
@@: |
add ecx, ebx |
pop ebx |
ret |
|
hkSymbol: db 0, 0 |
|
setTextForHotKey: |
1462,8 → 1921,8 |
if lang eq ru ;åñëè ÿçûê ñáîðêè ðóññêèé |
|
text db "®ä¨£ãà â®à Hot Angles ®â¢¥ç ¥â § áâனªã ªâ¨¢ëå 㣫®¢. " |
db " áâன⥠¯ à ¬¥âàë ¯®¤ á¥¡ï ¨«¨ ®âª«îç¨â¥ íâã ®¯æ¨î. " |
db " ", 0 |
db " áâன⥠¯ à ¬¥âàë ¯®¤ á¥¡ï ¨«¨ ®âª«îç¨â¥ íâã ®¯æ¨î. ", 0 |
; db " ", 0 |
hed: |
title db "®ä¨£ãà â®à ã⨫¨âë Hot Angles", 0 |
buttonText db "ਬ¥¨âì", 0 |
1494,14 → 1953,13 |
err_message_import1 db '訡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'kmenu',39,0 |
|
hkCaption: db '« ¢¨è :',0 |
;hkHint: db ' ¦¬¨â¥ «î¡ãî ª« ¢¨èã',0 |
radiusCaption: db ' ¤¨ãá:',0 |
|
else ;èíà÷å àíãëèéñêèé òåêñò |
|
text db "This is a Hot Angles Configurator. " |
db "Set the parameters bellow for yourself or disable this option." |
db " ", 0 |
db "Set the parameters bellow for yourself or disable this option.", 0 |
; db " ", 0 |
hed: |
title db "Hot Angles Configurator", 0 |
buttonText db "Apply", 0 |
1532,7 → 1990,6 |
err_message_import1 db 'Error importing library ',39,'kmenu',39,0 |
|
hkCaption: db 'Key:',0 |
;hkHint: db 'press any key',0 |
radiusCaption: db 'Radius:',0 |
|
end if |
1547,12 → 2004,24 |
draw_super_text: |
push eax ebx ecx edx edi esi |
|
mov ecx, 0 |
mov ch, byte[mysize] |
shl ecx, 16 |
add ecx, 0x224466 |
; mov ecx, 0 |
; mov ch, byte[mysize] |
; shl ecx, 16 |
; add ecx, 0x224466 |
mov ecx, 0x224466 |
call setNewSizeForText |
;and ecx, 0x7FFFFFFF |
or ecx, 0x80000000 |
|
mov ebx, Otstup * 65536 + 74 ; draw info text with function 4 (x, y) |
;mov ebx, Otstup * 65536 + 74 ; draw info text with function 4 (x, y) |
mov bx, Otstup |
shl ebx, 16 |
mov bx, word[elem.textHeight] |
add bx, word[elem.textDelta] |
shl bx, 2 |
sub bx, word[elem.textHeight] |
add bx, BaseY |
|
;mov ecx, 0x224466 |
mov eax, superText.lu |
mov edx, eax |
1559,33 → 2028,54 |
mov esi, superTextSize |
mcall 4 |
|
mov ebx, Otstup * 65536 + 109 |
;mov ebx, Otstup * 65536 + 109 ;9+2+14+(9+1) |
add bx, word[elem.textHeight] |
add bx, 4;3 |
add bx, word[elem.butDialHeight] |
add bx, word[elem.textHeight] |
|
mov edx, superText.ld |
mov esi, superTextSize |
mcall 4 |
|
mov ebx, 240 * 65536 + 74 |
;mov ebx, 240 * 65536 + 74 |
mov bx, word[elem.winWidth] |
sub bx, word[elem.butDialWidth] |
sub bx, word[elem.editCommandWidth] |
sub bx, Otstup |
shl ebx, 16 |
mov bx, word[elem.textHeight] |
add bx, word[elem.textDelta] |
shl bx, 2 |
sub bx, word[elem.textHeight] |
add bx, BaseY |
|
mov edx, superText.ru |
mov esi, superTextSize |
mcall 4 |
|
mov ebx, 240 * 65536 + 109 |
;mov ebx, 240 * 65536 + 109 |
add bx, word[elem.textHeight] |
add bx, 4;3;2 |
add bx, word[elem.butDialHeight] |
add bx, word[elem.textHeight] |
|
mov edx, superText.rd |
mov esi, superTextSize |
mcall 4 |
|
mov ebx, Otstup * 65536 + (buttonModeY-11) |
;mov ebx, Otstup * 65536 + (buttonModeY-11) |
mov ebx, Otstup |
shl ebx, 16 |
add bx, word[elem.butModeY] |
sub bx, 2 |
sub bx, word[elem.textHeight] |
|
or ecx, 0x80000000 |
mov edx, ModeMenu |
mov esi, 3 |
mcall 4 |
|
; mov ebx, buttonHotKeyX * 65536 + (buttonModeY-11) |
; or ecx, 0x80000000 |
; mov edx, hkCaption |
; mov esi, 3 |
; mcall 4 |
|
pop esi edi edx ecx ebx eax |
ret |
|
1886,8 → 2376,8 |
|
|
I_END: |
rb 4096 |
align 16 |
rb 256 ;1024 ;4096 |
align 4 ;16 |
STACKTOP: |
|
MEM: |