mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-27 21:49:10 +02:00
* added hints in town lists
* eliminated square from city hints * version changed on 0.53c
This commit is contained in:
parent
06c193498e
commit
83b5c78d5a
@ -5,6 +5,7 @@
|
||||
#include "hch\CLodHandler.h"
|
||||
#include "hch\CPreGameTextHandler.h"
|
||||
#include "hch/CTownHandler.h"
|
||||
#include "CLua.h"
|
||||
template <typename T>
|
||||
AdventureMapButton<T>::AdventureMapButton ()
|
||||
{
|
||||
@ -177,30 +178,30 @@ void CTownList<T>::mouseMoved (SDL_MouseMotionEvent & sEvent)
|
||||
if(isItIn(&arrupp,LOCPLINT->current->motion.x,LOCPLINT->current->motion.y))
|
||||
{
|
||||
if (from>0)
|
||||
LOCPLINT->adventureInt->statusbar.print(CGI->preth->zelp[306].first);
|
||||
LOCPLINT->statusbar->print(CGI->preth->zelp[306].first);
|
||||
else
|
||||
LOCPLINT->adventureInt->statusbar.clear();
|
||||
LOCPLINT->statusbar->clear();
|
||||
return;
|
||||
}
|
||||
else if(isItIn(&arrdop,LOCPLINT->current->motion.x,LOCPLINT->current->motion.y))
|
||||
{
|
||||
if ((items.size()-from) > SIZE)
|
||||
LOCPLINT->adventureInt->statusbar.print(CGI->preth->zelp[307].first);
|
||||
LOCPLINT->statusbar->print(CGI->preth->zelp[307].first);
|
||||
else
|
||||
LOCPLINT->adventureInt->statusbar.clear();
|
||||
LOCPLINT->statusbar->clear();
|
||||
return;
|
||||
}
|
||||
//if not buttons then heroes
|
||||
//if not buttons then towns
|
||||
int hx = LOCPLINT->current->motion.x, hy = LOCPLINT->current->motion.y;
|
||||
hx-=pos.x;
|
||||
hy-=pos.y; hy-=arrup->ourImages[0].bitmap->h;
|
||||
float ny = (float)hy/(float)32;
|
||||
if ((ny>SIZE || ny<0) || (from+ny>=items.size()))
|
||||
{
|
||||
LOCPLINT->adventureInt->statusbar.clear();
|
||||
LOCPLINT->statusbar->clear();
|
||||
return;
|
||||
};
|
||||
//LOCPLINT->adventureInt->statusbar.print( items[from+ny]->name + ", " + items[from+ny]->town->name ); //TODO - uncomment when pointer to the town type is initialized
|
||||
LOCPLINT->statusbar->print(items[from+ny]->state->hoverText(const_cast<CGTownInstance*>(items[from+ny])));
|
||||
}
|
||||
template<typename T>
|
||||
void CTownList<T>::clickLeft(tribool down)
|
||||
|
1
CLua.h
1
CLua.h
@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#include "global.h"
|
||||
#include "lstate.h"
|
||||
#include <set>
|
||||
|
2
CMT.cpp
2
CMT.cpp
@ -62,7 +62,7 @@
|
||||
CGameInfo* CGI;
|
||||
#endif
|
||||
#define CHUNK 16384
|
||||
const char * NAME = "VCMI 0.53b \"Tirion\" Techdemo";
|
||||
const char * NAME = "VCMI 0.53c \"Tirion\" Techdemo";
|
||||
|
||||
SDL_Surface * ekran, * screen, * screen2;
|
||||
extern SDL_Surface * CSDL_Ext::std32bppSurface;
|
||||
|
@ -25,6 +25,7 @@ void CTownHandler::loadNames()
|
||||
CTown town;
|
||||
ins.getline(bufname,50);
|
||||
town.name = std::string(bufname);
|
||||
town.name = town.name.substr(0,town.name.size()-1);
|
||||
for (int i=0; i<NAMES_PER_TOWN; i++)
|
||||
{
|
||||
names.getline(bufname,50);
|
||||
|
@ -1681,5 +1681,5 @@ unsigned char CMapHandler::getDir(const int3 &a, const int3 &b)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
|
||||
return -2; //shouldn't happen
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user