'cnc_editor' small fix in button colors

git-svn-id: svn://kolibrios.org@7441 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA
2018-10-08 20:13:06 +00:00
parent 840f6b865f
commit 50c6905604
6 changed files with 77 additions and 83 deletions

View File

@@ -77,7 +77,7 @@ start:
mov [pb.height], dword 17
mov [pb.max], dword 100;599
mov [pb.min], dword 0 ;-397
mov [pb.value], dword 50;-397
mov [pb.value], dword 0 ;-397
mov [pb.back_color], dword 00C8D0D4h
mov [pb.progress_color], dword 8072B7EBh
mov [pb.frame_color], dword 00406175h
@@ -151,30 +151,13 @@ mouse:
call mouse_left_d
jmp .end_l
@@:
;bt eax,0
;jnc @f
;mouse l. but. move
;call mouse_left_m
;jmp .end_l
;@@:
bt eax,16
jnc .end_l
;mouse l. but. up
call mouse_left_u
;jmp .end_l
.end_l:
;bt eax,9
;jnc @f
;mouse r. but. press
;jmp .end_r
;@@:
;bt eax,1
;jnc @f
;mouse r. but. move
;call mouse_right_m
;jmp .end_r
;@@:
;.end_r:
call buf_get_mouse_coord
cmp eax,-1
@@ -298,8 +281,7 @@ proc buf_get_mouse_coord
endp
align 4
proc timer_funct
pushad
proc timer_funct uses eax ebx
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
mov [last_time],eax
@@ -309,7 +291,6 @@ proc timer_funct
stdcall draw_obj2d,ObjData
stdcall [buf2d_draw], buf_0
@@:
popad
ret
endp
@@ -559,11 +540,9 @@ but_open_file:
jnz .end_open_file
cmp ebx,0xffffffff
je .end_open_file
mov [open_file_size],ebx
mcall SF_SET_CAPTION,1,openfile_path
;---
stdcall FileInit,[open_file_data],[open_file_size]
stdcall [buf2d_clear], buf_0, [buf_0.color] ;<3B><><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>
stdcall [buf2d_draw], buf_0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>
@@ -610,8 +589,6 @@ proc but_restore_zoom
ret
endp
;input:
; buf - 㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD>, <20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 10 <20><><EFBFBD> 16 <20><><EFBFBD> <20><><EFBFBD><EFBFBD>
;output:
@@ -1094,7 +1071,8 @@ thread_n_file:
rb 2048
stacktop:
sys_path rb 1024
file_name: rb 1024 ;4096
file_name:
rb 1024
library_path rb 1024
plugin_path rb 4096
openfile_path rb 4096

View File

@@ -4,7 +4,7 @@
;add_object_in_list, (<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD>.), (Object.FigData)
; mov [Object.FigData], (tl_node_add(<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD>.),tl_node_get_data)
;draw_fig2d_litl, ___, pobj, (Object.FigData), ___, ___, ___
;draw_fig2d_litl, ___, pobj, (Object.FigData), fign, ___, ___, ___
struct Object
OType dd ?
@@ -107,8 +107,8 @@ graf_margin_left dd 3 ;margin in pixels
graf_margin_right dd 3+6 ;margin in pixels
graf_margin_top dd 3+9 ;margin in pixels
graf_margin_bot dd 3+9 ;margin in pixels
png_data dd ?
png_size dd ?
data_printed dd ? ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
data_all dd ? ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;global variables:
ObjData Object
@@ -220,6 +220,8 @@ proc ObjectInit uses eax ebx ecx edi, pobj:dword, etxt:dword
push ecx
mov edi,eax
xor eax,eax
mov [data_all],eax ;<3B><><EFBFBD><20><>砫쭮<E7A0AB> <20><><EFBFBD><EFBFBD><E3ABA5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
mov [data_printed],eax
rep stosd ;clear memory
pop ecx
@@ -227,12 +229,19 @@ proc ObjectInit uses eax ebx ecx edi, pobj:dword, etxt:dword
align 4
.cycle0:
stdcall FigureInit,edi
mov eax,[edi]
mov eax,[eax+Figure.PoiCount]
or eax,eax
jnz @f
inc eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@:
add [data_all],eax
cmp esi,[etxt]
jge .cycle0end
add edi,4
loop .cycle0
.cycle0end:
inc dword[ebx+Object.FigCount] ;???
inc dword[ebx+Object.FigCount]
or ecx,ecx
jz @f
;㬥<><E3ACA5><EFBFBD> <20><><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@ -242,6 +251,12 @@ align 4
stdcall mem.ReAlloc,[ebx+Object.FigData],eax
mov [ebx+Object.FigData],eax
@@:
;<3B><><EFBFBD><E2A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><EFBFBD><E0AEA3><EFBFBD><E1A1A0> <20><> 25 %
mov eax,[data_all]
mov [pb.max],eax
shr eax,2
mov [data_printed],eax
mov [pb.value],eax
stdcall ObjCalculateScale,ebx
@@ -896,6 +911,7 @@ endp
align 4
proc draw_obj2d, pobj:dword
locals
data_draw dd ?
CentrX dd ?
CentrY dd ?
endl
@@ -934,9 +950,17 @@ pushad
add edx,[graf_margin_left]
add edx,[ebx+Object.MCentrX]
mov [CentrX],edx
mov dword[data_draw],0
align 4
.cycle0:
stdcall draw_fig2d_litl, buf_0,ebx,[edi],0,edx,eax
stdcall draw_fig2d_litl, buf_0,ebx,[edi],[data_draw],0,edx,eax
mov esi,[edi]
mov esi,[esi+Figure.PoiCount]
or esi,esi
jnz @f
inc esi
@@:
add [data_draw],esi
add edi,4
loop .cycle0
stdcall [buf2d_flip_v], buf_0
@@ -981,11 +1005,16 @@ endp
;input:
; pbuf - pointer to buffer 2d
; pobj - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
; pfig - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
; fign - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
;description:
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
align 4
proc draw_fig2d_litl, pbuf:dword, pobj:dword, pfig:dword, Scale:dword, CentrX:dword, CentrY:dword
proc draw_fig2d_litl, pbuf:dword, pobj:dword, pfig:dword, fign:dword,\
Scale:dword, CentrX:dword, CentrY:dword
locals
line_col dd ? ;figure color
PervX dd 0 ;pervios point coord X
PervY dd 0 ;pervios point coord Y
GrafX dd ? ;active point coord X
@@ -1011,6 +1040,7 @@ pushad
lea eax,[edx+Object.WScale]
@@:
fmul qword[eax]
mov esi,[fign]
align 4
.cycle0:
fld qword[edi+Point.CoordX]
@@ -1025,17 +1055,24 @@ align 4
fistp dword[ebp-4]
stdcall [buf2d_set_pixel], [pbuf], [GrafX],[GrafY], 0xff0000
cmp ecx,[ebx+Figure.PoiCount]
je @f
stdcall [buf2d_line_sm], [pbuf], [PervX],[PervY], [GrafX],[GrafY], 0x80
;sub esp,24
;call [buf2d_line]
stdcall [buf2d_line], [pbuf], [PervX],[PervY], [GrafX],[GrafY], 0x80
je .end0
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
cmp esi,[data_printed]
jl @f
mov [line_col],0x80 ;if not printed
jmp .end1
@@:
mov [line_col],0xff0000 ;if was printed
.end1:
stdcall [buf2d_line_sm], [pbuf], [PervX],[PervY], [GrafX],[GrafY], [line_col]
stdcall [buf2d_line], [pbuf], [PervX],[PervY], [GrafX],[GrafY], [line_col]
.end0:
mov eax,[GrafX]
mov [PervX],eax
mov eax,[GrafY]
mov [PervY],eax
add edi,sizeof.Point
inc esi
;;loop .cycle0
dec ecx
jnz .cycle0

