Main menu art credit system (#41328)
* Main menu art credit system * change to center align in one box * left align * Update Resources/Prototypes/lobbyscreens.yml Co-authored-by: Hannah Giovanna Dawson <karakkaraz@gmail.com> * add margin * Update Resources/Prototypes/lobbyscreens.yml Co-authored-by: Hannah Giovanna Dawson <karakkaraz@gmail.com> * fix formatting * change to locale * FTL file * locid * handle null list properly * remove unneeded using * push * One more push --------- Co-authored-by: Hannah Giovanna Dawson <karakkaraz@gmail.com> Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,7 @@ using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Client.Lobby
|
||||
@@ -28,6 +29,7 @@ namespace Content.Client.Lobby
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IVoteManager _voteManager = default!;
|
||||
[Dependency] private readonly ClientsidePlaytimeTrackingManager _playtimeTracking = default!;
|
||||
[Dependency] private readonly IPrototypeManager _protoMan = default!;
|
||||
|
||||
private ClientGameTicker _gameTicker = default!;
|
||||
private ContentAudioSystem _contentAudioSystem = default!;
|
||||
@@ -250,15 +252,22 @@ namespace Content.Client.Lobby
|
||||
|
||||
private void UpdateLobbyBackground()
|
||||
{
|
||||
if (_gameTicker.LobbyBackground != null)
|
||||
if (_protoMan.TryIndex(_gameTicker.LobbyBackground, out var proto))
|
||||
{
|
||||
Lobby!.Background.Texture = _resourceCache.GetResource<TextureResource>(_gameTicker.LobbyBackground );
|
||||
Lobby!.Background.Texture = _resourceCache.GetResource<TextureResource>(proto.Background);
|
||||
|
||||
var markup = Loc.GetString("lobby-state-background-text",
|
||||
("backgroundTitle", Loc.GetString(proto.Title)),
|
||||
("backgroundArtist", Loc.GetString(proto.Artist)));
|
||||
|
||||
Lobby!.LobbyBackground.SetMarkup(markup);
|
||||
}
|
||||
else
|
||||
{
|
||||
Lobby!.Background.Texture = null;
|
||||
}
|
||||
|
||||
Lobby!.LobbyBackground.SetMarkup(Loc.GetString("lobby-state-background-no-background-text"));
|
||||
}
|
||||
}
|
||||
|
||||
private void SetReady(bool newReady)
|
||||
|
||||
Reference in New Issue
Block a user