mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 13:33:02 +01:00
Chat toggle button (#8648)
* Add chat_available() * Add appropriate strings * Add new Chat icon * Implement Chat button * CS * Fix chat icon * Make chat icon a bit smaller and less bright * Update chat icon * Update changelog
This commit is contained in:
committed by
Michał Janiszewski
parent
604da7ce01
commit
521948139c
@@ -38,6 +38,12 @@ static const char* chat_history_get(uint32_t index);
|
||||
static uint32_t chat_history_get_time(uint32_t index);
|
||||
static void chat_clear_input();
|
||||
|
||||
bool chat_available()
|
||||
{
|
||||
return network_get_mode() != NETWORK_MODE_NONE && network_get_status() == NETWORK_STATUS_CONNECTED
|
||||
&& network_get_authstatus() == NETWORK_AUTH_OK;
|
||||
}
|
||||
|
||||
void chat_open()
|
||||
{
|
||||
gChatOpen = true;
|
||||
@@ -76,8 +82,7 @@ void chat_update()
|
||||
|
||||
void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColor)
|
||||
{
|
||||
if (network_get_mode() == NETWORK_MODE_NONE || network_get_status() != NETWORK_STATUS_CONNECTED
|
||||
|| network_get_authstatus() != NETWORK_AUTH_OK)
|
||||
if (!chat_available())
|
||||
{
|
||||
gChatOpen = false;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user