Added more options to charachter customization menu/new game menu

master
shoaib11120 2021-12-31 20:16:43 +05:30
parent 2e96464b8d
commit bf276b58c5
1 changed files with 48 additions and 6 deletions

View File

@ -15,7 +15,7 @@ namespace stardew_access.Patches
private static string currentLetterText = " "; private static string currentLetterText = " ";
private static string currentDailyQuestText = " "; private static string currentDailyQuestText = " ";
private static string currentLevelUpTitle = " "; private static string currentLevelUpTitle = " ";
private const int MAX_COMPONENTS = 18; private const int MAX_COMPONENTS = 20;
internal static void ConfirmationDialogPatch(ConfirmationDialog __instance, string ___message) internal static void ConfirmationDialogPatch(ConfirmationDialog __instance, string ___message)
{ {
@ -634,7 +634,8 @@ namespace stardew_access.Patches
internal static void NewGameMenuPatch(CharacterCustomization __instance, TextBox ___nameBox, TextBox ___farmnameBox, internal static void NewGameMenuPatch(CharacterCustomization __instance, TextBox ___nameBox, TextBox ___farmnameBox,
TextBox ___favThingBox, ClickableTextureComponent ___skipIntroButton, ClickableTextureComponent ___okButton, TextBox ___favThingBox, ClickableTextureComponent ___skipIntroButton, ClickableTextureComponent ___okButton,
ClickableComponent ___backButton, ClickableTextureComponent ___randomButton, List<ClickableComponent> ___genderButtons, ClickableComponent ___backButton, ClickableTextureComponent ___randomButton, List<ClickableComponent> ___genderButtons,
List<ClickableTextureComponent> ___farmTypeButtons, ClickableTextureComponent ___farmTypeNextPageButton, ClickableTextureComponent ___farmTypePreviousPageButton) List<ClickableTextureComponent> ___farmTypeButtons, ClickableTextureComponent ___farmTypeNextPageButton, ClickableTextureComponent ___farmTypePreviousPageButton,
List<ClickableTextureComponent> ___cabinLayoutButtons)
{ {
try try
{ {
@ -650,14 +651,14 @@ namespace stardew_access.Patches
_ = CycleThroughItems(true, ___nameBox, ___farmnameBox, ___favThingBox, _ = CycleThroughItems(true, ___nameBox, ___farmnameBox, ___favThingBox,
___skipIntroButton, ___okButton, ___backButton, ___skipIntroButton, ___okButton, ___backButton,
___randomButton, ___genderButtons, ___farmTypeButtons, ___randomButton, ___genderButtons, ___farmTypeButtons,
___farmTypeNextPageButton, ___farmTypePreviousPageButton); ___farmTypeNextPageButton, ___farmTypePreviousPageButton, ___cabinLayoutButtons);
} }
else if (isPrevArrowPressed && !isRunning) else if (isPrevArrowPressed && !isRunning)
{ {
_ = CycleThroughItems(false, ___nameBox, ___farmnameBox, ___favThingBox, _ = CycleThroughItems(false, ___nameBox, ___farmnameBox, ___favThingBox,
___skipIntroButton, ___okButton, ___backButton, ___randomButton, ___skipIntroButton, ___okButton, ___backButton, ___randomButton,
___genderButtons, ___farmTypeButtons, ___genderButtons, ___farmTypeButtons,
___farmTypeNextPageButton, ___farmTypePreviousPageButton); ___farmTypeNextPageButton, ___farmTypePreviousPageButton, ___cabinLayoutButtons);
} }
} }
catch (Exception e) catch (Exception e)
@ -669,7 +670,8 @@ namespace stardew_access.Patches
private static async Task CycleThroughItems(bool increase, TextBox ___nameBox, TextBox ___farmnameBox, private static async Task CycleThroughItems(bool increase, TextBox ___nameBox, TextBox ___farmnameBox,
TextBox ___favThingBox, ClickableTextureComponent ___skipIntroButton, ClickableTextureComponent ___okButton, TextBox ___favThingBox, ClickableTextureComponent ___skipIntroButton, ClickableTextureComponent ___okButton,
ClickableComponent ___backButton, ClickableTextureComponent ___randomButton, List<ClickableComponent> ___genderButtons, ClickableComponent ___backButton, ClickableTextureComponent ___randomButton, List<ClickableComponent> ___genderButtons,
List<ClickableTextureComponent> ___farmTypeButtons, ClickableTextureComponent ___farmTypeNextPageButton, ClickableTextureComponent ___farmTypePreviousPageButton) List<ClickableTextureComponent> ___farmTypeButtons, ClickableTextureComponent ___farmTypeNextPageButton, ClickableTextureComponent ___farmTypePreviousPageButton,
List<ClickableTextureComponent> ___cabinLayoutButtons)
{ {
isRunning = true; isRunning = true;
if (increase) if (increase)
@ -818,12 +820,52 @@ namespace stardew_access.Patches
break; break;
} }
case 17: case 17:
{
if(___cabinLayoutButtons.Count <= 0)
{
if (increase)
{
++saveGameIndex;
goto case 18;
}
else
{
--saveGameIndex;
goto case 16;
}
}
___cabinLayoutButtons[0].snapMouseCursor();
ScreenReader.say("Cabin layout nearby", false);
break;
}
case 18:
{
if (___cabinLayoutButtons.Count <= 0)
{
if (increase)
{
++saveGameIndex;
goto case 19;
}
else
{
--saveGameIndex;
goto case 17;
}
}
___cabinLayoutButtons[1].snapMouseCursor();
ScreenReader.say("Cabin layout separate", false);
break;
}
case 19:
{ {
___okButton.snapMouseCursor(); ___okButton.snapMouseCursor();
ScreenReader.say("Ok Button", false); ScreenReader.say("Ok Button", false);
} }
break; break;
case 18: case 20:
{ {
___backButton.snapMouseCursor(); ___backButton.snapMouseCursor();
ScreenReader.say("Back Button", false); ScreenReader.say("Back Button", false);