Subversion Repositories Kolibri OS

Rev

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

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