From 2c4d6e947546f2732dd59d13fb331ec1412315ee Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 13 Dec 2014 14:27:26 +0000 Subject: Use messagebox notifications when buying a ship. --- src/client/buymenu.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/buymenu.cc b/src/client/buymenu.cc index 857e663..c81d80f 100644 --- a/src/client/buymenu.cc +++ b/src/client/buymenu.cc @@ -105,13 +105,24 @@ void BuyMenu::set_item(core::Info *info) menu_buybutton->set_label("buy " + menu_inforecord->type()->label() + ' ' + menu_inforecord->label()); menu_modelview->show(); - + + /* + * NOTE + * + * client-side is only aware of the price of the item/ship but has no knowledge of any potential refunds + * made by the game-side buy function (see game::base::Game::func_buy) + * The buy button is always shown, and game-side should send messageboxes where approriate. + * */ + menu_buybutton->show(); + /* if (core::localplayer()->credits() < menu_inforecord->price()) { menu_msgtext->set_text("^1Not enough credits"); menu_msgtext->show(); } else { menu_buybutton->show(); } + */ + } menu_infotimestamp = menu_inforecord->timestamp(); -- cgit v1.2.3