mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r13800) -Codechange: minor comment style fixes in misc_gui.cpp
This commit is contained in:
parent
ec6aff4870
commit
4835e300c4
|
@ -424,7 +424,7 @@ public:
|
||||||
height = max<int>(height, h);
|
height = max<int>(height, h);
|
||||||
|
|
||||||
if (msg1 == INVALID_STRING_ID) {
|
if (msg1 == INVALID_STRING_ID) {
|
||||||
// only 1 line will be printed
|
/* only 1 line will be printed */
|
||||||
y[1] = (height - 15) / 2 + 15 - 5;
|
y[1] = (height - 15) / 2 + 15 - 5;
|
||||||
} else {
|
} else {
|
||||||
int over = (height - h) / 4;
|
int over = (height - h) / 4;
|
||||||
|
@ -518,8 +518,8 @@ void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y)
|
||||||
if ((x | y) != 0) {
|
if ((x | y) != 0) {
|
||||||
pt = RemapCoords2(x, y);
|
pt = RemapCoords2(x, y);
|
||||||
vp = FindWindowById(WC_MAIN_WINDOW, 0)->viewport;
|
vp = FindWindowById(WC_MAIN_WINDOW, 0)->viewport;
|
||||||
pt.x = Clamp(UnScaleByZoom(pt.x - vp->virtual_left, vp->zoom) + vp->left - (334/2), 0, _screen.width - 334);
|
pt.x = Clamp(UnScaleByZoom(pt.x - vp->virtual_left, vp->zoom) + vp->left - (334 / 2), 0, _screen.width - 334);
|
||||||
pt.y = Clamp(UnScaleByZoom(pt.y - vp->virtual_top, vp->zoom) + vp->top - (137/2), 22, _screen.height - 137);
|
pt.y = Clamp(UnScaleByZoom(pt.y - vp->virtual_top, vp->zoom) + vp->top - (137 / 2), 22, _screen.height - 137);
|
||||||
} else {
|
} else {
|
||||||
pt.x = (_screen.width - 334) >> 1;
|
pt.x = (_screen.width - 334) >> 1;
|
||||||
pt.y = (_screen.height - 137) >> 1;
|
pt.y = (_screen.height - 137) >> 1;
|
||||||
|
@ -1272,7 +1272,8 @@ static const WindowDesc _query_desc = {
|
||||||
* @param message string that will be shown for the window
|
* @param message string that will be shown for the window
|
||||||
* @param parent pointer to parent window, if this pointer is NULL the parent becomes
|
* @param parent pointer to parent window, if this pointer is NULL the parent becomes
|
||||||
* the main window WC_MAIN_WINDOW
|
* the main window WC_MAIN_WINDOW
|
||||||
* @param callback callback function pointer to set in the window descriptor*/
|
* @param callback callback function pointer to set in the window descriptor
|
||||||
|
*/
|
||||||
void ShowQuery(StringID caption, StringID message, Window *parent, QueryCallbackProc *callback)
|
void ShowQuery(StringID caption, StringID message, Window *parent, QueryCallbackProc *callback)
|
||||||
{
|
{
|
||||||
new QueryWindow(&_query_desc, caption, message, parent, callback);
|
new QueryWindow(&_query_desc, caption, message, parent, callback);
|
||||||
|
@ -1382,7 +1383,7 @@ struct SaveLoadWindow : public QueryStringBaseWindow {
|
||||||
void GenerateFileName()
|
void GenerateFileName()
|
||||||
{
|
{
|
||||||
/* Check if we are not a spectator who wants to generate a name..
|
/* Check if we are not a spectator who wants to generate a name..
|
||||||
Let's use the name of player #0 for now. */
|
* Let's use the name of player #0 for now. */
|
||||||
const Player *p = GetPlayer(IsValidPlayerID(_local_player) ? _local_player : PLAYER_FIRST);
|
const Player *p = GetPlayer(IsValidPlayerID(_local_player) ? _local_player : PLAYER_FIRST);
|
||||||
|
|
||||||
SetDParam(0, p->index);
|
SetDParam(0, p->index);
|
||||||
|
|
Loading…
Reference in New Issue