Skip to content

Commit 9a7220e

Browse files
fix mod menu highlight (for real this time)
also fixes highlight bugs with S1/2 level select and other text menus
1 parent cf532d7 commit 9a7220e

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

RSDKv4/Debug.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ void SetTextMenu(int sm)
569569
StrAdd(buffer, ": ");
570570
StrAdd(buffer, modList[m].active ? " Active" : "Inactive");
571571
AddTextMenuEntry(&gameMenu[1], buffer);
572+
gameMenu[1].entryHighlight[m] = false;
572573
}
573574

574575
gameMenu[1].alignment = 1;

RSDKv4/Text.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ void AddTextMenuEntry(TextMenu *menu, const char *text)
248248
{
249249
menu->entryStart[menu->rowCount] = menu->textDataPos;
250250
menu->entrySize[menu->rowCount] = 0;
251-
menu->entryHighlight[menu->rowCount] = false;
252251
int textLength = StrLength(text);
253252
for (int i = 0; i < textLength;) {
254253
if (text[i] != '\0') {
@@ -266,7 +265,6 @@ void AddTextMenuEntryW(TextMenu *menu, const ushort *text)
266265
{
267266
menu->entryStart[menu->rowCount] = menu->textDataPos;
268267
menu->entrySize[menu->rowCount] = 0;
269-
menu->entryHighlight[menu->rowCount] = false;
270268
int textLength = StrLengthW(text);
271269
for (int i = 0; i < textLength;) {
272270
if (text[i] != '\0') {
@@ -284,7 +282,6 @@ void SetTextMenuEntry(TextMenu *menu, const char *text, int rowID)
284282
{
285283
menu->entryStart[rowID] = menu->textDataPos;
286284
menu->entrySize[rowID] = 0;
287-
menu->entryHighlight[menu->rowCount] = false;
288285
int textLength = StrLength(text);
289286
for (int i = 0; i < textLength;) {
290287
if (text[i] != '\0') {
@@ -301,7 +298,6 @@ void SetTextMenuEntryW(TextMenu *menu, const ushort *text, int rowID)
301298
{
302299
menu->entryStart[rowID] = menu->textDataPos;
303300
menu->entrySize[rowID] = 0;
304-
menu->entryHighlight[menu->rowCount] = false;
305301
int textLength = StrLengthW(text);
306302
for (int i = 0; i < textLength;) {
307303
if (text[i] != '\0') {
@@ -318,7 +314,6 @@ void EditTextMenuEntry(TextMenu *menu, const char *text, int rowID)
318314
{
319315
int entryPos = menu->entryStart[rowID];
320316
menu->entrySize[rowID] = 0;
321-
menu->entryHighlight[menu->rowCount] = false;
322317
int textLength = StrLength(text);
323318
for (int i = 0; i < textLength;) {
324319
if (text[i] != '\0') {

0 commit comments

Comments
 (0)