diff --git a/bin/data/cmclient-5.grf b/bin/data/cmclient-5.grf index 0232d36916..4cc09957fb 100644 Binary files a/bin/data/cmclient-5.grf and b/bin/data/cmclient-5.grf differ diff --git a/grf/cmclient/gencmclientgrf.py b/grf/cmclient/gencmclientgrf.py index cc37d83792..26ffa70817 100644 --- a/grf/cmclient/gencmclientgrf.py +++ b/grf/cmclient/gencmclientgrf.py @@ -14,9 +14,11 @@ gen.add_sprite(grf.FileSprite(toolbar_png, 0, 0, 20, 14, yofs=4), sprite = lambda *args, **kw: gen.add_sprite(grf.FileSprite(toolbar_png, *args, **kw)) sprite2 = lambda x, y, w, h, x2, y2: gen.add_sprite(grf.FileSprite(toolbar_png, x, y, w, h), grf.FileSprite(toolbar_png, x2, y2, w * 2, h * 2, zoom=grf.ZOOM_2X)) sprite( 0, 44, 12, 10) # hq button icon +sprite( 0, 55, 12, 10) # watch button icon +# sprite2(0, 55, 12, 10, 13, 55) # watch button icon -sprite( 45, 67, 10, 10) # host black -sprite( 45, 44, 10, 10) # player black +sprite(45, 67, 10, 10) # host black +sprite(45, 44, 10, 10) # player black sprite2(85, 67, 11, 11, 97, 67) # host white sprite2(85, 44, 11, 11, 97, 44) # player white diff --git a/grf/cmclient/sprites/toolbar.png b/grf/cmclient/sprites/toolbar.png index 4df996e7c0..40d24dd363 100644 Binary files a/grf/cmclient/sprites/toolbar.png and b/grf/cmclient/sprites/toolbar.png differ diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index ac1d404041..b524146b8a 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1645,6 +1645,11 @@ private: else ScrollMainWindowToTile(company->location_of_HQ); } + static void CMOnClickCompanyWatch(NetworkClientListWindow *w, Point pt, CompanyID company_id) + { + citymania::ShowWatchWindow(company_id, 0); + } + /** * Part of RebuildList() to create the information for a single company. * @param company_id The company to build the list for. @@ -1661,6 +1666,7 @@ private: ButtonCommon *hq_button = new CompanyButton(CM_SPR_HQ, STR_NETWORK_CLIENT_LIST_CHAT_COMPANY_TOOLTIP, COLOUR_ORANGE, company_id, &NetworkClientListWindow::CMOnClickCompanyHQ); if (company->location_of_HQ == INVALID_TILE) hq_button->disabled = true; this->buttons[line_count].emplace_back(hq_button); + this->buttons[line_count].emplace_back(new CompanyButton(CM_SPR_WATCH, STR_NETWORK_CLIENT_LIST_CHAT_COMPANY_TOOLTIP, COLOUR_ORANGE, company_id, &NetworkClientListWindow::CMOnClickCompanyWatch)); } /* CityMania code end */ this->buttons[line_count].emplace_back(chat_button); diff --git a/src/table/sprites.h b/src/table/sprites.h index 954a9c6957..03c7abb38d 100644 --- a/src/table/sprites.h +++ b/src/table/sprites.h @@ -313,7 +313,8 @@ static const uint16 PALETTE_SPRITE_COUNT = 1; static const SpriteID CM_SPR_CITYMANIA_BASE = SPR_PALETTE_BASE + PALETTE_SPRITE_COUNT; static const SpriteID CM_SPR_RAIL_COPY_PASTE = CM_SPR_CITYMANIA_BASE + 2; static const SpriteID CM_SPR_HQ = CM_SPR_CITYMANIA_BASE + 3; -static const SpriteID CM_SPR_HOST = CM_SPR_CITYMANIA_BASE + 4; +static const SpriteID CM_SPR_WATCH = CM_SPR_CITYMANIA_BASE + 4; +static const SpriteID CM_SPR_HOST = CM_SPR_CITYMANIA_BASE + 5; static const SpriteID CM_SPR_PLAYER = CM_SPR_HOST + 1; static const SpriteID CM_SPR_HOST_WHITE = CM_SPR_HOST + 2; static const SpriteID CM_SPR_PLAYER_WHITE = CM_SPR_HOST + 3;