Ejemplo n.º 1
0
/**************************************************************************
  Callback from city name dialog for new city.
**************************************************************************/
static void name_new_city_popup_callback(gpointer data, gint response,
                                         const char *input)
{
  int idx = GPOINTER_TO_INT(data);

  switch (response) {
  case GTK_RESPONSE_OK:
    finish_city(index_to_tile(idx), input);
    break;
  case GTK_RESPONSE_CANCEL:
  case GTK_RESPONSE_DELETE_EVENT:
    cancel_city(index_to_tile(idx));
    break;
  }
}
Ejemplo n.º 2
0
void finish_city_at_unit(long unit, char* title) {
    struct unit* u = (struct unit*)unit;
    finish_city(u->tile, title);
}