diff --git a/skins/loggy/build.bat b/skins/loggy/build.bat new file mode 100644 index 0000000000..a2a3469320 --- /dev/null +++ b/skins/loggy/build.bat @@ -0,0 +1,4 @@ +@fasm dtp.asm dtp.dtp +@fasm default.asm default.skn +@kpack default.skn +@pause \ No newline at end of file diff --git a/skins/loggy/default.asm b/skins/loggy/default.asm new file mode 100644 index 0000000000..8359ee4be3 --- /dev/null +++ b/skins/loggy/default.asm @@ -0,0 +1,32 @@ +include 'loggy.inc' ; Color Table +include 'parse.inc' + +SKIN_PARAMS \ + height = bmp_center1.height,\ ; skin height + margins = [5:1:43:1],\ ; margins [left:top:right:bottom] + colors active = [binner=win_border:\ + bouter=win_frame:\ + bframe=win_face],\ + colors inactive = [binner=win_inborder:\ + bouter=win_inframe:\ + bframe=win_inface],\ + dtp = 'dtp.dtp' ; dtp colors + +SKIN_BUTTONS \ + close = [-20:3][14:14],\ ; buttons coordinates + minimize = [-37:3][14:14] ; [left:top][width:height] + +SKIN_BITMAPS \ + left active = bmp_left1,\ ; skin bitmaps pointers + left inactive = bmp_left2,\ + oper active = bmp_right1,\ + oper inactive = bmp_right2,\ + base active = bmp_center1,\ + base inactive = bmp_center2 + +BITMAP bmp_left1, 'pic_left_a.bmp' ; skin bitmaps +BITMAP bmp_left2, 'pic_left_b.bmp' +BITMAP bmp_right1, 'pic_right_a.bmp' +BITMAP bmp_right2, 'pic_right_b.bmp' +BITMAP bmp_center1,'pic_center_a.bmp' +BITMAP bmp_center2,'pic_center_b.bmp' diff --git a/skins/loggy/dtp.asm b/skins/loggy/dtp.asm new file mode 100644 index 0000000000..64c725461d --- /dev/null +++ b/skins/loggy/dtp.asm @@ -0,0 +1,60 @@ +; [ DTP ] Common Colors +include 'loggy.inc' +; set table +struc system_colors +{ +__menu_body dd menu_body +__3d_face dd 3d_face +__3d_dark dd 3d_dark +__3d_light dd 3d_light +__win_title dd win_title +__win_body dd win_body +__btn_face dd btn_face +__btn_text dd btn_text + +__win_text dd win_text +__panel_frame dd panel_frame +__win_face dd win_face +__win_inface dd win_inface +__win_frame dd win_frame +__win_inframe dd win_inframe +__win_border dd win_border +__win_inborder dd win_inborder + +__win_graytext dd win_graytext +__menu_frame dd menu_frame +__menu_text dd menu_text +__panel_body dd panel_body +__panel_text dd panel_text +__hint_frame dd hint_frame +__hint_body dd hint_body +__hint_text dd hint_text + +__btn_inface dd btn_inface +__btn_fcface dd btn_fcface +__btn_frame dd btn_frame +__btn_inframe dd btn_inframe +__btn_fcframe dd btn_fcframe +__btn_intext dd btn_intext +__btn_fctext dd btn_fctext +__gui_shadow dd gui_shadow + +__gui_face dd gui_face +__gui_inface dd gui_inface +__gui_fcface dd gui_fcface +__gui_frame dd gui_frame +__gui_inframe dd gui_inframe +__gui_fcframe dd gui_fcframe +__gui_text dd gui_text +__gui_intext dd gui_intext + +__gui_fctext dd gui_fctext +__gui_select dd gui_select +__res_var_a dd reserved +__res_var_b dd reserved +__res_var_c dd reserved +__res_var_d dd reserved +__res_var_e dd reserved +__res_var_f dd reserved +} +struct system_colors diff --git a/skins/loggy/loggy.inc b/skins/loggy/loggy.inc new file mode 100644 index 0000000000..1af7125bce --- /dev/null +++ b/skins/loggy/loggy.inc @@ -0,0 +1,47 @@ + win_face equ 0xE1E1E1 ; - Фон обводки активного окна. ; 1 + win_inface equ 0xE1E1E1 ; - Фон обводки неактивного окна. ; 2 + win_frame equ 0x204962 ; - Цвет внешней рамки активного окна. ; 3 + win_inframe equ 0xA1A1A1 ; - Цвет внешней рамки неактивного окна. ; 4 + win_border equ 0xE1E1E1 ; - Цвет внутренней рамки активного окна. ; 5 + win_inborder equ 0xE1E1E1 ; - Цвет внутренней рамки неактивного окна. ; 6 + win_body equ 0xE4DFE1 ; - Фон клиентской части активного окна. ; 7 + win_title equ 0x2F2F2F ; - Цвет текста полосы заголовка. ; 8 + win_text equ 0x000000 ; - Цвет текста в рабочей области окна. ; 9 + win_graytext equ 0x666666 ; - Цвет неактивного текста. ; 0 + menu_frame equ 0x204962 ; - Цвет внешней рамки дочерних потоков ; 1 + menu_body equ 0xD4D4D4 ; - Фон дочерних потоков и меню приложения. ; 2 + menu_text equ 0x3C415B ; - Цвет текста дочерних потоков и меню. ; 3 + panel_frame equ 0x94AECE ; - Цвет внешней рамки панелей ; 4 + panel_body equ 0xE4DFE1 ; - Фон панелей приложения. ; 5 + panel_text equ 0x2F2F2F ; - Цвет текста панелей приложения. ; 6 + hint_frame equ 0x94AECE ; - Цвет внешней рамки подсказок ; 7 + hint_body equ 0xFAF8FA ; - Фон подсказки. ; 8 + hint_text equ 0x3C415B ; - Цвет текста подсказки. ; 9 + btn_face equ 0x677B9C ; - Фон кнопки. ; 0 + btn_inface equ 0x7D8EAA ; - Фон неактивной кнопки. ; 1 + btn_fcface equ 0x5C708F ; - Фон кнопки при наведении. ; 2 + btn_frame equ 0x9F9F9F ; - Цвет рамки кнопки. ; 3 + btn_inframe equ 0xB1B1B1 ; - Цвет рамки неактивной кнопки. ; 4 + btn_fcframe equ 0x797979 ; - Цвет рамки кнопки при наведении. ; 5 + btn_text equ 0xFFFFFF ; - Цвет текста кнопки. ; 6 + btn_intext equ 0xD0D9E8 ; - Цвет текста неактивной кнопки. ; 7 + btn_fctext equ 0xFFFFFF ; - Цвет текста кнопки при наведении. ; 8 + 3d_face equ 0xCED0D0 ; - Основной цвет наложения тени (скролл). ; 9 + 3d_dark equ 0xEFEFEF ; - Теневая обводка. ; 0 + 3d_light equ 0xFCFCFC ; - Световая обводка. ; 1 + gui_shadow equ 0xFFFFFF ; - Цвет тени для неактивных элементов. ; 2 + gui_face equ 0xFAF8FA ; - Фон элементов. ; 3 + gui_inface equ 0xF6F3F6 ; - Фон неактивных элементов. ; 4 + gui_fcface equ 0xFAF8FA ; - Фон элементов при наведении. ; 5 + gui_frame equ 0x9F9F9F ; - Рамка элемента. ; 6 + gui_inframe equ 0xACACAC ; - Рамка неактивного элемента. ; 7 + gui_fcframe equ 0x94AECE ; - Рамка элемента при наведении. ; 8 + gui_text equ 0x2F2F2F ; - Цвет текста элемента. ; 9 + gui_intext equ 0x5F5F5F ; - Цвет текста неактивного элемента. ; 0 + gui_fctext equ 0x2F2F2F ; - Цвет текста элемента при наведении. ; 1 + gui_select equ 0xC7C9C9 ; - Цвет фона полосы выделения текста . ; 2 + reserved equ 0x000000 ; - Зарезервированно. ; 3 + + + + diff --git a/skins/loggy/parse.inc b/skins/loggy/parse.inc new file mode 100644 index 0000000000..ccbb3c191c --- /dev/null +++ b/skins/loggy/parse.inc @@ -0,0 +1,235 @@ +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + file _fname + load w dword from _bmp.i.biWidth + load h dword from _bmp.i.biHeight + end virtual + align 4 + label _name + .width = w + .height = h + dd w,h + a=54+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + virtual at 0 + file _fname + load r from a+0 + load g from a+1 + load b from a+2 + end virtual + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + virtual at 0 + file _dtp + _dtp_sz = $ + end virtual + dd _dtp_sz + file _dtp +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} \ No newline at end of file diff --git a/skins/loggy/pic_center_a.bmp b/skins/loggy/pic_center_a.bmp new file mode 100644 index 0000000000..bd3913a83c Binary files /dev/null and b/skins/loggy/pic_center_a.bmp differ diff --git a/skins/loggy/pic_center_b.bmp b/skins/loggy/pic_center_b.bmp new file mode 100644 index 0000000000..d142ed2b72 Binary files /dev/null and b/skins/loggy/pic_center_b.bmp differ diff --git a/skins/loggy/pic_left_a.bmp b/skins/loggy/pic_left_a.bmp new file mode 100644 index 0000000000..bb75b4c11f Binary files /dev/null and b/skins/loggy/pic_left_a.bmp differ diff --git a/skins/loggy/pic_left_b.bmp b/skins/loggy/pic_left_b.bmp new file mode 100644 index 0000000000..575d5e4770 Binary files /dev/null and b/skins/loggy/pic_left_b.bmp differ diff --git a/skins/loggy/pic_right_a.bmp b/skins/loggy/pic_right_a.bmp new file mode 100644 index 0000000000..6daaefb658 Binary files /dev/null and b/skins/loggy/pic_right_a.bmp differ diff --git a/skins/loggy/pic_right_b.bmp b/skins/loggy/pic_right_b.bmp new file mode 100644 index 0000000000..aa31033e70 Binary files /dev/null and b/skins/loggy/pic_right_b.bmp differ