[Add] Commodity exchange. The market is closed the minute. :P
This commit is contained in:
parent
8f7df9fc2f
commit
f5834d33f9
17
src/land.c
17
src/land.c
@ -16,13 +16,18 @@
|
|||||||
#define BAR_WIDTH 600
|
#define BAR_WIDTH 600
|
||||||
#define BAR_HEIGHT 400
|
#define BAR_HEIGHT 400
|
||||||
|
|
||||||
|
// Commodity window.
|
||||||
|
#define COMMODITY_WIDTH 400
|
||||||
|
#define COMMODITY_HEIGHT 400
|
||||||
|
|
||||||
int landed = 0;
|
int landed = 0;
|
||||||
|
|
||||||
static int land_wid = 0; // Primary land window.
|
static int land_wid = 0; // Primary land window.
|
||||||
static int secondary_wid = 0; // For the second opened land window (We can only have 2 max).
|
static int secondary_wid = 0; // For the second opened land window (We can only have 2 max).
|
||||||
static Planet* planet = NULL;
|
static Planet* planet = NULL;
|
||||||
|
|
||||||
static void commodity_exchange(coid);
|
static void commodity_exchange(void);
|
||||||
|
static void commodity_exchange_close(char* str);
|
||||||
static void outfits(void);
|
static void outfits(void);
|
||||||
static void shipyard(void);
|
static void shipyard(void);
|
||||||
static void spaceport_bar(void);
|
static void spaceport_bar(void);
|
||||||
@ -30,8 +35,18 @@ static void spaceport_bar_close(char* str);
|
|||||||
static void news(void);
|
static void news(void);
|
||||||
static void news_close(char* str);
|
static void news_close(char* str);
|
||||||
|
|
||||||
|
// The local market.
|
||||||
static void commodity_exchange(void) {
|
static void commodity_exchange(void) {
|
||||||
|
secondary_wid = window_create("Commodity Exchange", -1, -1, COMMODITY_WIDTH, COMMODITY_HEIGHT);
|
||||||
|
|
||||||
|
window_addButton(secondary_wid, -20, 20,
|
||||||
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCommodityClose",
|
||||||
|
"Close", commodity_exchange_close);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void commodity_exchange_close(char* str) {
|
||||||
|
if(strcmp(str, "btnCommodityClose")==0)
|
||||||
|
window_destroy(secondary_wid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void outfits(void) {
|
static void outfits(void) {
|
||||||
|
Loading…
Reference in New Issue
Block a user