rb - multilanguage interface

git-svn-id: svn://kolibrios.org@3075 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2012-12-05 15:13:15 +00:00
parent 5fa6bcf144
commit fa50e68311
5 changed files with 44 additions and 20 deletions

Binary file not shown.

View File

@ -1,7 +0,0 @@
del @rb
..\C--\C-- rb
..\C--\kpack rb.com
rename rb.com @rb
del warning.txt
del rb.com
pause

View File

@ -0,0 +1,9 @@
del lang.h--
echo #define LANG_ENG 1 >lang.h--
..\C--\C-- rb.c
del @rb
del warning.txt
del lang.h--
rename rb.com @rb
..\C--\kpack @rb
pause

View File

@ -0,0 +1,9 @@
del lang.h--
echo #define LANG_RUS 1 >lang.h--
..\C--\C-- rb.c
del @rb
del warning.txt
del lang.h--
rename rb.com @rb
..\C--\kpack @rb
pause

View File

@ -1,21 +1,34 @@
//@RB - v0.5 //@RB - v0.6
#include "..\lib\kolibri.h" #include "..\lib\kolibri.h"
#include "..\lib\figures.h" #include "..\lib\figures.h"
#include "..\lib\file_system.h" #include "..\lib\file_system.h"
#include "lang.h--"
#define ITEM_HEIGHT 18 #ifdef LANG_RUS
#define ITEM_WIDTH 138 #define ITEM_HEIGHT 18
#define ITEM_WIDTH 138
char *ITEMS_LIST[]={ char *ITEMS_LIST[]={
"Сменить тему окон "w, "/sys/SKINSEL", 0, "‘¬¥­¨âì ⥬㠮ª®­ ", "/sys/SKINSEL", 0,
"Выбрать цвет фона "w, "/sys/media/palitra", 0, "‚ë¡à âì 梥â ä®­  ", "/sys/media/palitra", 0,
"Управление иконками "w, "/sys/ICON", 0, "“¯à ¢«¥­¨¥ ¨ª®­ª ¬¨ ", "/sys/ICON", 0,
"Настройка устройств "w, "/sys/SETUP", 0, "<EFBFBD> áâனª  ãáâனá⢠", "/sys/SETUP", 0,
"Обновить стол "w, "/sys/REFRSCRN", 0, "Ž¡­®¢¨âì á⮫ ", "/sys/REFRSCRN", 0,
"Процессы "w, "/sys/CPU", 0, "<EFBFBD>à®æ¥ááë ", "/sys/CPU", 0,
0}; 0};
#else
#define ITEM_HEIGHT 18
#define ITEM_WIDTH 122
char *ITEMS_LIST[]={
"Window skin ", "/sys/SKINSEL", 0,
"Background ", "/sys/media/palitra", 0,
"Icon manager ", "/sys/ICON", 0,
"Device setup ", "/sys/SETUP", 0,
"Refresh desktop ", "/sys/REFRSCRN", 0,
"Processes ", "/sys/CPU", 0,
0};
#endif
dword stak[100]; dword stak[100];
@ -66,7 +79,7 @@ void window()
//feel clicking //feel clicking
DrawBar(1, items_cur*ITEM_HEIGHT+2, ITEM_WIDTH-1, ITEM_HEIGHT-2, sc.work_graph); DrawBar(1, items_cur*ITEM_HEIGHT+2, ITEM_WIDTH-1, ITEM_HEIGHT-2, sc.work_graph);
WriteText(8,items_cur*ITEM_HEIGHT+6,0x80,sc.work_button_text,ITEMS_LIST[items_cur*3],0); WriteText(8,items_cur*ITEM_HEIGHT+6,0x80,sc.work_button_text,ITEMS_LIST[items_cur*3],0);
Pause(4); pause(4);
ItemProcess(items_cur); ItemProcess(items_cur);
} }