diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-06-15 13:16:33 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-06-15 13:16:33 +0000 |
| commit | 57b2c49d571ac160d03b9bc30b6eb72976bfe82a (patch) | |
| tree | 9e39336ac1976472b2a6a4fd69fa8e3b7f41bd9e /src/game/client/components/menus.cpp | |
| parent | feade98dae813a1cdff48c4f15b3c01fb1fd3e8d (diff) | |
| download | zcatch-57b2c49d571ac160d03b9bc30b6eb72976bfe82a.tar.gz zcatch-57b2c49d571ac160d03b9bc30b6eb72976bfe82a.zip | |
fixed so that the demo player doesn't crash when the map isn't found
Diffstat (limited to 'src/game/client/components/menus.cpp')
| -rw-r--r-- | src/game/client/components/menus.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 1748fe18..168c514d 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -666,6 +666,15 @@ void MENUS::on_init() config.cl_show_welcome = 0; } +void MENUS::popup_message(const char *topic, const char *body, const char *button) +{ + str_copy(message_topic, topic, sizeof(message_topic)); + str_copy(message_body, body, sizeof(message_body)); + str_copy(message_button, button, sizeof(message_button)); + popup = POPUP_MESSAGE; +} + + int MENUS::render() { RECT screen = *ui_screen(); @@ -749,7 +758,13 @@ int MENUS::render() const char *button_text = ""; int extra_align = 0; - if(popup == POPUP_CONNECTING) + if(popup == POPUP_MESSAGE) + { + title = message_topic; + extra_text = message_body; + button_text = message_button; + } + else if(popup == POPUP_CONNECTING) { title = localize("Connecting to"); extra_text = config.ui_server_address; // TODO: query the client about the address |