View File

@@ -14,7 +14,7 @@ include 'cnc_editor.inc'
include '../../develop/info3ds/info_fun_float.inc'
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db 'CNC editor 24.09.18',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
caption db 'CNC editor 08.10.18',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
run_file_70 FileInfoBlock
@@ -321,7 +321,7 @@ pushad
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><EFBFBD><EBAFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 ࠧ <20><><EFBFBD> <20><><EFBFBD><EFBFBD>᪥) ***
mov edx,[sc.work]
or edx,(3 shl 24)+0x10000000+0x20000000
or edx,0x33000000
mov edi,caption
mcall SF_CREATE_WINDOW,(20 shl 16)+599,(20 shl 16)+415
@@ -363,73 +363,54 @@ pushad
.end0:
; *** ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3,, [sc.work_button]
mov ebx,(30 shl 16)+20
mov edx,4 ;0x4000000?
int 0x40 ;open
mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3, [sc.work_button]
add ebx,25 shl 16
mov edx,5
int 0x40 ;save
mcall ,,,4 ;open
add ebx,25 shl 16
mcall ,,,5 ;save
add ebx,30 shl 16
mov edx,6
int 0x40 ;captions on off
mcall ,,,6 ;captions on off
add ebx,25 shl 16
mov edx,7
int 0x40 ;figure move up
mcall ,,,7 ;figure move up
add ebx,25 shl 16
mov edx,8
int 0x40 ;figure move down
mcall ,,,8 ;figure move down
add ebx,25 shl 16
mov edx,9
int 0x40 ;sel points dlg
mcall ,,,9 ;sel points dlg
add ebx,25 shl 16
mov edx,10
int 0x40 ;sel points move up
mcall ,,,10 ;sel points move up
add ebx,25 shl 16
mov edx,11
int 0x40 ;sel points move down
mcall ,,,11 ;sel points move down
add ebx,25 shl 16
mov edx,12
int 0x40 ;align sel points left
mcall ,,,12 ;align sel points left
add ebx,25 shl 16
mov edx,13
int 0x40 ;align sel points right
mcall ,,,13 ;align sel points right
add ebx,25 shl 16
mov edx,14
int 0x40 ;align sel points top
mcall ,,,14 ;align sel points top
add ebx,25 shl 16
mov edx,15
int 0x40 ;align sel points bottom
mcall ,,,15 ;align sel points bottom
add ebx,25 shl 16
mov edx,16
int 0x40 ;copy to clipboard
mcall ,,,16 ;copy to clipboard
add ebx,25 shl 16
mov edx,17
int 0x40 ;paste from clipboard
mcall ,,,17 ;paste from clipboard
add ebx,25 shl 16
mov edx,18
int 0x40 ;sel points del
mcall ,,,18 ;sel points del
add ebx,30 shl 16
mov edx,19
int 0x40 ;restore zoom
mcall ,,,19 ;restore zoom
add ebx,30 shl 16
mov edx,20
int 0x40 ;.png
mcall ,,,20 ;.png
add ebx,25 shl 16
mov edx,21
int 0x40 ;options scale
mcall ,,,21 ;options scale
; *** <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ***
mcall SF_PUT_IMAGE,[image_data_toolbar],(16 shl 16)+16,(7 shl 16)+7 ;icon new

View File

@@ -113,8 +113,6 @@ txt_rs db ')',0
txt_len db ' len=',0
txt_39 db 39,0
use_mem_array_figure equ 0 ;1 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
PROP_BIT_SELECT equ 30 ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB