Refactored analog control system to use digital DAS input system with directional input support.
This commit is contained in:
@@ -81,17 +81,6 @@ void Menu::InitializeLoadGameWindow(){
|
||||
onlineCharacterTab->SetSelectionType(HIGHLIGHT);
|
||||
#endif
|
||||
|
||||
#pragma region ScrollWindow macro lambda
|
||||
#define ScrollWindow(amount) \
|
||||
[](MenuType type){ \
|
||||
auto scrollWindow=Component<ScrollableWindowComponent>(type,"Game Files List"); \
|
||||
scrollWindow->Scroll(amount); \
|
||||
float scrollAmt=amount*game->GetElapsedTime()*"Interface.AnalogScrollSpeed"_F;\
|
||||
/*Height of these buttons is 48.*/ \
|
||||
scrollWindow->IncreaseSelectionIndex(scrollAmt/48.f); \
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Keyboard Navigation Rules
|
||||
loadGameWindow->SetupKeyboardNavigation(
|
||||
[](MenuType type,Data&returnData){ //On Open
|
||||
@@ -109,9 +98,7 @@ void Menu::InitializeLoadGameWindow(){
|
||||
{{game->KEY_BACK},{"Back to Title Screen",[](MenuType type){
|
||||
Component<MenuComponent>(type,"Go Back Button")->Click();
|
||||
}}},
|
||||
{{game->KEY_SCROLL,Analog},{"Scroll",ScrollWindow(game->KEY_SCROLL.Analog())}},
|
||||
{{game->KEY_SCROLLUP,Held},{"Scroll Up",ScrollWindow(-1.0f)}},
|
||||
{{game->KEY_SCROLLDOWN,Held},{"Scroll Down",ScrollWindow(1.0f)}},
|
||||
{{game->KEY_SCROLLVERT,Analog},{"Scroll",[](MenuType type){}}},
|
||||
}
|
||||
,{ //Button Navigation Rules
|
||||
{"Game Files List",{
|
||||
|
||||
Reference in New Issue
Block a user