Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ void PopulateReplayFileListbox(GameWindow *listbox)

GadgetListBoxReset(listbox);
const Int listboxLength = GadgetListBoxGetListLength(listbox);
const Int columns = GadgetListBoxGetNumColumns(listbox);

// TheSuperHackers @tweak xezon 08/06/2025 Now shows missing maps in red color.
enum {
Expand Down Expand Up @@ -291,8 +292,8 @@ void PopulateReplayFileListbox(GameWindow *listbox)
UnicodeString replayNameToShow = createReplayName(asciistr);

// TheSuperHackers @tweak Caball009 07/02/2025 Display both time and date instead of only time.
UnicodeString displayDateTimeBuffer;
displayDateTimeBuffer.format(L"%s %s", getUnicodeTimeBuffer(header.timeVal).str(), getUnicodeDateBuffer(header.timeVal).str());
const UnicodeString displayTimeBuffer = getUnicodeTimeBuffer(header.timeVal);
const UnicodeString displayDateBuffer = getUnicodeDateBuffer(header.timeVal);

// version (no-op)

Expand Down Expand Up @@ -353,9 +354,29 @@ void PopulateReplayFileListbox(GameWindow *listbox)

const Int insertionIndex = GadgetListBoxAddEntryText(listbox, replayNameToShow, color, -1, 0);
DEBUG_ASSERTCRASH(insertionIndex >= 0, ("Expects valid index"));
GadgetListBoxAddEntryText(listbox, displayDateTimeBuffer, color, insertionIndex, 1);
GadgetListBoxAddEntryText(listbox, header.versionString, color, insertionIndex, 2);
GadgetListBoxAddEntryText(listbox, mapStr, mapColor, insertionIndex, 3);

// TheSuperHackers @info Caball009 09/02/2026 Original replay menu has 4 columns; the code now supports a future 5-column layout.
// If there aren't two columns for time and date, concatenate them for a single column.
if (columns == 4)
{
UnicodeString displayDateTimeBuffer;
displayDateTimeBuffer.format(L"%s %s", displayTimeBuffer.str(), displayDateBuffer.str());

GadgetListBoxAddEntryText(listbox, displayDateTimeBuffer, color, insertionIndex, 1);
GadgetListBoxAddEntryText(listbox, header.versionString, color, insertionIndex, 2);
GadgetListBoxAddEntryText(listbox, mapStr, mapColor, insertionIndex, 3);
}
else if (columns == 5)
{
GadgetListBoxAddEntryText(listbox, displayTimeBuffer, color, insertionIndex, 1);
GadgetListBoxAddEntryText(listbox, displayDateBuffer, color, insertionIndex, 2);
GadgetListBoxAddEntryText(listbox, header.versionString, color, insertionIndex, 3);
GadgetListBoxAddEntryText(listbox, mapStr, mapColor, insertionIndex, 4);
}
else
{
DEBUG_CRASH(("Replay menu uses %d columns; expected either 4 or 5", columns));
}

// TheSuperHackers @performance Now stops processing when the list is full.
if (insertionIndex == listboxLength - 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ void PopulateReplayFileListbox(GameWindow *listbox)

GadgetListBoxReset(listbox);
const Int listboxLength = GadgetListBoxGetListLength(listbox);
const Int columns = GadgetListBoxGetNumColumns(listbox);

// TheSuperHackers @tweak xezon 08/06/2025 Now shows missing maps in red color.
enum {
Expand Down Expand Up @@ -291,8 +292,8 @@ void PopulateReplayFileListbox(GameWindow *listbox)
UnicodeString replayNameToShow = createReplayName(asciistr);

// TheSuperHackers @tweak Caball009 07/02/2025 Display both time and date instead of only time.
UnicodeString displayDateTimeBuffer;
displayDateTimeBuffer.format(L"%s %s", getUnicodeTimeBuffer(header.timeVal).str(), getUnicodeDateBuffer(header.timeVal).str());
const UnicodeString displayTimeBuffer = getUnicodeTimeBuffer(header.timeVal);
const UnicodeString displayDateBuffer = getUnicodeDateBuffer(header.timeVal);

// version (no-op)

Expand Down Expand Up @@ -353,9 +354,29 @@ void PopulateReplayFileListbox(GameWindow *listbox)

const Int insertionIndex = GadgetListBoxAddEntryText(listbox, replayNameToShow, color, -1, 0);
DEBUG_ASSERTCRASH(insertionIndex >= 0, ("Expects valid index"));
GadgetListBoxAddEntryText(listbox, displayDateTimeBuffer, color, insertionIndex, 1);
GadgetListBoxAddEntryText(listbox, header.versionString, color, insertionIndex, 2);
GadgetListBoxAddEntryText(listbox, mapStr, mapColor, insertionIndex, 3);

// TheSuperHackers @info Caball009 09/02/2026 Original replay menu has 4 columns; the code now supports a future 5-column layout.
// If there aren't two columns for time and date, concatenate them for a single column.
if (columns == 4)
{
UnicodeString displayDateTimeBuffer;
displayDateTimeBuffer.format(L"%s %s", displayTimeBuffer.str(), displayDateBuffer.str());

GadgetListBoxAddEntryText(listbox, displayDateTimeBuffer, color, insertionIndex, 1);
GadgetListBoxAddEntryText(listbox, header.versionString, color, insertionIndex, 2);
GadgetListBoxAddEntryText(listbox, mapStr, mapColor, insertionIndex, 3);
}
else if (columns == 5)
{
GadgetListBoxAddEntryText(listbox, displayTimeBuffer, color, insertionIndex, 1);
GadgetListBoxAddEntryText(listbox, displayDateBuffer, color, insertionIndex, 2);
GadgetListBoxAddEntryText(listbox, header.versionString, color, insertionIndex, 3);
GadgetListBoxAddEntryText(listbox, mapStr, mapColor, insertionIndex, 4);
}
Comment thread
Caball009 marked this conversation as resolved.
else
{
DEBUG_CRASH(("Replay menu uses %d columns; expected either 4 or 5", columns));
}

// TheSuperHackers @performance Now stops processing when the list is full.
if (insertionIndex == listboxLength - 1)
Expand Down
Loading