[USETUP] Implement resource ID text based strings for MUI (#2193)
authorBișoc George <fraizeraust99@gmail.com>
Sun, 19 Jan 2020 16:58:13 +0000 (17:58 +0100)
committerHermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Sun, 19 Jan 2020 16:58:13 +0000 (17:58 +0100)
commit2bf4180c80b1c18594bd302b3f3c21c9863c315d
treee94f9d41e986ca8486fa7ee85992b05340b23858
parent8dfd2338f19f516a1202e28c2a768c96748ab802
[USETUP] Implement resource ID text based strings for MUI (#2193)

CORE-12683

Supersedes PR #612.

* [USETUP] Implement the internal MUI routines for text manipulation based on its ID and implement text resource based IDs

USETUP (the 1st stage text mode setup module) bases upon MUI (Multilingual User Interface) sub-component of USETUP which is responsible for the ability into translating the MUI pages (each page having corresponding properties like X, Y coordinates, text flags and text string buffer) in various languages.
The only problem, as of now, is that whenever you want to modify a certain property of a page, such as removing a text from the said page in the screen, you've got to rely on using CONSOLE_* specific functions and calling with hardcoded parameters, namely the coordinates.

This can become a problem as not every localized (translated) MUI page has the same properties for each language and this could lead to various issues. Therefore, assigning each entry with an ID you can remove a text by only giving its ID (and the entry page number) without having the need to specify the coordinates
as the internal MUI routine, MUIGetEntry(), automatically retrieves the entry with respective data fields.

The following commit implements:

- MUIGetEntry()
- MUIClearText()
- MUIClearStyledText()
- MUISetText()
- MUISetStyledText()
- Now the X and Y coordinate members of MUI_ENTRY are of SHORT integer type, for the sake of the general code as most of the coordination values, even the COORD structure itself, has the coordination points as SHORTs and not BYTEs.

The following MUI functions will be used to manipulate text based resources depending on their ID from the corresponding MUI entry.

* [USETUP] Make CONSOLE_ClearTextXY function public so that we can use across other files.

* [USETUP] Implement the IDs for each text MUI entry in locale files.

This mechanism follows the same principle of resource IDs in Win32 applications. Static text is merely a resource that doesn't get changed programmatically for whole of its lifetime whereas dynamic resources can change during the lifetime of the program depending on the algorithm (for example, hide that piece of text and set another one, etc.).

* [USETUP] Remove the "Press ENTER to continue" message prompt when the partition formatting begins.
32 files changed:
base/setup/usetup/consup.c
base/setup/usetup/consup.h
base/setup/usetup/lang/bg-BG.h
base/setup/usetup/lang/bn-BD.h
base/setup/usetup/lang/cs-CZ.h
base/setup/usetup/lang/da-DK.h
base/setup/usetup/lang/de-DE.h
base/setup/usetup/lang/el-GR.h
base/setup/usetup/lang/en-US.h
base/setup/usetup/lang/es-ES.h
base/setup/usetup/lang/et-EE.h
base/setup/usetup/lang/fr-FR.h
base/setup/usetup/lang/he-IL.h
base/setup/usetup/lang/hu-HU.h
base/setup/usetup/lang/it-IT.h
base/setup/usetup/lang/ja-JP.h
base/setup/usetup/lang/lt-LT.h
base/setup/usetup/lang/ms-MY.h
base/setup/usetup/lang/nl-NL.h
base/setup/usetup/lang/pl-PL.h
base/setup/usetup/lang/pt-BR.h
base/setup/usetup/lang/pt-PT.h
base/setup/usetup/lang/ro-RO.h
base/setup/usetup/lang/ru-RU.h
base/setup/usetup/lang/sk-SK.h
base/setup/usetup/lang/sq-AL.h
base/setup/usetup/lang/sv-SE.h
base/setup/usetup/lang/tr-TR.h
base/setup/usetup/lang/uk-UA.h
base/setup/usetup/mui.c
base/setup/usetup/mui.h
base/setup/usetup/usetup.c