Skip to content

Commit

Permalink
fix mod menu highlight (for real this time)
Browse files Browse the repository at this point in the history
also fixes highlight bugs with S1/2 level select and other text menus
  • Loading branch information
LittlePlanetCD committed Feb 13, 2025
1 parent cf532d7 commit 9a7220e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions RSDKv4/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ void SetTextMenu(int sm)
StrAdd(buffer, ": ");
StrAdd(buffer, modList[m].active ? " Active" : "Inactive");
AddTextMenuEntry(&gameMenu[1], buffer);
gameMenu[1].entryHighlight[m] = false;
}

gameMenu[1].alignment = 1;
Expand Down
5 changes: 0 additions & 5 deletions RSDKv4/Text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ void AddTextMenuEntry(TextMenu *menu, const char *text)
{
menu->entryStart[menu->rowCount] = menu->textDataPos;
menu->entrySize[menu->rowCount] = 0;
menu->entryHighlight[menu->rowCount] = false;
int textLength = StrLength(text);
for (int i = 0; i < textLength;) {
if (text[i] != '\0') {
Expand All @@ -266,7 +265,6 @@ void AddTextMenuEntryW(TextMenu *menu, const ushort *text)
{
menu->entryStart[menu->rowCount] = menu->textDataPos;
menu->entrySize[menu->rowCount] = 0;
menu->entryHighlight[menu->rowCount] = false;
int textLength = StrLengthW(text);
for (int i = 0; i < textLength;) {
if (text[i] != '\0') {
Expand All @@ -284,7 +282,6 @@ void SetTextMenuEntry(TextMenu *menu, const char *text, int rowID)
{
menu->entryStart[rowID] = menu->textDataPos;
menu->entrySize[rowID] = 0;
menu->entryHighlight[menu->rowCount] = false;
int textLength = StrLength(text);
for (int i = 0; i < textLength;) {
if (text[i] != '\0') {
Expand All @@ -301,7 +298,6 @@ void SetTextMenuEntryW(TextMenu *menu, const ushort *text, int rowID)
{
menu->entryStart[rowID] = menu->textDataPos;
menu->entrySize[rowID] = 0;
menu->entryHighlight[menu->rowCount] = false;
int textLength = StrLengthW(text);
for (int i = 0; i < textLength;) {
if (text[i] != '\0') {
Expand All @@ -318,7 +314,6 @@ void EditTextMenuEntry(TextMenu *menu, const char *text, int rowID)
{
int entryPos = menu->entryStart[rowID];
menu->entrySize[rowID] = 0;
menu->entryHighlight[menu->rowCount] = false;
int textLength = StrLength(text);
for (int i = 0; i < textLength;) {
if (text[i] != '\0') {
Expand Down

0 comments on commit 9a7220e

Please sign in to comment.