Completed image caching technique for rendering text using the normal engine draw functions.
This commit is contained in:
+3
-2
@@ -144,7 +144,7 @@ void Menu::CheckClickAndPerformMenuSelect(Crawler*game){
|
||||
}
|
||||
|
||||
void Menu::HoverMenuSelect(Crawler*game){
|
||||
if(selection==vi2d{-1,-1}||buttons[selection.y][selection.x]->disabled)return;
|
||||
if(!game->IsFocused()||selection==vi2d{-1,-1}||buttons[selection.y][selection.x]->disabled)return;
|
||||
if(buttons[selection.y][selection.x]->draggable){
|
||||
if(buttonHoldTime<"ThemeGlobal.MenuHoldTime"_F){
|
||||
CheckClickAndPerformMenuSelect(game);
|
||||
@@ -158,7 +158,7 @@ void Menu::HoverMenuSelect(Crawler*game){
|
||||
}
|
||||
|
||||
void Menu::MenuSelect(Crawler*game){
|
||||
if(selection==vi2d{-1,-1}||(buttons[selection.y][selection.x]->disabled||buttons[selection.y][selection.x]->grayedOut))return;
|
||||
if(!game->IsFocused()||selection==vi2d{-1,-1}||(buttons[selection.y][selection.x]->disabled||buttons[selection.y][selection.x]->grayedOut))return;
|
||||
bool buttonStillValid=buttons[selection.y][selection.x]->onClick(MenuFuncData{*this,game,buttons[selection.y][selection.x],(ScrollableWindowComponent*)buttons[selection.y][selection.x]->parentComponent});
|
||||
if(buttonStillValid){
|
||||
if(buttons[selection.y][selection.x]->menuDest!=MenuType::ENUM_END){
|
||||
@@ -253,6 +253,7 @@ void Menu::Update(Crawler*game){
|
||||
}
|
||||
|
||||
KeyboardButtonNavigation(game,pos);
|
||||
|
||||
for(auto&[key,value]:buttons){
|
||||
for(auto&button:value){
|
||||
if(button->renderInMain){
|
||||
|
||||
Reference in New Issue
Block a user