forked from KolibriOS/kolibrios
new palitra: update UI
git-svn-id: svn://kolibrios.org@9542 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
7b02f7b61d
commit
2325fc5d35
@ -2,33 +2,35 @@ draw_result:
|
||||
;.................................................................................................
|
||||
; <EFBFBD>®«ìè ï à ¬ª ¢ë¢®¤ १ã«ìâ â
|
||||
;.................................................................................................
|
||||
mcall SF_DRAW_RECT, <4,110>, <9,219-18>, [sc.work_graph]
|
||||
mcall , <5,110-2>, <10,219-20>, [sc.work_light]
|
||||
mcall SF_DRAW_RECT, <4,110>, <9, 197>, [sc.work_graph]
|
||||
mcall , <5,110-2>, <10,195>, [sc.work_light]
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª १ã«ìâ â 梥⠢ hex color2
|
||||
;.................................................................................................
|
||||
mcall , (16+2) shl 16+15, (16+8) shl 16+15, 0x222222
|
||||
CURCOLX = 11
|
||||
CURCOLY = 17
|
||||
mcall , <CURCOLX+5,15>, <CURCOLY+4,15>, 0x222222
|
||||
; color 2 - draw color
|
||||
mcall , (17+2) shl 16+13, (17+8) shl 16+13, [color2]
|
||||
mcall , <CURCOLX+6,13>, <CURCOLY+5,13>, [color2]
|
||||
; color 1 - draw fringle
|
||||
mcall , (11+2) shl 16+15, (12+8) shl 16+15, 0x222222
|
||||
mcall , <CURCOLX+0,15>, <CURCOLY+0,15>, 0x222222
|
||||
; color 2 - draw color
|
||||
mcall , (12+2) shl 16+13, (13+8) shl 16+13, [color]
|
||||
mcall , <CURCOLX+1,13>, <CURCOLY+1,13>, [color]
|
||||
|
||||
; value - draw fringle
|
||||
mcall , (34+2) shl 16+72, (16+4) shl 16+15+4, 0x222222
|
||||
mcall , <CURCOLX+23,72>, <CURCOLY+0,19>, 0x222222
|
||||
; value - draw background
|
||||
mcall , (35+2) shl 16+70, (17+4) shl 16+13+4, 0xFFFFFF
|
||||
mcall , <CURCOLX+24,70>, <CURCOLY+1,17>, 0xFFFFFF
|
||||
|
||||
; ”ãªæ¨ï 47 - ¢ë¢®¤ ç¨á« ¢ ®ª®
|
||||
;ebx - ¯ à ¬¥âàë ¯à¥®¡à §®¢ ¨ï ç¨á« ¢ ⥪áâ (HEX)
|
||||
mcall SF_DRAW_NUMBER, 256+8 shl 16, [color], <40,22>, 0x10000000, 0
|
||||
; ebx - Ż ŕ ŹĽâŕë ŻŕĽŽĄŕ §Ž˘ ¨ď ç¨áŤ ˘ ⼪áâ (HEX)
|
||||
mcall SF_DRAW_NUMBER, 256+8 shl 16, [color], <CURCOLX+27,CURCOLY+2>, 0x10000000, 0
|
||||
|
||||
; äãªæ¨ï 4: ¯¨á âì ⥪áâ ¢ ®ª¥
|
||||
; edx - à¨á㥬 '#'
|
||||
; esi - ¤«¨ ⥪áâ ¢ ¡ ©â å
|
||||
;mcall SF_DRAW_TEXT,38*65536+20,0,hex,1
|
||||
; mcall SF_DRAW_TEXT, <38,20>, 0, hex, 1
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª r g b § 票©
|
||||
@ -36,27 +38,27 @@ draw_result:
|
||||
call get_spectr
|
||||
|
||||
movzx eax,[cred] ; ªà áë©
|
||||
mov ebx,12*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
mov ebx,12*65536+190 ; [x ç ŤěëŠ] *65536 + [y ç ŤěëŠ]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
movzx eax,[cgreen] ; §¥«¥ë©
|
||||
mov ebx,37*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
mov ebx,37*65536+190 ; [x ç ŤěëŠ] *65536 + [y ç ŤěëŠ]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
movzx eax,[cblue] ; ᨨ©
|
||||
mov ebx,62*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
mov ebx,62*65536+190 ; [x ç ŤěëŠ] *65536 + [y ç ŤěëŠ]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
movzx eax,[calpha] ; «ìä
|
||||
mov ebx,87*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
mov ebx,87*65536+190 ; [x ç ŤěëŠ] *65536 + [y ç ŤěëŠ]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
;.................................................................................................
|
||||
; ‚뢮¤¨¬ ¡ãª¢ë r g b a
|
||||
;.................................................................................................
|
||||
mov eax,SF_DRAW_TEXT ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ ¢ ®ª®
|
||||
mov ebx,17 shl 16+DRAWY+37 ; [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
mov ecx, 0x10000000 ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ )
|
||||
mov ebx,18 shl 16+DRAWY+32 ; [ŞŽŽŕ¤¨ â ŻŽ Žá¨ x]*65536 + [ŞŽŽŕ¤¨ â ŻŽ Žá¨ y]
|
||||
mov ecx, 0x00000000 ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梼â ⼪áâ )
|
||||
add ecx, [sc.work_text]
|
||||
mov edx,cname ; 㪠§ ⥫ì ç «® áâப¨
|
||||
mov esi,1 ; ¢ë¢®¤¨âì esi ᨬ¢®«®¢
|
||||
@ -73,7 +75,7 @@ draw_result:
|
||||
; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
|
||||
mov ebx, 18*65536+18
|
||||
mov ecx, 61*65536+61
|
||||
mov ecx, 55*65536+55
|
||||
|
||||
push dword 0xFC5663
|
||||
push dword 0xFA0919
|
||||
@ -113,22 +115,22 @@ draw_result:
|
||||
; Žâà¨á®¢ª ¯®«§ãª®¢
|
||||
;.................................................................................................
|
||||
mov ebx, 13*65536+13
|
||||
mov ecx, (61-3)*65536+(61-3)
|
||||
mov ecx, (55-3)*65536+(55-3)
|
||||
movzx eax,[cred]
|
||||
call draw_slider
|
||||
|
||||
mov ebx, (13+25*1)*65536+(13+25*1)
|
||||
mov ecx, (61-3)*65536+(61-3)
|
||||
mov ecx, (55-3)*65536+(55-3)
|
||||
movzx eax,[cgreen]
|
||||
call draw_slider
|
||||
|
||||
mov ebx, (13+25*2)*65536+(13+25*2)
|
||||
mov ecx, (61-3)*65536+(61-3)
|
||||
mov ecx, (55-3)*65536+(55-3)
|
||||
movzx eax,[cblue]
|
||||
call draw_slider
|
||||
|
||||
mov ebx, (13+25*3)*65536+(13+25*3)
|
||||
mov ecx, (61-3)*65536+(61-3)
|
||||
mov ecx, (55-3)*65536+(55-3)
|
||||
movzx eax,[calpha]
|
||||
call draw_slider
|
||||
|
||||
|
@ -1,32 +1,3 @@
|
||||
; DrawRectangle3D not work
|
||||
proc DrawRectangle3D, _x:word, _y:word, _w:word, _h:word, _color1:dword, _color2:dword
|
||||
mov ebx,dword[_w]
|
||||
add ebx,dword[_x] ;âãâ â®ç® ª ª ï-â® ¤¨çì... 㦮 ¯¥à¥¯¨á âì :)
|
||||
shl ebx,16
|
||||
mov bx,1
|
||||
mov ecx,dword[_h]
|
||||
inc cx
|
||||
mov edx,[_color2]
|
||||
mcall SF_DRAW_RECT ; x+w,y,1,h+1,color2
|
||||
rol ebx,16
|
||||
sub bx,[_w]
|
||||
ror ebx,16
|
||||
dec cx
|
||||
mov edx,[_color1]
|
||||
mcall ;SF_DRAW_RECT x,y,1,h,color1
|
||||
mov bx,[_h]
|
||||
xchg bx,cx
|
||||
mcall ;SF_DRAW_RECT x,y,w,1,color1
|
||||
rol ecx,16
|
||||
add cx,[_h]
|
||||
ror ecx,16
|
||||
mov edx,[_color2]
|
||||
mcall ;SF_DRAW_RECT x,y+h,w,1,color2
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
|
||||
proc DrawDeepRectangle, _x:word, _y:word, _w:word, _h:word, color1:dword, color2:dword
|
||||
pusha
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
||||
|
||||
|
||||
|
||||
WIN_W = 394 ; è¨à¨ ®ª
|
||||
WIN_W = 374 ; è¨à¨ ®ª
|
||||
WIN_H = 251 ; ¢ëá®â ®ª
|
||||
WIN_X = 250 ; ª®®à¤¨ â å ®ª
|
||||
WIN_Y = 190 ; ª®®à¤¨ â ã ®ª
|
||||
@ -91,7 +91,8 @@
|
||||
|
||||
CELLW = 11; 11 ; not used yet, but has to be :)
|
||||
|
||||
ICONX = WIN_W - 35
|
||||
ICONX = WIN_W - 39
|
||||
ICONS = 18 ; icon size
|
||||
SLIDEW = 25
|
||||
|
||||
palitra_x = Left_Border+SliderPanel_W+12
|
||||
@ -287,10 +288,10 @@ draw_main:
|
||||
call draw_palitra ; <20>ˆ‘“…Œ <20>€‹ˆ’<CB86>“
|
||||
call draw_result ; <20>ˆ‘“…Œ <20>…‡“‹œ’€’
|
||||
|
||||
mcall SF_DEFINE_BUTTON, <palitra_x,palitra_w*2+1 > , <DRAWY,palitra_w*2+2>, 0x07+BT_HIDE ; palitra
|
||||
mcall SF_DEFINE_BUTTON, <palitra_x,palitra_w*2+1 > , <DRAWY,palitra_w*2+2>, 7+BT_HIDE ; palitra
|
||||
|
||||
add edx,1++BT_NOFRAME
|
||||
mcall , <10,22>, <62,128> ; <20>¨á㥬 ¥¢¨¤¨¬ãî ª®¯ªã ¯®¤ á« ©¤¥à®¬ red
|
||||
inc edx
|
||||
mcall , <10,22>, <56,128> ; <20>¨á㥬 ¥¢¨¤¨¬ãî ª®¯ªã ¯®¤ á« ©¤¥à®¬ red
|
||||
add ebx,25*65536 ; „®¡ ¢«ï¥¬
|
||||
inc edx ; ID = 9
|
||||
int 0x40 ; <20>¨á㥬 ¥¢¨¤¨¬ãî ª®¯ªã ¯®¤ á« ©¤¥à®¬ green
|
||||
@ -323,32 +324,36 @@ draw_main:
|
||||
draw_left_panel: ; Žâà¨á®¢ª ¡®ª®¢®© ¯ ¥«¨ SL97: <20> á ¬®¬ ¤¥«¥ ¯à ¢®©.
|
||||
;.................................................................................................
|
||||
; button_next_colorsheme
|
||||
mcall SF_DEFINE_BUTTON, <ICONX,21>, <DRAWY,21>, 12+BT_HIDE
|
||||
mcall SF_DEFINE_BUTTON, <ICONX,ICONS+3>, <DRAWY,ICONS+3>, 12+BT_HIDE
|
||||
|
||||
; palitra button ; ID = 14
|
||||
mcall , ,(DRAWY+150) shl 16 + 21, 14+BT_HIDE
|
||||
mcall , ,(DRAWY+150) shl 16 + ICONS+3, 14+BT_HIDE
|
||||
|
||||
; pipet button ; ID = 15
|
||||
mcall , , (DRAWY+150) shl 16 + 21, 15+BT_HIDE
|
||||
mcall , , (DRAWY+150) shl 16 + ICONS+3, 15+BT_HIDE
|
||||
|
||||
mov ebx,[icons18bg]
|
||||
add ebx,18*18*4*53
|
||||
mcall SF_PUT_IMAGE_EXT, ebx, <18,18>, <ICONX+2,DRAWY+2>, 32, 0, 0
|
||||
add ebx,ICONS*ICONS*4*53
|
||||
mcall SF_PUT_IMAGE_EXT, ebx, <ICONS,ICONS>, <ICONX+2,DRAWY+2>, 32, 0, 0
|
||||
|
||||
add ebx,18*18*4*(39-53)
|
||||
add ebx,ICONS*ICONS*4*(39-53)
|
||||
mov edx,(ICONX+2)*65536+WIN_H-90
|
||||
mcall
|
||||
|
||||
mov ebx,[icons18]
|
||||
add ebx,18*18*4*(53-1)
|
||||
add ebx,ICONS*ICONS*4*(53-1)
|
||||
sub edx,40
|
||||
mcall
|
||||
|
||||
stdcall DrawDeepRectangle, ICONX, DRAWY, 22, 22, [sc.work_light], [sc.work_dark]
|
||||
stdcall DrawDeepRectangle, ICONX-1, DRAWY-1, ICONS+5, ICONS+5, [sc.work_graph], [sc.work_graph]
|
||||
stdcall DrawDeepRectangle, ICONX, DRAWY, ICONS+3, ICONS+3, [sc.work_light], [sc.work_dark]
|
||||
|
||||
stdcall DrawDeepRectangle, ICONX, DRAWY+110, 22, 22, [sc.work_light], [sc.work_dark]
|
||||
stdcall DrawDeepRectangle, ICONX-1, DRAWY+109, ICONS+5, ICONS+5, [sc.work_graph], [sc.work_graph]
|
||||
stdcall DrawDeepRectangle, ICONX, DRAWY+110, ICONS+3, ICONS+3, [sc.work_dark], [sc.work_light]
|
||||
stdcall DrawDeepRectangle, ICONX+1, DRAWY+111, ICONS+1, ICONS+1, 0xFFFfff, 0xFFFfff
|
||||
|
||||
stdcall DrawDeepRectangle, ICONX, DRAWY+150, 22, 22, [sc.work_light], [sc.work_dark]
|
||||
stdcall DrawDeepRectangle, ICONX-1, DRAWY+149, ICONS+5, ICONS+5, [sc.work_graph], [sc.work_graph]
|
||||
stdcall DrawDeepRectangle, ICONX, DRAWY+150, ICONS+3, ICONS+3, [sc.work_light], [sc.work_dark]
|
||||
|
||||
;stdcall DrawRectangle3D, ICONX, DRAWY, 22, 22, [sc.work_light], [sc.work_dark] ;Leency: draw rectangle around the button, buggy now
|
||||
|
||||
@ -394,7 +399,7 @@ draw_main:
|
||||
;------------------------------------------------------------------------------------------------+
|
||||
draw_bottom_panel: ; Žâà¨á®¢ª ¨¦¥© ¯ ¥«¨
|
||||
;.................................................................................................
|
||||
mcall SF_DEFINE_BUTTON, ((60+70) shl 16)+90, ((WIN_H-26) shl 16)+16, 14, [sc.work_button]
|
||||
mcall SF_DEFINE_BUTTON, <129,90>, <WIN_H-27,16>, 16, [sc.work_button]
|
||||
|
||||
add ebx, 100 shl 16
|
||||
add edx, 2
|
||||
@ -402,22 +407,21 @@ draw_main:
|
||||
|
||||
; Write string
|
||||
mov ecx,[sc.work_text] ; RGB
|
||||
or ecx, 1 shl 31
|
||||
mcall SF_DRAW_TEXT, (60) shl 16+(WIN_H-21), ,bground
|
||||
add ecx, 0x90000000
|
||||
mcall SF_DRAW_TEXT, <35, WIN_H-26>, ,bground
|
||||
|
||||
mov ecx, [sc.work_button_text]
|
||||
or ecx, 1 shl 31
|
||||
|
||||
add ebx, 90 shl 16
|
||||
add ecx, 0x90000000
|
||||
add ebx, 107 shl 16
|
||||
mov edx, bground1
|
||||
int 0x40
|
||||
mcall
|
||||
|
||||
add ebx, 108 shl 16
|
||||
add ebx, 113 shl 16
|
||||
mov edx, bground2
|
||||
int 0x40
|
||||
mcall
|
||||
|
||||
mcall SF_DRAW_LINE, 4 shl 16+(WIN_W-14), (WIN_H-32) shl 16+(WIN_H-32), 0x00666666
|
||||
ret ; return
|
||||
mcall SF_DRAW_LINE, <4, WIN_W-14>, <WIN_H-35, WIN_H-35>, [sc.work_graph]
|
||||
ret
|
||||
;.................................................................................................
|
||||
|
||||
mouse_global:
|
||||
@ -895,7 +899,7 @@ circle:
|
||||
cname db 'RGBAx' ; åà ¨â à §àï¤ë 梥⮢ (red,green,blue) x-¬¥âª ª®æ
|
||||
larrow db 0x1A,0
|
||||
buff db '000',0
|
||||
bground db 'BACKGROUND',0 ; ¨¬ï ª®¯ª¨ - 14
|
||||
bground db 'Background',0 ; ¨¬ï ª®¯ª¨ - 14
|
||||
bground1 db 'Gradient',0 ; ¨¬ï ª®¯ª¨ - 15
|
||||
bground2 db 'Noisy',0 ; ¨¬ï ª®¯ª¨ - 16
|
||||
runmode dd 1 ; ०¨¬ § ¯ã᪠(1-normal, 2-hidden, 3-colordialog)
|
||||
|
Loading…
Reference in New Issue
Block a user