Skip to content

Commit 3db8f46

Browse files
committed
Adjusted the positions and/or size of various text in the menu
1 parent d590b93 commit 3db8f46

File tree

1 file changed

+95
-14
lines changed

1 file changed

+95
-14
lines changed

ttyd-tools/rel/source/draw.cpp

Lines changed: 95 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,10 @@ void drawMarioSpecialMovesOptions()
873873
PosX += 30;
874874
PosY -= 25;
875875

876+
#ifdef TTYD_JP
877+
PosX -= 1;
878+
#endif
879+
876880
drawText(HelpText, PosX, PosY, Alpha, Color, Scale);
877881

878882
// Set the values for the text to use
@@ -959,11 +963,19 @@ void drawFollowersOptions()
959963
PosX += 30;
960964
PosY -= 25;
961965

966+
#ifdef TTYD_JP
967+
PosX -= 1;
968+
#endif
969+
962970
drawText(HelpText, PosX, PosY, Alpha, Color, Scale);
963971

964972
PosX += 45;
965973
PosY -= 54;
966974

975+
#ifdef TTYD_JP
976+
PosX += 4;
977+
#endif
978+
967979
// Draw the main text
968980
uint32_t tempStatsFollowerOptionsLinesSize = StatsFollowerOptionsLinesSize;
969981
uint32_t tempSecondaryMenuOption = MenuVar.SecondaryMenuOption;
@@ -1331,13 +1343,21 @@ void drawPartnerChangeYoshiColorOptions()
13311343
PosX += 30;
13321344
PosY -= 25;
13331345

1346+
#ifdef TTYD_JP
1347+
PosX -= 1;
1348+
#endif
1349+
13341350
drawText(HelpText, PosX, PosY, Alpha, Color, Scale);
13351351

13361352
// Set the values for the text to use
13371353
uint32_t tempSecondaryMenuOption = MenuVar.SecondaryMenuOption;
13381354
PosX += 47;
13391355
PosY -= 54;
13401356

1357+
#ifdef TTYD_JP
1358+
PosX += 2;
1359+
#endif
1360+
13411361
uint32_t Size = StatsYoshiColorOptionsLinesSize;
13421362
for (uint32_t i = 0; i < Size; i++)
13431363
{
@@ -1720,10 +1740,18 @@ void drawMemoryTypeList()
17201740
PosX += 30;
17211741
PosY -= 25;
17221742

1743+
#ifdef TTYD_JP
1744+
PosX -= 1;
1745+
#endif
1746+
17231747
drawText(HelpText, PosX, PosY, Alpha, Color, Scale);
17241748
PosX += 42;
17251749
PosY -= 50;
17261750

1751+
#ifdef TTYD_JP
1752+
PosX += 3;
1753+
#endif
1754+
17271755
// Draw the main text
17281756
uint32_t Size = MemoryTypeLinesSize;
17291757
uint32_t tempSecondaryMenuOption = MenuVar.SecondaryMenuOption;
@@ -1779,9 +1807,14 @@ void drawMemoryWatchChangeAddressListWindow(int32_t posY)
17791807
uint32_t WindowColor = 0x151515E0;
17801808
int32_t WindowPosX = -245;
17811809
int32_t WindowPosY = posY;
1782-
int32_t Width = 373;
1810+
int32_t Width = 379;
17831811
int32_t Height = 15;
17841812
int32_t Curve = 0;
1813+
1814+
#ifdef TTYD_JP
1815+
Width -= 16;
1816+
#endif
1817+
17851818
drawWindow(WindowColor, WindowPosX, WindowPosY, Width, Height, Curve);
17861819
}
17871820

@@ -2119,30 +2152,36 @@ void drawPartnerFollowerMessage(int32_t textPosY, bool drawForPartner)
21192152
return;
21202153
}
21212154

2155+
int32_t TextPosX = -172;
2156+
int32_t WindowWidth = 375;
2157+
21222158
// Get the text to use
21232159
const char *PartnerOrFollowerText;
21242160
if (drawForPartner)
21252161
{
21262162
PartnerOrFollowerText = "partner";
2163+
2164+
#ifdef TTYD_JP
2165+
TextPosX += 3;
2166+
WindowWidth -= 7;
2167+
#endif
21272168
}
21282169
else
21292170
{
21302171
PartnerOrFollowerText = "follower";
2172+
2173+
#ifdef TTYD_JP
2174+
WindowWidth -= 1;
2175+
#endif
21312176
}
21322177

2178+
// Print error text if currently trying to spawn a partner/follower when not able to
21332179
char *tempDisplayBuffer = DisplayBuffer;
2180+
21342181
sprintf(tempDisplayBuffer,
21352182
"To spawn a %s, you must have a file\nloaded and not be in a battle nor a\nscreen transition.",
21362183
PartnerOrFollowerText);
21372184

