equal
deleted
inserted
replaced
44 |
44 |
45 #include "table/strings.h" |
45 #include "table/strings.h" |
46 #include "table/sprites.h" |
46 #include "table/sprites.h" |
47 |
47 |
48 static void PopupMainToolbMenu(Window *parent, uint16 parent_button, StringID base_string, byte item_count, byte disabled_mask = 0, int sel_index = 0, int checked_items = 0); |
48 static void PopupMainToolbMenu(Window *parent, uint16 parent_button, StringID base_string, byte item_count, byte disabled_mask = 0, int sel_index = 0, int checked_items = 0); |
49 static void PopupMainPlayerToolbMenu(Window *parent, int main_button, int gray); |
49 static void PopupMainPlayerToolbMenu(Window *parent, int main_button, int gray = 0); |
50 static void SplitToolbar(Window *w); |
50 static void SplitToolbar(Window *w); |
51 |
51 |
52 RailType _last_built_railtype; |
52 RailType _last_built_railtype; |
53 RoadType _last_built_roadtype; |
53 RoadType _last_built_roadtype; |
54 |
54 |
324 |
324 |
325 /* --- Stations button menu --- */ |
325 /* --- Stations button menu --- */ |
326 |
326 |
327 static void ToolbarStationsClick(Window *w) |
327 static void ToolbarStationsClick(Window *w) |
328 { |
328 { |
329 PopupMainPlayerToolbMenu(w, TBN_STATIONS, 0); |
329 PopupMainPlayerToolbMenu(w, TBN_STATIONS); |
330 } |
330 } |
331 |
331 |
332 static void MenuClickStations(int index) |
332 static void MenuClickStations(int index) |
333 { |
333 { |
334 ShowPlayerStations((PlayerID)index); |
334 ShowPlayerStations((PlayerID)index); |
336 |
336 |
337 /* --- Finances button menu --- */ |
337 /* --- Finances button menu --- */ |
338 |
338 |
339 static void ToolbarFinancesClick(Window *w) |
339 static void ToolbarFinancesClick(Window *w) |
340 { |
340 { |
341 PopupMainPlayerToolbMenu(w, TBN_FINANCES, 0); |
341 PopupMainPlayerToolbMenu(w, TBN_FINANCES); |
342 } |
342 } |
343 |
343 |
344 static void MenuClickFinances(int index) |
344 static void MenuClickFinances(int index) |
345 { |
345 { |
346 ShowPlayerFinances((PlayerID)index); |
346 ShowPlayerFinances((PlayerID)index); |
348 |
348 |
349 /* --- Company's button menu --- */ |
349 /* --- Company's button menu --- */ |
350 |
350 |
351 static void ToolbarPlayersClick(Window *w) |
351 static void ToolbarPlayersClick(Window *w) |
352 { |
352 { |
353 PopupMainPlayerToolbMenu(w, TBN_PLAYERS, 0); |
353 PopupMainPlayerToolbMenu(w, TBN_PLAYERS); |
354 } |
354 } |
355 |
355 |
356 static void MenuClickCompany(int index) |
356 static void MenuClickCompany(int index) |
357 { |
357 { |
358 if (_networking && index == 0) { |
358 if (_networking && index == 0) { |