Commit graph

6 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 66302e477c
[USETUP] Minor formatting only. 2020-10-02 00:04:11 +02:00
Bișoc George 2bf4180c80 [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.
2020-01-19 17:58:13 +01:00
Hermès Bélusca-Maïto dae658088a
[USETUP] Introduce some -V functions for CONSOLE_ConOutPrintf, CONSOLE_SetStatusText and CONSOLE_SetStatusTextX.
Additions:
- Use explicit __cdecl calling convention for variadic functions.
- Fix also the whitespace in consup.h.

svn path=/branches/setup_improvements/; revision=75749
2018-10-28 14:41:57 +01:00
Hermès Bélusca-Maïto 6241a16f41
[USETUP] Implement a basic console 'input queue' and implement PeekConsoleInput() and CONSOLE_ConInKeyPeek() around it. 2018-08-27 00:28:08 +02:00
Eric Kohl 975b7d427d [SETUP] Remove myself from the 1st stage setup code
Congratulations Hermès!
You just earned yourself full maintainership of the 1st stage setup. It's yours now. I'm out!
2018-05-27 21:33:07 +02:00
Eric Kohl 3ce0c5d48b [USETUP] Get rid of the interface directory because we support text-mode only 2018-05-15 19:47:52 +02:00
Renamed from base/setup/usetup/interface/consup.h (Browse further)