diff options
author | Stijn Buys <ingar@osirion.org> | 2008-08-07 23:27:42 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-08-07 23:27:42 +0000 |
commit | a743791e624590e0b41229f28f940db5272b60ba (patch) | |
tree | 6a6ec736e4ed34d5254a292889e6e33300919a63 /src/client/view.cc | |
parent | 1f36b993d603c56251aa15eb6edc6b92ecf599ae (diff) |
rotating planets, navpoints, network protocol updates, entity event state
Diffstat (limited to 'src/client/view.cc')
-rw-r--r-- | src/client/view.cc | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/client/view.cc b/src/client/view.cc index 5879728..eef3920 100644 --- a/src/client/view.cc +++ b/src/client/view.cc @@ -170,15 +170,32 @@ void draw_status() status << "^Nspeed ^B" << std::setfill(' ') << std::setw(5) << std::fixed << std::setprecision(2) << core::localcontrol()->speed(); - Text::draw(4, video::height - Text::fontheight() -4, status); + Text::draw(4, video::height - Text::fontheight()-4, status); + + unsigned int state = core::localcontrol()->eventstate(); + if (state) { + std::stringstream statestr; + statestr.clear(); + if (state == core::Entity::ImpulseInitiate) { + statestr << "^FInitializing kinetic impulse drive " << core::localcontrol()->timer(); + } else if (state == core::Entity::Impulse) { + statestr << "^FKinetic impulse"; + } else if (state == core::Entity::JumpInitiate) { + statestr << "^FInitializing hyperspace jump drive "<< core::localcontrol()->timer(); + } else if (state == core::Entity::Jump) { + statestr << "^FJumping..."; + } + + Text::draw(4, video::height - Text::fontheight()*2-4, statestr); + } if (draw_location->value()) { std::stringstream location; - location << "^Nloc ^B" << std::fixed << std::setprecision(2) << std::setfill(' ') << - std::setw(7) << core::localcontrol()->location().x << " " << - std::setw(7) << core::localcontrol()->location().y << " " << - std::setw(7) << core::localcontrol()->location().z; - Text::draw(4, video::height - Text::fontheight()*2 -4, location); + location << std::fixed << std::setprecision(2) + << "^Nx:^B" << core::localcontrol()->location().x << " " + << "^Ny:^B" << core::localcontrol()->location().y << " " + << "^Nz:^B" << core::localcontrol()->location().z << '\n'; + Text::draw(4, video::height - Text::fontheight()*3 -4, location); } float y = 1.0f; |