Subversion Repositories Kolibri OS

Rev

Rev 977 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
975 leency 1
#include "imgs\logo.txt"
2
 
976 leency 3
?define add_new_path 1
4
?define go_back 2
5
 
984 leency 6
?define ONLY_SHOW	0
7
?define WITH_REDRAW	1
8
?define ONLY_OPEN	2
9
 
10
?define REDRAW	1
11
?define ANIM	2
12
?define NOTIP	3
13
 
975 leency 14
/*
15
//IPC
16
#include "lib\Nable_lib.h--"
17
#include "lib\ipc.h--"
18
 
19
int pLoadedImage;
20
void GetImage(dword ipath)
21
{
22
	IF (pLoadedImage) free(pLoadedImage);
23
	pLoadedImage=loadimage_viaIPC(ipath, #CurrentImage);
24
	SetEventMask(100111b); //restore normal event mask
25
}
26
 
27
*/
28
 
29
 
30
void authors()
31
{
32
	mouse mm;
33
	byte letitclose=0;
34
	SetEventMask(100111b);
35
	loop() switch(WaitEvent())
36
	{
37
		case evMouse:
38
				mm.get();
39
				//кульно
40
				IF (mm.x>85) && (mm.x<155) && (mm.y>190) && (mm.y<190+22)
41
				IF (mm.lkm) {DrawRegion_3D(86,191,68,20,0xC7C7C7,0xFFFFFF); letitclose=1;}
42
				ELSE {IF (letitclose) {DrawRegion_3D(86,191,68,20,0xFFFFFF,0xC7C7C7); Pause(7); ExitProcess();}}
43
				ELSE IF (letitclose) {letitclose=0; DrawRegion_3D(86,191,68,20,0xFFFFFF,0xC7C7C7);}
44
				break;
45
		case evButton: ExitProcess();
46
		case evKey: IF (GetKey()==27) ExitProcess(); break;
47
		case evReDraw:
48
			WindowRedrawStatus(1);
49
			DefineAndDrawWindow(500,200,181,256,0x34,0x10EFEBEF,0,0,"About Eolite");
50
			DrawBar(0,0,172,50,0x8494C4); //голубое сзади
51
			PutPaletteImage(#logo,85,85,48,7,#logo_pal);
984 leency 52
			WriteText(33,100,0x80,0xBF40BF,"Eolite v0.98.5 RC2",0);
975 leency 53
			WriteText(55,120,0x80,0,"Developers:",0);
54
			WriteText(39,130,0x80,0,"Leency & Veliant",0);
55
			WriteText(30,140,0x80,0,"Diamond, Lrz, Nable",0);
56
			WriteText(21,160,0x80,0,"Made using C-- in 2008",0);
57
			WriteText(18,170,0x80,0,"Visit www.kolibrios.org",0);
58
			DrawFlatButton(85,190,70,22,0,0xE4DFE1, "Close");
59
			WindowRedrawStatus(2);
60
	}
61
}
62
 
63
 
976 leency 64
void HistoryPath(byte action)
65
{
977 leency 66
	if (action==add_new_path)
976 leency 67
	{
68
		IF (strcmp(#PathHistory+find_symbol(#PathHistory,'|'),#path)==0) return;
977 leency 69
		IF (strlen(#PathHistory)+strlen(#path)>2560) {copystr(#PathHistory+1024,#PathHistory); copystr("/",#PathHistory+strlen(#PathHistory));}//0_o
976 leency 70
		copystr("|",#PathHistory+strlen(#PathHistory));
71
		copystr(#path,#PathHistory+strlen(#PathHistory));
72
	}
977 leency 73
	if (action==go_back)
976 leency 74
	{
977 leency 75
		i=strlen(#PathHistory)-1;
976 leency 76
		WHILE (PathHistory[i]<>'|') { i--; };
77
		IF (i>0) PathHistory[i]=0x00;
78
		WHILE (PathHistory[i]<>'|')	{ copystr(#PathHistory[i],#path); i--;	}
79
		IF (i>0) PathHistory[i]=0x00;
80
	}
81
}
82
 
83
 
975 leency 84
/*типа анимация
85
WHILE (m.lkm==1)
86
{
87
	Pause(10);
88
	PutPaletteImage(p*16*15+#ficons,16,15,100,350,#ficons_pal);
89
	IF (p>21) p=0; ELSE p++;
90
	m.get();
91
}*/
92
 
93
 
94
dword onLeft(dword right,left) {EAX=Form.width-right-left;}
984 leency 95
dword onTop(dword down,up) {EAX=Form.height-GetSkinWidth()-down-up;}
975 leency 96
 
97
 
98
dword ConvertSize(dword bytes)
99
{
984 leency 100
	byte size_prefix[8], temp[3];
975 leency 101
	IF (bytes>=1073741824) copystr(" Gb",#temp);
102
	ELSE IF (bytes>=1048576) copystr(" Mb",#temp);
103
	ELSE IF (bytes>=1024) copystr(" Kb",#temp);
104
	ELSE copystr(" b ",#temp);
105
	WHILE (bytes>1023) bytes/=1024;
106
	copystr(IntToStr(bytes),#size_prefix);
107
	copystr(#temp,#size_prefix+strlen(#size_prefix));
108
	EAX=#size_prefix;
109
}