From cede0f2cad86066ec7b2a1d474a4ca48d8d8b618 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sun, 28 Feb 2010 13:53:20 +0000 Subject: [PATCH] Add start of loading/unloading window --- layouts/game.xml | 5 +++-- maps/goods_demo/goods_demo.xml | 2 +- src/Game.cpp | 10 ++++++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/layouts/game.xml b/layouts/game.xml index c9bfa5f..2d76210 100644 --- a/layouts/game.xml +++ b/layouts/game.xml @@ -20,7 +20,8 @@ colour="255 0 0"/> - - + + diff --git a/maps/goods_demo/goods_demo.xml b/maps/goods_demo/goods_demo.xml index e22fb8f..3fb9086 100644 --- a/maps/goods_demo/goods_demo.xml +++ b/maps/goods_demo/goods_demo.xml @@ -2,7 +2,7 @@ No Name - + Station1 diff --git a/src/Game.cpp b/src/Game.cpp index 8cb4b46..6000fa5 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -153,7 +153,7 @@ void Game::overlay() const void Game::stoppedAtStation() { - debug() << "Stopped at " << activeStation->name(); + layout->get("/station").visible(true); } void Game::update(IPickBufferPtr aPickBuffer, int aDelta) @@ -202,15 +202,21 @@ void Game::nearStation(IStationPtr s) if (s != activeStation) { activeStation = s; s->setHighlightVisible(true); + + gui::Widget& stationWnd = layout->get("/station"); + + layout->cast("/station/name").text(s->name()); } } // Signal that we are no longer at or approaching a station void Game::leftStation() -{ +{ if (activeStation) { activeStation->setHighlightVisible(false); activeStation.reset(); + + layout->get("/station").visible(false); } } -- 2.39.2