Eolite: small changes

git-svn-id: svn://kolibrios.org@2695 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2012-05-27 11:37:20 +00:00
parent ddf1ff4eea
commit 0800eed3a9
4 changed files with 17 additions and 16 deletions

View File

@ -411,19 +411,6 @@ void KEdit()
}
inline fastcall void TVScroll() { //Ïðîêðóòêà
dword on_y;
IF (count<=0) {DrawFlatButton(onLeft(27,0),57,16,onTop(22,58),0,0xE4DFE1,""); return;}
on_y = za_kadrom * onTop(22,57) / count +57;
scroll_size=onTop(22,57) * but_num - but_num / count;
IF (scroll_size<20) scroll_size = 20; //óñòàíàâëèâàåì ìèíèìàëüíûé ðàçìåð ñêðîëëà
IF (scroll_size>onTop(22,57)-on_y+56) || (za_kadrom+but_num>=count) on_y=onTop(23+scroll_size,0); //äëÿ áîëüøîãî ñïèñêà
DrawFlatButton(onLeft(27,0),on_y,16,scroll_size,0,0xE4DFE1,"");//ïîëçóíîê
DrawBar(onLeft(26,0),57,15,on_y-57,0xCED0D0);//ïîëå äî ïîëçóíêà
DrawBar(onLeft(26,0),on_y+scroll_size+1,15,onTop(22,57)-scroll_size-on_y+56,0xCED0D0); //ïîëå ïîñëå ïîëçóíêà
}
void FileList_ReDraw(int curbtn_)
{
if (curbtn_<=0) //ââåðõ
@ -699,7 +686,7 @@ void Paste()
void Tip(int y, dword caption, id, arrow)
{
DrawBar(17,y,160,17,0xE4DFE1); //ñåðîå ñâåðõó
WriteText(25,y+5,0x80,0,caption,0); //text Goto:
WriteText(25,y+5,0x80,0,caption,0);
IF (id<>0) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0xE4DFE1); //êíîïà äëÿ ñòðåëêè
WriteText(165,y+5,0x80,0,arrow,0); //ñòðåëêà âíèç
DrawBar(17,y+17,160,1,0x94AECE); //ïîä÷¸ðêèâàíèå

View File

@ -37,7 +37,9 @@ void about_dialog()
DefineAndDrawWindow(600,150,181,256,0x34,0x10EFEBEF,0,0,"About Eolite");
DrawBar(0,0,172,50,0x8494C4); //ãîëóáîå ñçàäè
PutPaletteImage(#logo,85,85,43,7,#logo_pal);
WriteText(51,100,0x80,0xBF40BF,"Eolite v1.22",0);
WriteText(46,100,0x90,0xBF40BF,"Eolite v1.22",0);
$add ebx, 1<<16
$int 0x40
WriteText(55,120,0x80,0,"Developers:",0);
WriteText(39,130,0x80,0,"Leency & Veliant",0);
WriteText(45,140,0x80,0,"KolibriOS Team",0);

View File

@ -20,7 +20,7 @@ dword Put_icon(dword extension, yy)
(!strcmp(extension,"ttf")) || (!strcmp(extension,"fon")) {fnum = 10; ftype="Font";}
IF (!strcmp(extension,"asm")) {fnum = 11; ftype="Source";}
IF (!strcmp(extension,"skn")) {fnum = 13; ftype="Skin";}
IF (!strcmp(extension,"djvu")) || (!strcmp(extension,"pdf")) {fnum = 15; ftype="Book";}
IF (!strcmp(extension,"djvu")) || (!strcmp(extension,"pdf")) || (!strcmp(extension,"fb2")) {fnum = 15; ftype="Book";}
IF (!strcmp(extension,"nes")) {fnum = 18; ftype="Cartridge";}
IF (!strcmp(extension,"img")) || (!strcmp(extension,"ima")) {fnum = 21; ftype="Image";}
IF (!strcmp(extension,"dll")) || (!strcmp(extension,"obj")) {fnum = 22; ftype="Library";}

View File

@ -24,3 +24,15 @@ dword ConvertSize(dword bytes)
copystr(#temp,#size_prefix+strlen(#size_prefix));
EAX=#size_prefix;
}
inline fastcall void TVScroll() { //Ïðîêðóòêà
dword on_y;
IF (count<=0) {DrawFlatButton(onLeft(27,0),57,16,onTop(22,58),0,0xE4DFE1,""); return;}
on_y = za_kadrom * onTop(22,57) / count +57;
scroll_size=onTop(22,57) * but_num - but_num / count;
IF (scroll_size<20) scroll_size = 20; //óñòàíàâëèâàåì ìèíèìàëüíûé ðàçìåð ñêðîëëà
IF (scroll_size>onTop(22,57)-on_y+56) || (za_kadrom+but_num>=count) on_y=onTop(23+scroll_size,0); //äëÿ áîëüøîãî ñïèñêà
DrawFlatButton(onLeft(27,0),on_y,16,scroll_size,0,0xE4DFE1,"");//ïîëçóíîê
DrawBar(onLeft(26,0),57,15,on_y-57,0xCED0D0);//ïîëå äî ïîëçóíêà
DrawBar(onLeft(26,0),on_y+scroll_size+1,15,onTop(22,57)-scroll_size-on_y+56,0xCED0D0); //ïîëå ïîñëå ïîëçóíêà
}