From fbcbea050dcde6adeb357e0c0fa4d9cac4ba9984 Mon Sep 17 00:00:00 2001 From: Allanis <allanis@saracraft.net> Date: Tue, 14 May 2013 22:26:15 +0100 Subject: [PATCH] [Change] Might be an idea to gray out sell button when no outfits are available. --- src/land.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/land.c b/src/land.c index 5c069bc..130c872 100644 --- a/src/land.c +++ b/src/land.c @@ -309,6 +309,13 @@ static void outfits_update(char* str) { window_modifyImage(secondary_wid, "imgOutfit", outfit->gfx_store); + // Gray out sell button. + if(player_outfitOwned(outfitname) == 0) + window_disableButton(secondary_wid, "btnSellOutfit"); + else + window_enableButton(secondary_wid, "btnSellOutfit"); + + // New text. window_modifyText(secondary_wid, "txtDescription", outfit->description); credits2str(buf2, outfit->price, 2); credits2str(buf3, player->credits, 2);