Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/plrdlg_common.h File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions | Variables
plrdlg_common.h File Reference
`#include "support.h"`
`#include "fc_types.h"`
`#include "player.h"`

Go to the source code of this file.

## Data Structures

struct | player_dlg_column

## Typedefs

typedef int(* | plr_dlg_sort_func) (const struct player *p1, const struct player *p2)

## Enumerations

enum | player_dlg_column_type { COL_FLAG , COL_COLOR , COL_BOOLEAN , COL_TEXT , COL_RIGHT_TEXT }

## Functions

const char * | plrdlg_col_state (const struct player *plr)
void | init_player_dlg_common (void)
int | player_dlg_default_sort_column (void)
const char * | player_addr_hack (const struct player *pplayer)

## Variables

struct player_dlg_column | player_dlg_columns []
const int | num_player_dlg_columns

## Typedef Documentation

## ◆ plr_dlg_sort_func

typedef int(* plr_dlg_sort_func) (const struct player *p1, const struct player *p2)

Definition at line 36 of file plrdlg_common.h.

## Enumeration Type Documentation

## ◆ player_dlg_column_type

enum player_dlg_column_type

Enumerator
COL_FLAG |
COL_COLOR |
COL_BOOLEAN |
COL_TEXT |
COL_RIGHT_TEXT |

Definition at line 28 of file plrdlg_common.h.

## Function Documentation

## ◆ init_player_dlg_common()

void init_player_dlg_common | ( | void |  | ) |

Translate all titles

Definition at line 604 of file plrdlg_common.c.

Referenced by client_main().

## ◆ player_addr_hack()

const char * player_addr_hack | ( | const struct player * | pplayer | ) |

The only place where this is used is the player dialog. Eventually this should go the way of the dodo with everything here moved into col_host above.

This code in this function is only really needed so that the host is kept as a blank address if no one is controlling a player, but there are observers.

Definition at line 622 of file plrdlg_common.c.

Referenced by col_host().

## ◆ player_dlg_default_sort_column()

int player_dlg_default_sort_column | ( | void |  | ) |

Return default player dlg sorting column.

Definition at line 596 of file plrdlg_common.c.

Referenced by create_players_dialog().

## ◆ plrdlg_col_state()

const char * plrdlg_col_state | ( | const struct player * | plr | ) |

Returns a translated string giving the player's "state".

FIXME: These terms aren't very intuitive for new players.

Definition at line 229 of file plrdlg_common.c.

## Variable Documentation

## ◆ num_player_dlg_columns

const int num_player_dlg_columns

extern

Definition at line 591 of file plrdlg_common.c.

Referenced by plr_item::columnCount(), plr_model::columnCount(), create_players_dialog(), create_show_menu(), create_show_menu(), fill_row(), plr_model::headerData(), init_player_dlg_common(), options_dialogs_set(), options_dialogs_update(), players_dialog_store_new(), real_players_dialog_update(), and update_views().

## ◆ player_dlg_columns

struct player_dlg_column player_dlg_columns[]

extern

Definition at line 564 of file plrdlg_common.c.

Referenced by create_players_dialog(), create_plrdlg_display_menu_item(), create_show_menu(), plr_item::data(), plr_widget::display_header_menu(), fill_row(), plr_model::headerData(), plr_model::hide_data(), init_player_dlg_common(), plr_sorter::lessThan(), options_dialogs_set(), options_dialogs_update(), plr_item_delegate::paint(), players_dialog_store_new(), plrdlg_sort_func(), real_players_dialog_update(), toggle_view(), and update_views().