mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-24 09:49:41 +03:00
cmm: editbox convex
git-svn-id: svn://kolibrios.org@6193 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
db17d90b8d
commit
deb780f6ba
@ -107,6 +107,20 @@
|
||||
DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light);
|
||||
}
|
||||
|
||||
:void EditBox(dword edit_box_pointer)
|
||||
{
|
||||
dword x,y,w,h;
|
||||
ESI = edit_box_pointer;
|
||||
x = ESI.edit_box.left;
|
||||
y = ESI.edit_box.top;
|
||||
w = ESI.edit_box.width+1;
|
||||
h = 15;
|
||||
DrawRectangle(x-1, y-1, w+2, h+2, 0xFFFfff);
|
||||
DrawRectangle3D(x-2, y-2, w+2, h+2, 0xDDDddd, 0xffffff);
|
||||
DrawRectangle(x-3, y-3, w+6, h+6, system.color.work_graph);
|
||||
DrawRectangle3D(x-4, y-4, w+8, h+8, system.color.work_dark, system.color.work_light);
|
||||
}
|
||||
|
||||
:void DrawProgressBar(dword st_x, st_y, st_w, st_h, col_fon, col_border, col_fill, col_text, progress_percent)
|
||||
{
|
||||
int progress_w;
|
||||
|
@ -181,20 +181,16 @@ void DrawLoginScreen()
|
||||
DrawBar(0,0, Form.cwidth, Form.cheight, system.color.work);
|
||||
|
||||
WriteText(panel_x,panel_y,0x80,system.color.work_text,"Your Email:");
|
||||
DrawRectangle(panel_x, panel_y+12, PANEL_W,20, system.color.work_graph); //border
|
||||
DrawRectangle3D(panel_x+1, panel_y+13, PANEL_W-2,18, 0xDDDddd, 0xFFFfff); //shadow
|
||||
DrawRectangle(panel_x+2, panel_y+14, PANEL_W-4,16, 0xFFFfff);
|
||||
login_box.left = panel_x+3;
|
||||
login_box.top = panel_y+15;
|
||||
edit_box_draw stdcall(#login_box);
|
||||
EditBox(#login_box);
|
||||
|
||||
WriteText(panel_x,panel_y+40,0x80,system.color.work_text,"Password:");
|
||||
DrawRectangle(panel_x, panel_y+52, PANEL_W,20, system.color.work_graph); //border
|
||||
DrawRectangle3D(panel_x+1, panel_y+53, PANEL_W-2,18, 0xDDDddd, 0xFFFfff); //shadow
|
||||
DrawRectangle(panel_x+2, panel_y+54, PANEL_W-4,16, 0xFFFfff);
|
||||
pass_box.left = panel_x+3;
|
||||
pass_box.top = panel_y+55;
|
||||
edit_box_draw stdcall(#pass_box);
|
||||
EditBox(#pass_box);
|
||||
|
||||
if (!aim)
|
||||
{
|
||||
|
@ -15,8 +15,7 @@
|
||||
?define INTRO_TEXT_1 "‡¤¥áì ¡ã¤¥â ®â®¡à ¦ âìáï ᯨ᮪"
|
||||
?define INTRO_TEXT_2 "¢¨àâã «ìëå ¤¨áª®¢ ¢ á¨á⥬¥."
|
||||
?define INTRO_TEXT_3 "<EFBFBD>®¯à®¡ã©â¥ ¤®¡ ¢¨âì ®¤¨..."
|
||||
?define INTRO_TEXT_4 "<EFBFBD> §¬¥à:"
|
||||
|
||||
?define SIZE_TEXT "<EFBFBD> §¬¥à:"
|
||||
?define NOTIFY_TEXT_NO_DISK "'„«ï ç « ¤®¡ ¢ì⥠å®âï ¡ë ®¤¨ ¤¨áª' -W"
|
||||
?define NOTIFY_TEXT_DISK_LIMIT "'„®á⨣ã⠯।¥« ª®«¨ç¥á⢠¢¨àâã «ìëå ¤¨áª®¢' -W"
|
||||
?define FREE_RAM_TEXT "<EFBFBD> §¬¥à ᢮¡®¤®© ®¯¥à ⨢®© ¯ ¬ïâ¨: "
|
||||
@ -31,8 +30,7 @@
|
||||
?define INTRO_TEXT_1 " There will be list of mounted"
|
||||
?define INTRO_TEXT_2 " virtual disks."
|
||||
?define INTRO_TEXT_3 " Try to add one..."
|
||||
?define INTRO_TEXT_4 "Size:"
|
||||
|
||||
?define SIZE_TEXT "Size:"
|
||||
?define NOTIFY_TEXT_NO_DISK "'You need to have at least one disk' -W"
|
||||
?define NOTIFY_TEXT_DISK_LIMIT "'Reached the limit of the number of virtual disks' -W"
|
||||
?define FREE_RAM_TEXT "Free RAM size: "
|
||||
@ -48,12 +46,12 @@ char selected;
|
||||
proc_info Form;
|
||||
|
||||
unsigned char icons[] = FROM "icons.raw";
|
||||
#define TOPPANELH 50
|
||||
#define TOPPANELH 54
|
||||
#define BOTPANELH 20
|
||||
|
||||
int mouse_dd;
|
||||
char new_disk_size[5];
|
||||
edit_box edit_disk_size= {50,0,5,0xffffff,0x94AECE,0x000000,0xffffff,0,4,#new_disk_size,#mouse_dd, 1000000000000010b};
|
||||
edit_box edit_disk_size= {50,0,7,0xffffff,0x94AECE,0xFFFfff,0xffffff,0,4,#new_disk_size,#mouse_dd, 1000000000000010b};
|
||||
|
||||
void Main_Window()
|
||||
{
|
||||
@ -63,7 +61,7 @@ void Main_Window()
|
||||
mem_Init();
|
||||
load_dll(boxlib, #box_lib_init,0);
|
||||
GetSizeDisk();
|
||||
edit_disk_size.left = strlen(INTRO_TEXT_4)*6 + 10;
|
||||
edit_disk_size.left = strlen(SIZE_TEXT)*9 + 10;
|
||||
SetEventMask(0x27);
|
||||
loop()
|
||||
{
|
||||
@ -137,14 +135,15 @@ void Main_Window()
|
||||
|
||||
DrawBar(0,0, Form.cwidth,TOPPANELH, system.color.work);
|
||||
DrawBar(0,TOPPANELH, Form.cwidth,1, system.color.work_graph);
|
||||
WriteText(6, 9, 0x80, system.color.work_text, INTRO_TEXT_4);
|
||||
WriteText(edit_disk_size.left + edit_disk_size.width + 8, 9, 0x80, system.color.work_text, "MB.");
|
||||
WriteText(6, 6, 0x90, system.color.work_text, SIZE_TEXT);
|
||||
WriteText(edit_disk_size.left + edit_disk_size.width + 12, 6, 0x90, system.color.work_text, "MB.");
|
||||
edit_box_draw stdcall (#edit_disk_size);
|
||||
EditBox(#edit_disk_size);
|
||||
for (i=0, x=6; i<2; i++, x+=strlen(but_text[i])*6+37)
|
||||
{
|
||||
DefineButton(x,25, strlen(but_text[i])*6+28,19, 10+i, system.color.work_button);
|
||||
_PutImage(x+3,28, 14,14, i*14*14*3+#icons);
|
||||
WriteText(x+22,31, 0x80, system.color.work_button_text, but_text[i]);
|
||||
DefineButton(x,29, strlen(but_text[i])*6+28,19, 10+i, system.color.work_button);
|
||||
_PutImage(x+3,32, 14,14, i*14*14*3+#icons);
|
||||
WriteText(x+22,35, 0x80, system.color.work_button_text, but_text[i]);
|
||||
}
|
||||
GetDisks();
|
||||
DrawTmpDisks();
|
||||
@ -208,7 +207,7 @@ void DrawTmpDisks()
|
||||
byte i, real_id;
|
||||
int FreeRAM=GetFreeRAM()/1024;
|
||||
|
||||
DrawBar(0,51, Form.cwidth,Form.cheight-TOPPANELH-BOTPANELH-2, 0xFFFFFF);
|
||||
DrawBar(0,TOPPANELH+1, Form.cwidth,Form.cheight-TOPPANELH-BOTPANELH-2, 0xFFFFFF);
|
||||
DrawBar(0,Form.cheight-BOTPANELH-1, Form.cwidth,1, system.color.work_graph);
|
||||
DrawBar(0,Form.cheight-BOTPANELH, Form.cwidth,BOTPANELH, system.color.work);
|
||||
strcpy(#free_ram_text, FREE_RAM_TEXT);
|
||||
|
Loading…
Reference in New Issue
Block a user