Say when the Steam buttons are off rather than removing them
With RP412STEAM=1 but no Steam client, the lobby buttons were not drawn at all - the menu simply had two fewer buttons than last time, with the only explanation a line near the top of rpl4.log that scrolls past during a normal startup. It reads as a broken build, and it cost someone a puzzled look today. The buttons are now laid out whenever environ.ini asks for Steam, and greyed out when the wire did not come up, with STEAM NOT RUNNING above them. Clicks on a greyed button do nothing - a dead control that still fires would be worse than the silence it replaces. Two conditions rather than one, so RPL4Lobby_Configured joins Available: configured is the ini switch, available is whether the transport got a FakeIP. Configured keeps the #ifdef in the lobby module, so a build without the Steam SDK still shows no buttons at all rather than a pair that can never work. The notice does not fit inside a button - they are about sixteen characters wide and "HOST STEAM GAME - STEAM NOT RUNNING" is more than twice that, so appending it clipped mid-word. It goes on its own line above the pair instead. Verified both ways, with the Steam client up and with it unavailable: bright and clickable, dim and inert. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
//########################################################################
|
||||
|
||||
Logical RPL4Lobby_Available() { return False; }
|
||||
Logical RPL4Lobby_Configured() { return False; }
|
||||
Logical RPL4Lobby_InRoom() { return False; }
|
||||
int RPL4Lobby_Host(HINSTANCE, HWND) { return LobbyRoomLeft; }
|
||||
int RPL4Lobby_Join(HINSTANCE, HWND) { return LobbyRoomLeft; }
|
||||
@@ -919,6 +920,18 @@ Logical
|
||||
return SteamNetTransport_GetFakeAddressString()[0] != '\0';
|
||||
}
|
||||
|
||||
//
|
||||
// The environ.ini switch, read the same way RPL4.CPP reads it to decide
|
||||
// whether to install the transport at all. Says nothing about whether the
|
||||
// Steam client was actually there.
|
||||
//
|
||||
Logical
|
||||
RPL4Lobby_Configured()
|
||||
{
|
||||
const char *steam_switch = getenv("RP412STEAM");
|
||||
return (steam_switch != NULL && atoi(steam_switch) != 0) ? True : False;
|
||||
}
|
||||
|
||||
Logical
|
||||
RPL4Lobby_InRoom()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user