@reshare: share checkbox image

appearance: WiP
clean skins

git-svn-id: svn://kolibrios.org@9455 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2021-12-22 01:26:10 +00:00
parent 532075fe18
commit 5a5ad5a64e
31 changed files with 113 additions and 441 deletions

View File

@ -17,6 +17,7 @@
#include "../lib/patterns/restart_process.h"
#include "ui_elements_preview.h"
#include "const.h"
//===================================================//
// //
@ -24,36 +25,6 @@
// //
//===================================================//
#ifdef LANG_RUS
?define WINDOW_HEADER "<EFBFBD> áâனª¨ ®ä®à¬«¥­¨ï"
?define T_SELECT_FOLDER "‚ë¡à âì ¯ ¯ªã"
?define MENU_LIST "Žâªàëâì ä ©« |Enter\n“¤ «¨âì ä ©« |Del"
?define T_PICTURE_MODE " <20>®«®¦¥­¨¥ ª à⨭ª¨ "
?define T_CHECKBOX_STRETCH "<EFBFBD> áâï­ãâì"
?define T_CHECKBOX_TILED "‡ ¬®áâ¨âì"
?define T_UPDATE_DOCK "Ž¡­®¢«ïâì Dock-¯ ­¥«ì"
char t_skins[] = " ‘â¨«ì ®ª®­";
char t_wallpapers[] = " Ž¡®¨";
char t_screensaver[] = " ‘ªà¨­á¥©¢¥à";
#else
?define WINDOW_HEADER "Appearance"
?define T_SELECT_FOLDER "Select folder"
?define MENU_LIST "Open file |Enter\nDelete file |Del"
?define T_PICTURE_MODE " Picture Mode "
?define T_CHECKBOX_STRETCH "Stretch"
?define T_CHECKBOX_TILED "Tiled"
?define T_UPDATE_DOCK "Update Dock"
char t_skins[] = " Skins";
char t_wallpapers[] = " Wallpapers";
char t_screensaver[] = " Screensaver";
#endif
#define WIN_W 621
#define PANEL_H 58
#define LP 10 //LIST_PADDING
char skins_folder_path[4096];
char wallp_folder_path[4096];
signed int active_skin=-1, active_wallpaper=-1, active_screensaver=-1;
enum {
BASE_TAB_BUTTON_ID=3,
@ -66,7 +37,7 @@ char cur_skin_path[4096];
char temp_filename[4096];
int files_mas[400];
_ini ini = { "/sys/settings/system.ini", "style" };
_ini ini = { "/sys/settings/system.ini" };
int cur;
@ -92,21 +63,9 @@ checkbox optionbox_tiled = { T_CHECKBOX_TILED, false };
// //
//===================================================//
void GetRealFolderPathes()
{
char real_kolibrios_path[4096];
SetCurDir("/kolibrios");
GetCurDir(#real_kolibrios_path, sizeof(real_kolibrios_path));
miniprintf(#skins_folder_path, "%s/res/skins", #real_kolibrios_path);
miniprintf(#wallp_folder_path, "%s/res/wallpapers", #real_kolibrios_path);
}
void main()
{
int id;
GetRealFolderPathes();
load_dll(boxlib, #box_lib_init,0);
load_dll(libini, #lib_init,1);
load_dll(Proc_lib, #OpenDialog_init,0);
@ -159,7 +118,7 @@ void main()
id = tabs.active_tab+1;
if(id==3)id=0;
tabs.click(id + tabs.base_id);
draw_window();
DrawWindowContent();
break;
}
@ -192,7 +151,7 @@ void main()
void draw_window()
{
sc.get();
DefineAndDrawWindow(screen.width-600/2,80,WIN_W+9,504+skin_height,0x34,sc.work,WINDOW_HEADER,0);
DefineAndDrawWindow(screen.width-600/2,80,WIN_W+9,WIN_H+skin_height,0x34,sc.work,WINDOW_HEADER,0);
GetProcessInfo(#Form, SelfInfo);
IF (Form.status_window&ROLLED_UP) return;
DrawWindowContent();
@ -206,26 +165,26 @@ void DrawWindowContent()
//tabs.w = Form.cwidth-LP-LP;
tabs.draw();
draw_icon_16w(tabs.x + TAB_PADDING, 15, 17);
draw_icon_16w(sizeof(t_skins)-1*8 + TAB_PADDING + TAB_PADDING + tabs.x, 15, 6);
draw_icon_16w(sizeof(t_wallpapers)+sizeof(t_skins)-2*8 + TAB_PADDING + TAB_PADDING + TAB_PADDING + tabs.x, 15, 61);
draw_icon_16w(tabs.x + TAB_PADDING, LP+5, 17);
draw_icon_16w(sizeof(t_skins)-1*8 + TAB_PADDING + TAB_PADDING + tabs.x, LP+5, 6);
draw_icon_16w(sizeof(t_wallpapers)+sizeof(t_skins)-2*8 + TAB_PADDING + TAB_PADDING + TAB_PADDING + tabs.x, LP+5, 61);
id = select_list.cur_y;
#define LIST_W 280
SelectList_Init(
LP + TAB_PADDING,
PANEL_H,
LIST_W,
Form.cheight-LP-LP - TAB_PADDING - PANEL_H
Form.cheight-LP - TAB_PADDING - PANEL_H
);
select_list.cur_y = id;
skp.set_size(
LP + TAB_PADDING + LIST_W + TAB_PADDING + 30,
PANEL_H,
WIN_W - 400,
226,
230 //select_list.h - 50 - 50
);
DrawBar(skp.x, skp.y, skp.w, WIN_H, sc.work);
SelectList_Draw();
SelectList_DrawBorder();
@ -249,6 +208,10 @@ void DrawWindowContent()
}
}
bool strreqi(dword _left, _right)
{
return strcmpi(_left+strrchr(_left,'.')-1, _right);
}
void Open_Dir()
{
@ -261,13 +224,13 @@ void Open_Dir()
strcpy(#temp_filename, io.dir.position(j));
strlwr(#temp_filename);
if (tabs.active_tab==SKINS) {
if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".skn")!=0) continue;
if (strreqi(#temp_filename,".skn")!=0) continue;
}
if (tabs.active_tab==WALLPAPERS) {
if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".png")!=0)
&& (strcmpi(#temp_filename+strlen(#temp_filename)-4,".jpg")!=0)
&& (strcmpi(#temp_filename+strlen(#temp_filename)-5,".jpeg")!=0)
&& (strcmpi(#temp_filename+strlen(#temp_filename)-4,".gif")!=0) continue;
if (strreqi(#temp_filename,".png")!=0)
&& (strreqi(#temp_filename,".jpg")!=0)
&& (strreqi(#temp_filename,".jpeg")!=0)
&& (strreqi(#temp_filename,".gif")!=0) continue;
}
cur = select_list.count;
files_mas[cur]=j;
@ -325,7 +288,15 @@ void ActivateTab(int _id)
select_list.cur_y = _id;
if (select_list.cur_y>select_list.visible) select_list.first=select_list.cur_y;
select_list.CheckDoesValuesOkey();
if (select_list.w) draw_window();
if (select_list.w) DrawWindowContent();
}
dword GetRealKolibriosPath()
{
char real_kolibrios_path[4096];
SetCurDir("/kolibrios");
GetCurDir(#real_kolibrios_path, sizeof(real_kolibrios_path));
return #real_kolibrios_path;
}
//===================================================//
@ -337,14 +308,18 @@ void ActivateTab(int _id)
void EventTabSkinsClick()
{
active_wallpaper = select_list.cur_y;
strcpy(#folder_path, #skins_folder_path);
miniprintf(#folder_path, "%s/res/skins", GetRealKolibriosPath());
ActivateTab(active_skin);
}
void EventTabWallpappersClick()
{
active_skin = select_list.cur_y;
strcpy(#folder_path, #wallp_folder_path);
if (opendir_path) {
strcpy(#folder_path, #opendir_path);
} else {
miniprintf(#folder_path, "%s/res/wallpapers", GetRealKolibriosPath());
}
ActivateTab(active_wallpaper);
}
@ -371,10 +346,7 @@ void EventSetNewCurrent()
void EventSelectWallpFolder()
{
OpenDialog_start stdcall (#o_dialog);
if (o_dialog.status) {
strcpy(#wallp_folder_path, #opendir_path);
EventTabWallpappersClick();
}
if (o_dialog.status) EventTabWallpappersClick();
}
void EventSetWallpMode_Stretch()
@ -429,7 +401,10 @@ void EventOpenFile()
void EventExit()
{
if (cur_skin_path) ini.SetString("skin", #cur_skin_path, strlen(#cur_skin_path));
if (cur_skin_path) {
ini.section = "style";
ini.SetString("skin", #cur_skin_path, strlen(#cur_skin_path));
}
ExitProcess();
}

View File

@ -0,0 +1,29 @@
#ifdef LANG_RUS
?define WINDOW_HEADER "<EFBFBD> áâனª¨ ®ä®à¬«¥­¨ï"
?define T_SELECT_FOLDER "‚ë¡à âì ¯ ¯ªã"
?define MENU_LIST "Žâªàëâì ä ©« |Enter\n“¤ «¨âì ä ©« |Del"
?define T_PICTURE_MODE " <20>®«®¦¥­¨¥ ª à⨭ª¨ "
?define T_CHECKBOX_STRETCH "<EFBFBD> áâï­ãâì"
?define T_CHECKBOX_TILED "‡ ¬®áâ¨âì"
?define T_UPDATE_DOCK "Ž¡­®¢«ïâì Dock-¯ ­¥«ì"
char t_skins[] = " ‘â¨«ì ®ª®­";
char t_wallpapers[] = " Ž¡®¨";
char t_screensaver[] = " ‘ªà¨­á¥©¢¥à";
#else
?define WINDOW_HEADER "Appearance"
?define T_SELECT_FOLDER "Select folder"
?define MENU_LIST "Open file |Enter\nDelete file |Del"
?define T_PICTURE_MODE " Picture Mode "
?define T_CHECKBOX_STRETCH "Stretch"
?define T_CHECKBOX_TILED "Tiled"
?define T_UPDATE_DOCK "Update Dock"
char t_skins[] = " Skins";
char t_wallpapers[] = " Wallpapers";
char t_screensaver[] = " Screensaver";
#endif
#define WIN_W 600
#define WIN_H 400
#define LIST_W 280
#define PANEL_H 50
#define LP 6 //LIST_PADDING

View File

@ -1,41 +1,6 @@
#ifndef INCLUDE_CHECKBOX
#define INCLUDE_CHECKBOX
:unsigned char checkbox_flag[507] = {
0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC,
0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4,
0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xDC, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04,
0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC,
0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xB4, 0x04, 0xFC, 0xDC,
0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xBC, 0x04,
0xFC, 0xBC, 0x04, 0xFC, 0xBC, 0x04, 0xFC, 0xB4, 0x04, 0xFC, 0xA9, 0x04, 0xFC, 0xA9, 0x04, 0xFC,
0xB4, 0x04, 0xFC, 0xB4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 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0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9,
0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04
};
struct checkbox
{
dword text;
@ -61,6 +26,7 @@ struct checkbox
:void checkbox::draw(dword _x,_y)
{
#define SIZE 14
static dword checkbox_flag;
dword text_col = sc.work_text;
if (!id) id = GetFreeButtonId();
x=_x; y=_y;
@ -80,7 +46,9 @@ struct checkbox
}
else if (checked == true)
{
_PutImage(x+1, y+1, 13, 13, #checkbox_flag);
if (!checkbox_flag) checkbox_flag = memopen("CHECKBOX", NULL, SHM_READ);
if (checkbox_flag) _PutImage(x+1, y+1, 13, 13, checkbox_flag);
else DrawBar(x+2, y+2, SIZE-3, SIZE-3, 0x58C33C);
}
if (text) WriteTextWithBg(x+SIZE+8, SIZE / 2 + y -7, 0xD0, text_col, text, sc.work);
DrawRectangle3D(x-1,y-1,SIZE+2,SIZE+2,sc.work_dark,sc.work_light);

View File

@ -65,7 +65,7 @@
col_text = MixColors(sc.work, sc.work_text, 120);
}
DefineHiddenButton(xx-2,y, ww-1+4,TAB_HEIGHT-1, _id + base_id);
WriteText(xx, y+6, 0x90, col_text, text);
WriteTextWithBg(xx, y+6, 0xD0, col_text, text, sc.work);
DrawBar(xx, y+TAB_HEIGHT-3, ww, 3, col_bg);
return ww;
}

View File

@ -6,6 +6,41 @@
#include "../lib/obj/libimg.h"
#include "../lib/patterns/rgb.h"
:unsigned char checkbox_flag[507] = {
0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC,
0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4,
0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xDC, 0x04, 0xFC, 0xC8, 0x04, 0xFC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0xF9, 0x98, 0x04, 0xFA, 0x9F, 0x04, 0xFC, 0xA9,
0x04, 0xFC, 0xA9, 0x04, 0xFC, 0xA9, 0x04, 0xFA, 0x9F, 0x04, 0xFA, 0x9F, 0x04, 0xFC, 0xC8, 0x04,
0xFC, 0xA9, 0x04, 0xFC, 0xA9, 0x04, 0xFA, 0x9F, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xFA,
0x9F, 0x04, 0xFC, 0xA9, 0x04, 0xFC, 0xA9, 0x04, 0xFC, 0xA9, 0x04, 0xFA, 0x9F, 0x04, 0xFA, 0x9F,
0x04, 0xF9, 0x98, 0x04, 0xFC, 0xB4, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04,
0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9,
0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04
};
void main()
{
libimg_image icons32;
@ -16,11 +51,15 @@ void main()
char* shared_i32;
char* shared_i16;
char* shared_i16w;
char* shared_chbox;
mem_init();
load_dll(libimg, #libimg_init, 1);
@SetEventMask(EVM_DESKTOPBG);
shared_chbox = memopen("CHECKBOX", sizeof(checkbox_flag), SHM_CREATE+SHM_WRITE);
memmov(shared_chbox, #checkbox_flag, sizeof(checkbox_flag));
icons32.load("/sys/icons32.png"); size32 = icons32.h * 32 * 4;
icons16.load("/sys/icons16.png"); size16 = icons16.h * 18 * 4;
@ -48,3 +87,4 @@ UPDATE_ICONS18WORK:
loop() IF(WaitEvent()==evDesktop) GOTO UPDATE_ICONS18WORK;
}

View File

@ -1,2 +0,0 @@
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("default.asm", 'fasm "%f" "%o" ' .. tup.getconfig("KPACK_CMD"), "wmpx.skn")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

View File

@ -1,33 +0,0 @@
;SKIN (.SKN) - COMPILE WITH FASM
include '../skin.inc'
SKIN_PARAMS \
height = bmp_base.height,\ ; skin height
margins = [5:1:44:1],\ ; margins [left:top:right:bottom]
colors active = [binner=0x6B7DA6:\ ; border inner color
bouter=0x6B7DA6:\ ; border outer color
bframe=0x7D95C1],\ ; border frame color
colors inactive = [binner=0x97A4C1:\ ; border inner color
bouter=0x97A4C1:\ ; border outer color
bframe=0xA4B5D3],\ ; border frame color
dtp = 'default.dtp' ; dtp colors
SKIN_BUTTONS \
close = [-21:3][16:16],\ ; buttons coordinates
minimize = [-39:3][16:16] ; [left:top][width:height]
SKIN_BITMAPS \
left active = bmp_left,\ ; skin bitmaps pointers
left inactive = bmp_left1,\
oper active = bmp_oper,\
oper inactive = bmp_oper1,\
base active = bmp_base,\
base inactive = bmp_base1
BITMAP bmp_left ,'left.bmp' ; skin bitmaps
BITMAP bmp_oper ,'oper.bmp'
BITMAP bmp_base ,'base.bmp'
BITMAP bmp_left1,'left_1.bmp'
BITMAP bmp_oper1,'oper_1.bmp'
BITMAP bmp_base1,'base_1.bmp'

Binary file not shown.

View File

@ -1,11 +0,0 @@
;SYSTEM COLORS (.DTP) - COMPILE WITH FASM
frame dd 0x7D95C1
grab dd 0xb2d1f1
grab_button dd 0x9dbee2
grab_button_text dd 0x5f7aa2
grab_text dd 0x5f7aa2
work dd 0xE8E8E8
work_button dd 0xE8E8E8
work_button_text dd 0x000000
work_text dd 0x000000
work_graph dd 0xAAAAAA

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,4 +0,0 @@
fasm default.dtp.asm default.dtp
fasm default.asm default.skn
kpack default.skn default.skn
pause

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,2 +0,0 @@
if tup.getconfig("NO_FASM") ~= "" then return end
tup.rule("default.asm", 'fasm "%f" "%o" ' .. tup.getconfig("KPACK_CMD"), "mist.skn")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

View File

@ -1,33 +0,0 @@
;SKIN (.SKN) - COMPILE WITH FASM
include 'skin.inc'
SKIN_PARAMS \
height = bmp_base.height,\ ; skin height
margins = [5:1:41:1],\ ; margins [left:top:right:bottom]
colors active = [binner=0xb1b1b1:\ ; border inner color
bouter=0xb1b1b1:\ ; border outer color
bframe=0xf4f4f4],\ ; border frame color
colors inactive = [binner=0xb1b1b1:\ ; border inner color
bouter=0xb1b1b1:\ ; border outer color
bframe=0xf4f4f4],\ ; border frame color
dtp = 'default.dtp' ; dtp colors
SKIN_BUTTONS \
close = [-20:4][12:12],\ ; buttons coordinates
minimize = [-39:4][12:12] ; [left:top][width:height]
SKIN_BITMAPS \
left active = bmp_left,\ ; skin bitmaps pointers
left inactive = bmp_left1,\
oper active = bmp_oper,\
oper inactive = bmp_oper1,\
base active = bmp_base,\
base inactive = bmp_base1
BITMAP bmp_left ,'left.bmp' ; skin bitmaps
BITMAP bmp_oper ,'oper.bmp'
BITMAP bmp_base ,'base.bmp'
BITMAP bmp_left1,'left_1.bmp'
BITMAP bmp_oper1,'oper_1.bmp'
BITMAP bmp_base1,'base_1.bmp'

Binary file not shown.

View File

@ -1,11 +0,0 @@
;SYSTEM COLORS (.DTP) - COMPILE WITH FASM
frame dd 0xf4f4f4
grab dd 0xFFFfff
grab_button dd 0xb1b1b1
grab_button_text dd 0xEEEEEE
grab_text dd 0x606060
work dd 0xf4f4f4
work_button dd 0xebebeb
work_button_text dd 0x606060
work_text dd 0x606060
work_graph dd 0xBBBbbb

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -1,239 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;============================================================================
; 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 equ _#_name
_file::
file _fname
end virtual
load w dword from _file:_bmp.i.biWidth
load h dword from _file:_bmp.i.biHeight
load hsize dword from _file:_bmp.h.bfOffBits
align 4
label _name
.width = w
.height = h
dd w,h
a=hsize+(w*3+(w mod 4))*(h-1)
size = $
repeat h
repeat w
load r from _file:a+0
load g from _file:a+1
load b from _file:a+2
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
__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
dd @f - $ - 4
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
}

View File

@ -1,3 +0,0 @@
fasm default.dtp.asm default.dtp
fasm default.asm default.skn
pause

View File

@ -48,7 +48,6 @@ skinlist = {
"_old/MenuetOS/5.MenuetOS/MenuetOS 5.skn",
"_old/MetalColor/MCBlue/MCBlue.skn",
"_old/MetalColor/MCRed/MCRed.skn",
"_old/mist/mist.skn",
"_old/nix/nix.skn",
"_old/OpusOs_Blue/OpusOs_Blue.skn",
"_old/RoboTech/BRoboTech/BRoboTech.skn",
@ -63,7 +62,6 @@ skinlist = {
"_old/StyleVista/vista_basic_black/vista_basic_black.skn",
"_old/StyleXP/orqua/orqua.skn",
"_old/StyleXP/panther/panther.skn",
"_old/StyleXP/wmpx/wmpx.skn",
"_old/subsilv/subsilv.skn",
"_old/USSR/USSR.skn",
"_old/USSR_2/1.USSR_2/USSR2.skn",