- added patch from Taoki for showing time of game day under minimap (thanks)
This commit is contained in:
parent
3c1651d084
commit
648c3e190a
|
@ -3768,6 +3768,11 @@ void Game::render2d() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clock
|
||||||
|
if(photoModeEnabled == false) {
|
||||||
|
renderer.renderClock();
|
||||||
|
}
|
||||||
|
|
||||||
//resource info
|
//resource info
|
||||||
if(photoModeEnabled == false) {
|
if(photoModeEnabled == false) {
|
||||||
if(this->masterserverMode == false) {
|
if(this->masterserverMode == false) {
|
||||||
|
|
|
@ -2241,6 +2241,36 @@ void Renderer::renderChatManager(const ChatManager *chatManager) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Renderer::renderClock() {
|
||||||
|
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Metrics &metrics = Metrics::getInstance();
|
||||||
|
const World *world = game->getWorld();
|
||||||
|
const Vec4f fontColor = game->getGui()->getDisplay()->getColor();
|
||||||
|
|
||||||
|
int hours = world->getTimeFlow()->getTime();
|
||||||
|
int minutes = (world->getTimeFlow()->getTime() - hours) * 100 * 0.6; // scale 100 to 60
|
||||||
|
|
||||||
|
char szBuf[100]="";
|
||||||
|
sprintf(szBuf,"%.2d:%.2d",hours,minutes);
|
||||||
|
string str = szBuf;
|
||||||
|
|
||||||
|
if(renderText3DEnabled == true) {
|
||||||
|
renderTextShadow3D(
|
||||||
|
str, CoreData::getInstance().getDisplayFontSmall3D(),
|
||||||
|
fontColor,
|
||||||
|
10, metrics.getVirtualH()-160, false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
renderTextShadow(
|
||||||
|
str, CoreData::getInstance().getDisplayFontSmall(),
|
||||||
|
fontColor,
|
||||||
|
10, metrics.getVirtualH()-160, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Renderer::renderResourceStatus() {
|
void Renderer::renderResourceStatus() {
|
||||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == true) {
|
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == true) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -478,6 +478,7 @@ public:
|
||||||
void renderConsoleLine(int lineIndex, int xPosition, int yPosition, int lineHeight, Font2D* font, string stringToHightlight, const ConsoleLineInfo *lineInfo);
|
void renderConsoleLine(int lineIndex, int xPosition, int yPosition, int lineHeight, Font2D* font, string stringToHightlight, const ConsoleLineInfo *lineInfo);
|
||||||
|
|
||||||
void renderChatManager(const ChatManager *chatManager);
|
void renderChatManager(const ChatManager *chatManager);
|
||||||
|
void renderClock();
|
||||||
void renderResourceStatus();
|
void renderResourceStatus();
|
||||||
void renderSelectionQuad();
|
void renderSelectionQuad();
|
||||||
void renderText(const string &text, Font2D *font, float alpha, int x, int y, bool centered= false);
|
void renderText(const string &text, Font2D *font, float alpha, int x, int y, bool centered= false);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user