UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cp_market_callbacks.cpp File Reference
#include "../../cl_shared.h"
#include "../../cl_inventory.h"
#include "../../ui/ui_dataids.h"
#include "cp_campaign.h"
#include "cp_market.h"
#include "cp_market_callbacks.h"
#include "cp_popup.h"

Go to the source code of this file.

Functions

static void BS_MarketAircraftDescription (const aircraft_t *aircraftTemplate)
 Prints general information about aircraft for Buy/Sell menu. More...
 
static void BS_MarketInfoClick_f (void)
 Opens the UFOpedia for the current selected item/aircraft/ugv. More...
 
static void BS_SetAutosell_f (void)
 Sets/unsets or flips the autosell property of an item on the market. More...
 
static void BS_Buy_f (void)
 Buy/Sell item/aircraft/ugv on the market. More...
 
static void BS_ShowInfo_f (void)
 Show information about item/aircaft/ugv in the market. More...
 
static void BS_FillMarket_f (void)
 Fill market item list. More...
 
void BS_InitCallbacks (void)
 Function registers the callbacks of the maket UI and do initializations. More...
 
void BS_ShutdownCallbacks (void)
 Function unregisters the callbacks of the maket UI. More...
 

Variables

static const cmdList_t marketCallbacks []
 

Function Documentation

void BS_InitCallbacks ( void  )

Function registers the callbacks of the maket UI and do initializations.

Definition at line 480 of file cp_market_callbacks.cpp.

References cgi.

Referenced by CP_AddCampaignCallbackCommands().

static void BS_MarketAircraftDescription ( const aircraft_t aircraftTemplate)
static

Prints general information about aircraft for Buy/Sell menu.

Parameters
[in]aircraftTemplateAircraft type.
See also
UP_AircraftDescription
UP_AircraftItemDescription

Definition at line 38 of file cp_market_callbacks.cpp.

References _, cgi, cgame_import_s::Cvar_Set(), aircraft_s::id, aircraft_s::name, aircraft_s::tech, aircraft_s::tpl, and UP_AircraftDescription().

Referenced by BS_ShowInfo_f().

static void BS_MarketInfoClick_f ( void  )
static

Opens the UFOpedia for the current selected item/aircraft/ugv.

Note
called by ui_market_openpedia

Definition at line 57 of file cp_market_callbacks.cpp.

References cgi, cgame_import_s::Cvar_GetString(), technology_s::id, RS_GetTechByProvided(), and UP_OpenWith().

static void BS_SetAutosell_f ( void  )
static
void BS_ShutdownCallbacks ( void  )

Function unregisters the callbacks of the maket UI.

Definition at line 488 of file cp_market_callbacks.cpp.

References cgi.

Referenced by CP_RemoveCampaignCallbackCommands().

Variable Documentation

const cmdList_t marketCallbacks[]
static
Initial value:
= {
{"ui_market_openpedia", BS_MarketInfoClick_f, "Open UFOPedia entry for selected item"},
{"ui_market_setautosell", BS_SetAutosell_f, "Sets/unsets or flips the autosell property of an item on the market"},
{"ui_market_buy", BS_Buy_f, "Buy/Sell item/aircraft/ugv on the market"},
{"ui_market_showinfo", BS_ShowInfo_f, "Show information about item/aircaft/ugv in the market"},
{"ui_market_fill", BS_FillMarket_f, "Fill market item list"},
{nullptr, nullptr, nullptr}
}
static void BS_ShowInfo_f(void)
Show information about item/aircaft/ugv in the market.
static void BS_FillMarket_f(void)
Fill market item list.
static void BS_SetAutosell_f(void)
Sets/unsets or flips the autosell property of an item on the market.
static void BS_MarketInfoClick_f(void)
Opens the UFOpedia for the current selected item/aircraft/ugv.
static void BS_Buy_f(void)
Buy/Sell item/aircraft/ugv on the market.

Definition at line 466 of file cp_market_callbacks.cpp.