Add More OptionsList functionality (#1810)
* Add More OptionsList functionality * Remove Size parameter because it's broken * Make OptionsList inputs remappable * Change Next/Prev OptionsList to CodeDetector
This commit is contained in:
committed by
Colby Klein
parent
3eb03feadd
commit
dcb2f74c8d
@@ -331,6 +331,13 @@ local CodeDetectorCodes = {
|
||||
CloseCurrentFolder = {
|
||||
default = "MenuUp-MenuDown",
|
||||
},
|
||||
-- OptionsList
|
||||
PrevOptionsList = {
|
||||
default = "@MenuUp-MenuDown",
|
||||
},
|
||||
NextOptionsList = {
|
||||
default = "@MenuDown-MenuUp",
|
||||
},
|
||||
-- sorts
|
||||
NextSort1 = {
|
||||
default = "@MenuLeft-@MenuRight-Start",
|
||||
@@ -461,6 +468,24 @@ function GetCodeForGame(codeName)
|
||||
return inputCode[gameName] or inputCode["default"]
|
||||
end
|
||||
|
||||
local OptionsListKeys = {
|
||||
PrevItem = {
|
||||
pump="MenuLeft",
|
||||
default="MenuUp"
|
||||
},
|
||||
NextItem = {
|
||||
pump="MenuRight",
|
||||
default="MenuDown"
|
||||
}
|
||||
};
|
||||
|
||||
function GetOptionsListMapping(name)
|
||||
local sGame = string.lower(GAMESTATE:GetCurrentGame():GetName())
|
||||
local map = OptionsListKeys[name]
|
||||
return map[sGame] or map["default"]
|
||||
end
|
||||
|
||||
|
||||
function oitg_zoom_mode_actor()
|
||||
return Def.Actor{
|
||||
OnCommand= function(self)
|
||||
|
||||
@@ -368,6 +368,10 @@ PrevGroup=GetCodeForGame("PrevGroup")
|
||||
CloseCurrentFolder=GetCodeForGame("CloseCurrentFolder")
|
||||
Hidden=GetCodeForGame("Hidden")
|
||||
RandomVanish=GetCodeForGame("RandomVanish")
|
||||
# OptionsList (if enabled)
|
||||
PrevOptionsList=GetCodeForGame("PrevOptionsList")
|
||||
NextOptionsList=GetCodeForGame("NextOptionsList")
|
||||
# Evaluation screen
|
||||
SaveScreenshot1=GetCodeForGame("SaveScreenshot1")
|
||||
SaveScreenshot2=GetCodeForGame("SaveScreenshot2")
|
||||
# on the player options menu.
|
||||
@@ -2875,6 +2879,62 @@ ExplanationTogetherOffCommand=stoptweening
|
||||
[ScreenOptionsServiceExtendedChild]
|
||||
Fallback="ScreenOptionsServiceChild"
|
||||
|
||||
[OptionsList]
|
||||
Fallback="ScreenWithMenuElements"
|
||||
|
||||
PrevMenuButton=GetOptionsListMapping("PrevMenu")
|
||||
NextMenuButton=GetOptionsListMapping("NextMenu")
|
||||
PrevItemButton=GetOptionsListMapping("PrevItem")
|
||||
NextItemButton=GetOptionsListMapping("NextItem")
|
||||
CodeNames=""
|
||||
|
||||
#It takes from ScreenOptionsMaster.
|
||||
#This is the equivalent to LineNames
|
||||
TopMenus=""
|
||||
TopMenu=""
|
||||
|
||||
DirectLines=""
|
||||
ItemsSpacingY=
|
||||
MaxItemsBeforeSplit=
|
||||
ItemsSplitWidth=
|
||||
|
||||
TextOnCommand=
|
||||
TextOffCommand=
|
||||
TextTweenOffCommand=
|
||||
TextTweenOnCommand=
|
||||
TextResetCommand=
|
||||
|
||||
UnderlineOnCommand=
|
||||
UnderlineOffCommand=
|
||||
UnderlineSetTwoRowsCommand=
|
||||
UnderlineSetOneRowCommand=
|
||||
UnderlineShowCommand=
|
||||
UnderlineHideCommand=
|
||||
UnderlineTweenOnCommand=
|
||||
UnderlineTweenOffCommand=
|
||||
UnderlineResetCommand=
|
||||
|
||||
CursorOnCommand=
|
||||
CursorPositionTwoRowsCommand=
|
||||
CursorPositionOneRowCommand=
|
||||
CursorTweenOnCommand=
|
||||
CursorTweenOffCommand=
|
||||
CursorResetCommand=
|
||||
|
||||
OptionsListOnCommand=
|
||||
OptionsListOffCommand=
|
||||
OptionsListTweenOffCommand=
|
||||
OptionsListTweenOnCommand=
|
||||
OptionsListResetCommand=
|
||||
|
||||
OptionsListTweenOutForwardCommand=
|
||||
OptionsListTweenOutBackwardCommand=
|
||||
OptionsListTweenInForwardCommand=
|
||||
OptionsListTweenInBackwardCommand=
|
||||
|
||||
OptionsListFadeOffCommand=
|
||||
OptionsListFadeOnCommand=
|
||||
|
||||
[ScreenMiniMenu]
|
||||
Class="ScreenMiniMenu"
|
||||
Fallback="ScreenOptions"
|
||||
|
||||
Reference in New Issue
Block a user