mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Correct previous commit
This commit is contained in:
parent
1f991d348e
commit
4694008abe
@ -156,6 +156,7 @@ static INTN OldTextWidth = 0;
|
|||||||
static UINTN OldRow = 0;
|
static UINTN OldRow = 0;
|
||||||
static INTN OldTimeoutTextWidth = 0;
|
static INTN OldTimeoutTextWidth = 0;
|
||||||
static INTN MenuWidth , TimeoutPosY;
|
static INTN MenuWidth , TimeoutPosY;
|
||||||
|
static UINTN MaxMenuTextLen = 0;
|
||||||
static INTN EntriesPosX, EntriesPosY;
|
static INTN EntriesPosX, EntriesPosY;
|
||||||
static INTN EntriesWidth, EntriesHeight, EntriesGap;
|
static INTN EntriesWidth, EntriesHeight, EntriesGap;
|
||||||
|
|
||||||
@ -1559,7 +1560,6 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
|||||||
UINTN OldChosenItem = ~(UINTN)0;
|
UINTN OldChosenItem = ~(UINTN)0;
|
||||||
INTN TitleLen = 0;
|
INTN TitleLen = 0;
|
||||||
INTN ScaledWidth = (INTN)(ThemeX.CharWidth * ThemeX.Scale);
|
INTN ScaledWidth = (INTN)(ThemeX.CharWidth * ThemeX.Scale);
|
||||||
UINTN MaxTextLen;
|
|
||||||
|
|
||||||
// clovy
|
// clovy
|
||||||
INTN ctrlX, ctrlY, ctrlTextX;
|
INTN ctrlX, ctrlY, ctrlTextX;
|
||||||
@ -1610,7 +1610,7 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
|||||||
}
|
}
|
||||||
TimeoutPosY = EntriesPosY + (Entries.size() + 1) * ThemeX.TextHeight;
|
TimeoutPosY = EntriesPosY + (Entries.size() + 1) * ThemeX.TextHeight;
|
||||||
|
|
||||||
MaxTextLen = (UINTN)(MenuWidth / ScaledWidth);
|
MaxMenuTextLen = (UINTN)(MenuWidth / ScaledWidth);
|
||||||
|
|
||||||
// initial painting
|
// initial painting
|
||||||
ThemeX.MeasureText(Title, &ItemWidth, NULL);
|
ThemeX.MeasureText(Title, &ItemWidth, NULL);
|
||||||
@ -1676,8 +1676,8 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
|||||||
Entry->Place.Width = TitleLen * ScaledWidth;
|
Entry->Place.Width = TitleLen * ScaledWidth;
|
||||||
Entry->Place.Height = (UINTN)ThemeX.TextHeight;
|
Entry->Place.Height = (UINTN)ThemeX.TextHeight;
|
||||||
ResultString = Entry->Title; //create a copy to modify later
|
ResultString = Entry->Title; //create a copy to modify later
|
||||||
if (ResultString.length() > MaxTextLen) {
|
if (ResultString.length() > MaxMenuTextLen) {
|
||||||
ResultString = ResultString.subString(0,MaxTextLen-1);
|
ResultString = ResultString.subString(0,MaxMenuTextLen-1);
|
||||||
}
|
}
|
||||||
PlaceCentre = (INTN)((ThemeX.TextHeight - (INTN)(ThemeX.Buttons[2].GetHeight())) * ThemeX.Scale / 2);
|
PlaceCentre = (INTN)((ThemeX.TextHeight - (INTN)(ThemeX.Buttons[2].GetHeight())) * ThemeX.Scale / 2);
|
||||||
PlaceCentre1 = (INTN)((ThemeX.TextHeight - (INTN)(ThemeX.Buttons[0].GetHeight())) * ThemeX.Scale / 2);
|
PlaceCentre1 = (INTN)((ThemeX.TextHeight - (INTN)(ThemeX.Buttons[0].GetHeight())) * ThemeX.Scale / 2);
|
||||||
@ -1756,8 +1756,8 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
|||||||
REFIT_ABSTRACT_MENU_ENTRY *EntryC = &Entries[ScrollState.CurrentSelection];
|
REFIT_ABSTRACT_MENU_ENTRY *EntryC = &Entries[ScrollState.CurrentSelection];
|
||||||
TitleLen = EntryL->Title.length();
|
TitleLen = EntryL->Title.length();
|
||||||
ResultString = EntryL->Title;
|
ResultString = EntryL->Title;
|
||||||
if (ResultString.length() > MaxTextLen) {
|
if (ResultString.length() > MaxMenuTextLen) {
|
||||||
ResultString = ResultString.subString(0,MaxTextLen-1);
|
ResultString = ResultString.subString(0,MaxMenuTextLen-1);
|
||||||
}
|
}
|
||||||
//clovy//PlaceCentre = (TextHeight - (INTN)(Buttons[2]->Height * GlobalConfig.Scale)) / 2;
|
//clovy//PlaceCentre = (TextHeight - (INTN)(Buttons[2]->Height * GlobalConfig.Scale)) / 2;
|
||||||
//clovy//PlaceCentre = (PlaceCentre>0)?PlaceCentre:0;
|
//clovy//PlaceCentre = (PlaceCentre>0)?PlaceCentre:0;
|
||||||
@ -1817,8 +1817,8 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
|||||||
|
|
||||||
// current selection
|
// current selection
|
||||||
ResultString = EntryC->Title;
|
ResultString = EntryC->Title;
|
||||||
if (ResultString.length() > MaxTextLen) {
|
if (ResultString.length() > MaxMenuTextLen) {
|
||||||
ResultString = ResultString.subString(0,MaxTextLen-1);
|
ResultString = ResultString.subString(0,MaxMenuTextLen-1);
|
||||||
}
|
}
|
||||||
TitleLen = EntryC->Title.length();
|
TitleLen = EntryC->Title.length();
|
||||||
if ( EntryC->getREFIT_MENU_SWITCH() ) {
|
if ( EntryC->getREFIT_MENU_SWITCH() ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user