Subversion Repositories Kolibri OS

Rev

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