diff --git a/data/eng/settings/menu.dat b/data/eng/settings/menu.dat index 191b6487a5..c5b4019be4 100644 --- a/data/eng/settings/menu.dat +++ b/data/eng/settings/menu.dat @@ -1,119 +1,119 @@ #0 **** MAIN -Game Center |allgames -Demos > |@1 -Graphics > |@3 -Multimedia > |@4 -Development > |@5 -System > |@7 -Data processing > |@10 -Network > |@11 -Other > |@14 -Help |docpack -Run |run -Shutdown |end +23 Game Center |allgames +00 2D Demos > |@1 +00 3D Demos > |@2 +00 Graphics > |@3 +00 Multimedia > |@4 +00 Development > |@5 +00 System > |@7 +00 Data processing > |@10 +00 Network > |@11 +00 Other > |@14 +18 Help |docpack +53 Run |run +04 Shutdown |end #1 **** DEMOS -3D > |@2 -Circle |demos/circle -Fractal |demos/tinyfrac -Color demo |demos/colorref -Eyes |demos/eyes -Tube |demos/tube -Plasma |demos/plasma -Spiral |demos/spiral -Moveback |demos/movback -TranTest |demos/trantest -WEB |demos/web -FireWork |demos/firework -UnvWater |demos/unvwater +16 Circle |demos/circle +16 Fractal |demos/tinyfrac +16 Color demo |demos/colorref +16 Eyes |demos/eyes +16 Tube |demos/tube +16 Plasma |demos/plasma +16 Spiral |demos/spiral +16 Moveback |demos/movback +16 TranTest |demos/trantest +16 WEB |demos/web +16 FireWork |demos/firework +16 UnvWater |demos/unvwater #2 **** 3D -ScreenSaver |3d/crownscr -3D-labyrinth |3d/free3d04 -3D-cube |3d/3dcube2 -Ray tracing |3d/ray -View3DS |3d/view3ds -Gears |3d/gears -3D-waved area |3d/3dwav +15 ScreenSaver |3d/crownscr +15 3D-labyrinth |3d/free3d04 +15 3D-cube |3d/3dcube2 +15 Ray tracing |3d/ray +15 View3DS |3d/view3ds +15 Gears |3d/gears +15 3D-waved area |3d/3dwav #3 **** GRAPHICS -Kolibri Image Viewer |media/kiv -zSea* Image Viewer |/kolibrios/media/zsea/zsea -Animage |media/animage -Image Filtering |media/imgf/imgf -Palitra |media/palitra -Pipet |develop/pipet +06 Kolibri Image Viewer |media/kiv +06 zSea* Image Viewer |/kolibrios/media/zsea/zsea +38 Animage |media/animage +40 Image Filtering |media/imgf/imgf +52 Palitra |media/palitra +39 Pipet |develop/pipet #4 **** MULTIMEDIA -Pixie AudioPlayer |media/pixie -AC97SND Audioplayer |media/ac97snd -Fplay* Video player |/kolibrios/media/fplay -MidAMP |media/midamp +53 Pixie AudioPlayer |media/pixie +53 AC97SND Audioplayer |media/ac97snd +11 Fplay* Video player |/kolibrios/media/fplay +07 MidAMP |media/midamp #5 **** DEV -KPack Archiver |kpack -Flat Assembler |develop/fasm -Diff Tool |develop/diff -Debug Board |develop/board -Debugger |develop/mtdbg -Base Converter |develop/h2d2b -Character table |develop/ASCIIVju -Key ASCII-codes |develop/keyascii -Key SCAN-codes |develop/scancode +09 KPack Archiver |kpack +54 Flat Assembler |develop/fasm +20 Diff Tool |develop/diff +16 Debug Board |develop/board +16 Debugger |develop/mtdbg +34 Base Converter |develop/h2d2b +59 Character table |develop/ASCIIVju +59 Key ASCII-codes |develop/keyascii +59 Key SCAN-codes |develop/scancode #6 **** EMUL -DOSBox* |/kolibrios/emul/DosBox/dosbox -e80* (ZX Spectrum) |/kolibrios/emul/e80/e80 -FCE Ultra* (NES) |/kolibrios/emul/fceu/fceu -Gameboy Color* |/kolibrios/emul/gameboy -ScummVM* |/kolibrios/emul/scummvm -ZSNES* Super Nintendo |/kolibrios/emul/zsnes/zsnes +24 DOSBox* |/kolibrios/emul/DosBox/dosbox +16 e80* (ZX Spectrum) |/kolibrios/emul/e80/e80 +16 FCE Ultra* (NES) |/kolibrios/emul/fceu/fceu +16 Gameboy Color* |/kolibrios/emul/gameboy +16 ScummVM* |/kolibrios/emul/scummvm +16 ZSNES* Super Nintendo |/kolibrios/emul/zsnes/zsnes #7 **** SYSTEM -File Management > |@8 -Accessibility > |@9 -Hotkeys |mykey -Debug board |develop/board -Clipboard viewer |develop/clipview -Calendar |calendar -Terminal |terminal -Task manager |cpu -System panel |syspanel +00 File Management > |@8 +00 Accessibility > |@9 +59 Hotkeys |mykey +16 Debug board |develop/board +56 Clipboard viewer |develop/clipview +16 Calendar |calendar +24 Terminal |terminal +48 Task manager |cpu +25 System panel |syspanel #8 **** FM -KFAR |File Managers/kfar -fNav |File Managers/fNav/fNav -KFM2 |File Managers/kfm2 -Eolite |File Managers/Eolite -Virtual disks |tmpdisk -Shell |shell -Save ramdisk |rdsave +24 KFAR |File Managers/kfar +20 fNav |File Managers/fNav/fNav +50 KFM2 |File Managers/kfm2 +50 Eolite |File Managers/Eolite +51 Virtual disks |tmpdisk +24 Shell |shell +05 Save ramdisk |rdsave #9 **** ACCESSIBILITY -Screen magnifier |magnify -Screen keyboard |zkey +49 Screen magnifier |magnify +59 Screen keyboard |zkey #10 **** DATA PROCESSING -Calculator |calc -Tinypad |tinypad -CodeEdit |develop/cedit -Table processor |table -Graph builder |graph -Hex editor |develop/heed -Unarchiver Unz |unz +16 Calculator |calc +03 Tinypad |tinypad +28 CodeEdit |develop/cedit +21 Table processor |table +47 Graph builder |graph +59 Hex editor |develop/heed +09 Unarchiver Unz |unz #11 **** NETWORK -Clients > |@12 -Servers > |@13 -Network devices |network/netcfg -Network status |network/netstat +00 Clients > |@12 +00 Servers > |@13 +25 Network devices |network/netcfg +25 Network status |network/netstat #12 **** CLIENTS -IRC |network/ircc -FTP |network/ftpc -TFTP |network/tftpc -Ping |network/ping -Telnet |network/telnet -Synergy |network/synergyc -DNS lookup |network/nslookup -VNC Viewer |network/vncc -Downloader |network/downloader -Text-based browser |network/webview +16 IRC |network/ircc +16 FTP |network/ftpc +50 TFTP |network/tftpc +24 Ping |network/ping +24 Telnet |network/telnet +24 Synergy |network/synergyc +24 DNS lookup |network/nslookup +16 VNC Viewer |network/vncc +33 Downloader |network/downloader +12 Text-based browser |network/webview #13 **** SERVERS -FTP |network/ftpd +16 FTP |network/ftpd #14 **** OTHER -Emulators* > |@6 -Analog clock |aclock -Binary clock |demos/bcdclk -Timer |timer -Screenshooter |scrshoot -RTF reader |rtfread +00 Emulators* > |@6 +16 Analog clock |aclock +16 Binary clock |demos/bcdclk +16 Timer |timer +45 Screenshooter |scrshoot +03 RTF reader |rtfread ## diff --git a/data/rus/settings/menu.dat b/data/rus/settings/menu.dat index d45a98d470..951adef1ae 100644 --- a/data/rus/settings/menu.dat +++ b/data/rus/settings/menu.dat @@ -1,117 +1,117 @@ #0 -Игровой центр |allgames -Демки > |@1 -Графика > |@3 -Звук и видео > |@4 -Разработка > |@5 -Система > |@7 -Офис > |@10 -Сеть > |@11 -Разное > |@14 -Документация |docpack -Запуск программы |run -Завершение работы |end +23 Игровой центр |allgames +00 Демки > |@1 +00 Графика > |@3 +00 Звук и видео > |@4 +00 Разработка > |@5 +00 Система > |@7 +00 Офис > |@10 +00 Сеть > |@11 +00 Разное > |@14 +18 Документация |docpack +53 Запуск программы |run +04 Завершение работы |end #1 ==Демки -Трёхмерные > |@2 -Кружок |demos/circle -Фрактал Мандельброта |demos/tinyfrac -Цвета |demos/colorref -Глаза |demos/eyes -Труба |demos/tube -Plasma |demos/plasma -Спираль |demos/spiral -Moveback |demos/movback -TranTest |demos/trantest -Паутинка |demos/web -Фейерверк |demos/firework -UnvWater |demos/unvwater +00 Трёхмерные > |@2 +16 Кружок |demos/circle +16 Фрактал Мандельброта |demos/tinyfrac +16 Цвета |demos/colorref +16 Глаза |demos/eyes +16 Труба |demos/tube +16 Plasma |demos/plasma +16 Спираль |demos/spiral +16 Moveback |demos/movback +16 TranTest |demos/trantest +16 Паутинка |demos/web +16 Фейерверк |demos/firework +16 UnvWater |demos/unvwater #2 ==3D -Скринсейвер |3d/crownscr -3D-Лабиринт |3d/free3d04 -3D-Куб |3d/3dcube2 -Трассировка лучей |3d/ray -Просмотрщик 3DS |3d/view3ds -Шестерёнки |3d/gears -3D-Волны |3d/3dwav +15 Скринсейвер |3d/crownscr +15 3D-Лабиринт |3d/free3d04 +15 3D-Куб |3d/3dcube2 +15 Трассировка лучей |3d/ray +15 Просмотрщик 3DS |3d/view3ds +15 Шестерёнки |3d/gears +15 3D-Волны |3d/3dwav #3 ==Графика -Просмотр фото KIV |media/kiv -Просмотр фото zSea |/kolibrios/media/zsea/zsea -Редактор Animage |media/animage -Наложение фильтров |media/imgf/imgf -Палитра |media/palitra -Пипетка |develop/pipet +06 Просмотр фото KIV |media/kiv +06 Просмотр фото zSea |/kolibrios/media/zsea/zsea +38 Редактор Animage |media/animage +40 Наложение фильтров |media/imgf/imgf +52 Палитра |media/palitra +39 Пипетка |develop/pipet #4 ==Звук и видео -Аудиоплеер Pixie |media/pixie -Аудиоплеер AC97SND |media/ac97snd -Видеоплеер Fplay |/kolibrios/media/fplay -Midi-плеер |media/midamp -Детское пианино |media/piano +53 Аудиоплеер Pixie |media/pixie +53 Аудиоплеер AC97SND |media/ac97snd +11 Видеоплеер Fplay |/kolibrios/media/fplay +07 Midi-плеер |media/midamp +07 Детское пианино |media/piano #5 ==Разработка -Упаковщик KPack |kpack -Flat Assembler |develop/fasm -Доска отладки |develop/board -HEX-редактор |develop/heed -Diff tool |develop/diff -Отладчик |develop/mtdbg -Hex2Dec2Bin |develop/h2d2b -Таблица символов |develop/ASCIIVju -ASCII-коды |develop/keyascii -SCAN-коды |develop/scancode +09 Упаковщик KPack |kpack +54 Flat Assembler |develop/fasm +16 Доска отладки |develop/board +59 HEX-редактор |develop/heed +20 Diff tool |develop/diff +16 Отладчик |develop/mtdbg +34 Hex2Dec2Bin |develop/h2d2b +59 Таблица символов |develop/ASCIIVju +59 ASCII-коды |develop/keyascii +59 SCAN-коды |develop/scancode #6 ==Эмуляторы -DOSBox |/kolibrios/emul/DosBox/dosbox -e80 (ZX Spectrum) |/kolibrios/emul/e80/e80 -FCE Ultra - NES |/kolibrios/emul/fceu/fceu -ZSNES Super Nintendo |/kolibrios/emul/zsnes/zsnes -ScummVM |/kolibrios/emul/scummvm +24 DOSBox |/kolibrios/emul/DosBox/dosbox +16 e80 (ZX Spectrum) |/kolibrios/emul/e80/e80 +16 FCE Ultra - NES |/kolibrios/emul/fceu/fceu +16 ZSNES Super Nintendo |/kolibrios/emul/zsnes/zsnes +16 ScummVM |/kolibrios/emul/scummvm #7 ==Система -Файловые менеджеры > |@8 -Спец. возможности > |@9 -Календарь |calendar -Терминал |terminal -Виртуальные диски |tmpdisk -Консоль SHELL |shell -Сохранение образа |rdsave -Системная панель |syspanel +00 Файловые менеджеры > |@8 +00 Спец. возможности > |@9 +16 Календарь |calendar +24 Терминал |terminal +51 Виртуальные диски |tmpdisk +24 Консоль SHELL |shell +05 Сохранение образа |rdsave +25 Системная панель |syspanel #8 ==Система > ФМ -KFAR |File Managers/kfar -fNav |File Managers/fNav/fNav -KFM2 |File Managers/kfm2 -Eolite |File Managers/Eolite +24 KFAR |File Managers/kfar +20 fNav |File Managers/fNav/fNav +50 KFM2 |File Managers/kfm2 +50 Eolite |File Managers/Eolite #9 ==Система > Спец.возможности -Экранная лупа |magnify -Экранная клавиатура |zkey +49 Экранная лупа |magnify +59 Экранная клавиатура |zkey #10 ==Офис -Калькулятор |calc -Редактор Tinypad |tinypad -Редактор CodeEdit |develop/cedit -Табличный процессор |table -Построение графиков |graph -Просмотр RTF |rtfread +16 Калькулятор |calc +03 Редактор Tinypad |tinypad +28 Редактор CodeEdit |develop/cedit +21 Табличный процессор |table +47 Построение графиков |graph +03 Просмотр RTF |rtfread #11 ==Сеть -Серверы > |@12 -Клиенты > |@13 -Настройки сети |network/netcfg -Статус подключения |network/netstat +00 Серверы > |@12 +00 Клиенты > |@13 +25 Настройки сети |network/netcfg +25 Статус подключения |network/netstat #12 ==Сеть > Серверы -FTP daemon |network/ftpd +16 FTP daemon |network/ftpd #13 ==Сеть > Клиенты -IRC клиент |network/ircc -FTP клиент |network/ftpc -TFTP клиент |network/tftpc -Ping |network/ping -Telnet |network/telnet -Synergy клиент |network/synergyc -DNS lookup |network/nslookup -VNC Клиент |network/vncc -Интернет загрузчик |network/downloader -Браузер WebView |network/webview +16 IRC клиент |network/ircc +16 FTP клиент |network/ftpc +50 TFTP клиент |network/tftpc +24 Ping |network/ping +24 Telnet |network/telnet +24 Synergy клиент |network/synergyc +24 DNS lookup |network/nslookup +16 VNC Клиент |network/vncc +33 Интернет загрузчик |network/downloader +12 Браузер WebView |network/webview #14 ==Разное -Эмуляторы > |@6 -Создание скриншотов |scrshoot -Аналоговые часы |aclock -Таблица Менделеева |period -Тренажёр KJ|ABuIIIA |games/klavisha -Бинарные часы |demos/bcdclk -Таймер |timer -Разархиватор Unz |unz +00 Эмуляторы* > |@6 +45 Создание скриншотов |scrshoot +16 Аналоговые часы |aclock +16 Таблица Менделеева |period +16 Тренажёр KJ|ABuIIIA |games/klavisha +16 Бинарные часы |demos/bcdclk +16 Таймер |timer +09 Разархиватор Unz |unz ## diff --git a/programs/system/menu/trunk/menu.asm b/programs/system/menu/trunk/menu.asm index d6c92953a6..066adeedb0 100644 --- a/programs/system/menu/trunk/menu.asm +++ b/programs/system/menu/trunk/menu.asm @@ -21,7 +21,7 @@ ; Compile with FASM for Kolibri ;****************************************************************************** BTN_HEIGHT = 26 - BTN_WIDTH = 178 + BTN_WIDTH = 198 ; was 178 TXT_Y = (BTN_HEIGHT)/2-7 FONT_TYPE = 0x90000000 @@ -43,7 +43,13 @@ ;------------------------------------------------------------------------------ include "..\..\..\macros.inc" include "..\..\..\gui_patterns.inc" -;include "../../../debug.inc" ; debug macros +; Formatted debug output: +include "..\..\..\debug-fdo.inc" +__DEBUG__ = 1 ; 0 - disable debug output / 1 - enable debug output +__DEBUG_LEVEL__ = DBG_ERR ; set the debug level +DBG_ALL = 0 ; all messages +DBG_INFO = 1 ; info and errors +DBG_ERR = 2 ; only errors ;------------------------------------------------------------------------------ align 4 conversion_ASCII_to_HEX: @@ -80,6 +86,8 @@ START: ; start of execution mcall 30, 1, default_dir + ; DEBUGF DBG_INFO, "MENU START! sc.work = %x\n", [sc.work] + mov esi,bootparam cmp [esi],byte 0 je .no_boot_parameters @@ -144,6 +152,52 @@ align 4 mov [screen_size],eax mcall 48,3,sc,sizeof.system_colors ; load system colors + + ; DEBUGF DBG_INFO, "sc.work = %x\n", [sc.work] + + mov eax, 68 + mov ebx, 22 + mov ecx, icons_resname + mov esi, 0 ; SHM_READ + mcall + test eax, eax + jnz @f + mov [no_shared_resources], 1 + DEBUGF DBG_ERR, "Failed to get ICONS18W from @RESHARE.\nTry rerun @RESHARE.\n" + jmp .no_res +@@: + mov [shared_icons_ptr], eax + mov [shared_icons_size], edx + ; copy shared icons to active icons + mov esi, eax + mov ecx, edx + mcall 68, 12, edx + mov edi, eax + mov [shared_icons_active_ptr], eax + shr ecx, 2 ; /= 4; ecx = how many dwords in shared icons + cld + rep movsd + ; change work color to work_light color + mov esi, [shared_icons_active_ptr] + xor ecx, ecx +.for1: + cmp ecx, [shared_icons_size] + jae .end_for1 + + mov eax, esi + add eax, ecx + mov edx, [eax] + cmp edx, [sc.work] + ; DEBUGF DBG_INFO, "eax = %x, sc.work = %x\n", eax, [sc.work] + jne @f + mov ebx, [sc.work] ;[sc.work_light] + add ebx, 0x1a1a1a ;; + mov [eax], ebx +@@: + add ecx, 4 + jmp .for1 +.end_for1: +.no_res: ; get size of file MENU.DAT mcall 70,fileinfo @@ -168,13 +222,13 @@ align 4 mov edi,[fileinfo.return] ;mem_end ;-------------------------------------- align 4 -newsearch: +newsearch: ; search for next submenu in MENU.DAT mov al,'#' cld repne scasb test ecx,ecx ; if not found jz close - call get_number + call get_number ; get submenu number from char at edi position to ebx test ebx,ebx jnz .number cmp al,'#' @@ -182,9 +236,9 @@ newsearch: ;-------------------------------------- align 4 .number: - shl ebx,4 + shl ebx,4 ; *= 16 . 16 is size of process table (see virtual at 0 ... stuff in the end of file) add ebx,[menu_data] ; pointer to process table - mov [ebx],edi + mov [ebx],edi ; process_table->pointer = edi inc [processes] jmp newsearch ;-------------------------------------- @@ -246,7 +300,8 @@ align 4 mov [buffer],0 ;------------------------------------------------------------------------------ align 4 -thread: +thread: ; starts new thread. called when opening each menu + DEBUGF DBG_INFO, "start new THREAD\n" mov ebp,esp sub ebp,0x1000 cmp ebp,0x2000 ; if this is first started thread @@ -266,7 +321,7 @@ red: call draw_window ; redraw ;------------------------------------------------------------------------------ align 4 -still: +still: ; event loop call free_area_if_set_mutex mcall 23,5 ; wait here for event @@ -370,11 +425,12 @@ button1: ; dph eax call draw_only_needed_buttons popad -; look for the next line times; = button_id +; look (.next_string) for the next line in MENU.DAT times; = button_id push eax ;-------------------------------------- align 4 .next_string: + ; DEBUGF DBG_INFO, ".next_string called\n" call searchstartstring dec ah jnz .next_string @@ -715,7 +771,7 @@ align 4 ; ********************************************* align 4 draw_window: - mcall 48,5 + mcall 48,5 ; get working area mov [x_working_area],eax mov [y_working_area],ebx @@ -842,9 +898,11 @@ draw_one_button: ;-------------------------------------- align 4 nocorrect: + mov [is_icon_active], 0 inc dl cmp [edi + cur_sel],dl jne .nohighlight + mov [is_icon_active], 1 cmp esi,0 jne @f mov esi,0x2a2a2a @@ -862,7 +920,7 @@ align 4 push edx mov edx, esi - mcall 13 + mcall 13 ; draw rect mcall , BTN_WIDTH,<[draw_y],1>,[sc.work_light] add ecx, BTN_HEIGHT-1 @@ -876,29 +934,88 @@ align 4 movzx edx,dl dec dl imul ebx,edx,BTN_HEIGHT - add ebx,(4 shl 16) + TXT_Y + add ebx,((4 + 18) shl 16) + TXT_Y ; added + 18 (icon size) movzx ecx,dl inc ecx mov edx,[edi + pointer] ;-------------------------------------- align 4 .findline: - cmp byte [edx],13 + cmp byte [edx],13 ; if \r encountered => line found je .linefound - inc edx + inc edx ; go to next char jmp .findline ;------------------------------------------------------------------------------ align 4 .linefound: - inc edx - cmp byte [edx],10 + inc edx ; go to next char after \r + cmp byte [edx],10 ; if it is not \n then again findline jne .findline - dec ecx + dec ecx ; TODO what in ecx? button number? jnz .findline mov ecx, [sc.work_text] add ecx, FONT_TYPE - mcall 4,,,,21 + + push ecx esi edi ebp + push ebx ; preserve ebx, it stores coordinates + mov [tmp], edx + mov [has_icon], 1 + xor ebx, ebx +@@: ; parse icon number + inc edx + mov al,[edx] + ; DEBUGF DBG_INFO, "(%u)\n", al + cmp al, '0' + jb @f + cmp al, '9' + ja @f + sub al, '0' + imul ebx,10 + add ebx,eax + jmp @b +@@: + ; DEBUGF DBG_INFO, "icon_number = %x al = %u\n", ebx, al + mov [icon_number], ebx + cmp al, ' ' + je @f + ; if no space after number then consider that number is a part of caption + mov edx, [tmp] ; restore edx + mov [has_icon], 0 ; no icon +@@: + pop ebx + + mcall 4,,,,21 ; draw menu element caption + + cmp [no_shared_resources], 1 + je @f + cmp [has_icon], 1 + jne @f + ; draw icon: + mov eax, ebx + shr eax, 16 + sub eax, 18 ; 18 - icon width + movzx ebx, bx + + sub ebx, 2 + shl eax, 16 + add eax, ebx + mov [tmp], eax + mov ebx, [icon_number] + imul ebx, 18*18*4 + + mov ecx, [shared_icons_ptr] + ; DEBUGF DBG_INFO, "is_icon_active = %x\n", [is_icon_active] + cmp [is_icon_active], 1 + jne .not_active_icon + mov ecx, [shared_icons_active_ptr] +.not_active_icon: + add ebx, ecx + mcall 65, ebx, (18 shl 16) + 18, [tmp], 32, 0, 0 + + pop ebp edi esi ecx + +@@: pop edx ret ;------------------------------------------------------------------------------ @@ -1002,6 +1119,18 @@ virtual at 0 ; PROCESSES TABLE (located at menu_data) prev_sel db ? ; +12 previous selection rb 16-$+1 ; [16 bytes per element] end virtual + +include_debug_strings ; for debug-fdo + +icons_resname db 'ICONS18W', 0 +shared_icons_ptr dd ? +shared_icons_active_ptr dd ? +shared_icons_size dd ? +has_icon db ? +icon_number dd ? +is_icon_active dd ? +no_shared_resources dd 0 +tmp dd ? ;------------------------------------------------------------------------------ align 4 bootparam: