(svn r14104) -Feature: Add a window for waypoints, allowing to view all the trains having the selected waypoint in their orders.

Changing its name is also supported from the same new window.
Gui based on work done by Satyap, on FS#2025.
This commit is contained in:
belugas
2008-08-20 01:29:05 +00:00
parent 1145a11b9d
commit d096431936
13 changed files with 165 additions and 27 deletions

View File

@@ -66,10 +66,6 @@ void HandleOnEditText(const char *str)
_cmd_text = str;
switch (_rename_what) {
case 1: // Rename a waypoint
if (*str == '\0') return;
DoCommandP(0, id, 0, NULL, CMD_RENAME_WAYPOINT | CMD_MSG(STR_CANT_CHANGE_WAYPOINT_NAME));
break;
#ifdef ENABLE_NETWORK
case 3: { // Give money, you can only give money in excess of loan
const Player *p = GetPlayer(_current_player);
@@ -131,23 +127,6 @@ void ShowNetworkGiveMoneyWindow(PlayerID player)
}
#endif /* ENABLE_NETWORK */
void ShowRenameWaypointWindow(const Waypoint *wp)
{
int id = wp->index;
/* Are we allowed to change the name of the waypoint? */
if (!CheckTileOwnership(wp->xy)) {
ShowErrorMessage(_error_message, STR_CANT_CHANGE_WAYPOINT_NAME,
TileX(wp->xy) * TILE_SIZE, TileY(wp->xy) * TILE_SIZE);
return;
}
_rename_id = id;
_rename_what = 1;
SetDParam(0, id);
ShowQueryString(STR_WAYPOINT_RAW, STR_EDIT_WAYPOINT_NAME, MAX_LENGTH_WAYPOINT_NAME_BYTES, MAX_LENGTH_WAYPOINT_NAME_PIXELS, NULL, CS_ALPHANUMERAL);
}
/* Zooms a viewport in a window in or out */
/* No button handling or what so ever */