mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
feat: add online functionality
This commit is contained in:
@@ -49,3 +49,15 @@ void OnlineGameUIManager::setOnlineTypeCallback(OnlineTypeEvent onlineTypeEvent)
|
||||
m_onlineTypeEvent = onlineTypeEvent;
|
||||
}
|
||||
|
||||
void OnlineGameUIManager::hideOnlineButtons() {
|
||||
auto hostIt = m_buttons.find(makeHash("OnlineHostButton"));
|
||||
if (hostIt != m_buttons.end()) {
|
||||
hostIt->second->setVisible(false);
|
||||
hostIt->second->setEnabled(false);
|
||||
}
|
||||
auto joinIt = m_buttons.find(makeHash("OnlineJoinButton"));
|
||||
if (joinIt != m_buttons.end()) {
|
||||
joinIt->second->setVisible(false);
|
||||
joinIt->second->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@ public:
|
||||
~OnlineGameUIManager();
|
||||
void init() override;
|
||||
void setOnlineTypeCallback(OnlineTypeEvent type);
|
||||
|
||||
void hideOnlineButtons();
|
||||
|
||||
private:
|
||||
OnlineTypeEvent m_onlineTypeEvent;
|
||||
};
|
||||
Reference in New Issue
Block a user