2138-
// Print error text if currently trying to spawn a partner/follower when not able to
2139-
int32_t TextPosX = -172;
2140-
int32_t WindowWidth = 375;
2141-
2142-
#ifdef TTYD_JP
2143-
WindowWidth -= 1;
2144-
#endif
2145-
21462185
drawErrorWindow(tempDisplayBuffer, TextPosX, textPosY, WindowWidth);
21472186
}
21482187
}
@@ -2420,6 +2459,11 @@ void drawAdjustableValue(bool changingItem, uint32_t currentMenu)
24202459
int32_t curve = 10;
24212460
int32_t height;
24222461

2462+
#ifdef TTYD_JP
2463+
PosX += 4;
2464+
width -= 6;
2465+
#endif
2466+
24232467
uint32_t tempCurrentMenuOption = MenuVar.CurrentMenuOption;
24242468

24252469
if (changingItem)
@@ -2572,7 +2616,14 @@ void drawAdjustableValue(bool changingItem, uint32_t currentMenu)
25722616

25732617
x += 166;
25742618
y -= 30;
2619+
2620+
#ifdef TTYD_JP
2621+
scale = 1;
2622+
x -= 1;
2623+
y += 3;
2624+
#else
25752625
scale = 0.9;
2626+
#endif
25762627

25772628
// Calculate the X offset
25782629
int32_t tempPosX = 0;
@@ -2586,7 +2637,13 @@ void drawAdjustableValue(bool changingItem, uint32_t currentMenu)
25862637
if (NumberIsNegative)
25872638
{
25882639
// Draw the negative sign
2589-
drawText("-", (x - 10), y, alpha, color, scale);
2640+
int32_t NegativeSignOffset = 10;
2641+
2642+
#ifdef TTYD_JP
2643+
NegativeSignOffset += 2;
2644+
#endif
2645+
2646+
drawText("-", (x - NegativeSignOffset), y, alpha, color, scale);
25902647
}
25912648

25922649
// Draw each digit of the number
@@ -2631,6 +2688,11 @@ void drawMemoryWatchAdjustableValue(uint32_t currentMenu)
26312688
int32_t curve = 10;
26322689
int32_t height = 148;
26332690

2691+
#ifdef TTYD_JP
2692+
PosX += 4;
2693+
width -= 6;
2694+
#endif
2695+
26342696
drawWindow(color, PosX, y, width, height, curve);
26352697

26362698
// Draw the help text
@@ -2684,8 +2746,15 @@ void drawMemoryWatchAdjustableValue(uint32_t currentMenu)
26842746
// Set up array for each digit of the number
26852747
uint8_t AdjustableValue[AmountOfNumbers];
26862748

2687-
x += 173;
2688-
scale = 0.9;
2749+
x += 180;
2750+
2751+
#ifdef TTYD_JP
2752+
scale = 1;
2753+
x -= 1;
2754+
y += 2;
2755+
#else
2756+
scale = 0.9;
2757+
#endif
26892758

26902759
// Calculate the X offset
26912760
int32_t tempPosX = 0;
@@ -2708,7 +2777,13 @@ void drawMemoryWatchAdjustableValue(uint32_t currentMenu)
27082777
}
27092778

27102779
// Draw the negative sign
2711-
drawText("-", (x - 40), y, alpha, color, scale);
2780+
int32_t NegativeSignOffset = 40;
2781+
2782+
#ifdef TTYD_JP
2783+
NegativeSignOffset += 2;
2784+
#endif
2785+
2786+
drawText("-", (x - NegativeSignOffset), y, alpha, color, scale);
27122787
}
27132788
else
27142789
{
@@ -2774,6 +2849,11 @@ void drawAddByIconMain(uint32_t currentMenu)
27742849
PosY = 145;
27752850
Color = 0xFFFFFFFF;
27762851
const char *HelpText = "Press A to confirm\nPress B to cancel";
2852+
2853+
#ifdef TTYD_JP
2854+
PosX -= 2;
2855+
#endif
2856+
27772857
drawText(HelpText, PosX, PosY, Alpha, Color, Scale);
27782858

27792859
// Draw the window for the current menu option
@@ -3132,10 +3212,11 @@ void drawChangeButtonCombo(uint16_t &currentButtonCombo)
31323212
// Draw the help text
31333213
uint8_t Alpha = 0xFF;
31343214
float Scale = 0.6;
3135-
PosX += 60;
3215+
PosX += 65;
31363216
PosY -= 30;
31373217
Color = 0xFFFFFFFF;
31383218
const char *HelpText = "Hold the button(s) for 3 seconds to set the\nnew button combo\n\nPress B three times in succession to cancel";
3219+
31393220
drawText(HelpText, PosX, PosY, Alpha, Color, Scale);
31403221

31413222
// Draw the timer

0 commit comments

Comments
 (0)