1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

* graphical cursors are now posiible, however the code is a bit ugly and eats significant amount of resources (up to 15% of my CPU power)

This commit is contained in:
mateuszb
2007-08-21 13:48:18 +00:00
parent 8c445b0ada
commit 6d3a042add
9 changed files with 354 additions and 5 deletions

View File

@@ -100,7 +100,8 @@ void CPlayerInterface::yourTurn()
//framerate keeper initialized
for(;;) // main loop
{
CGI->screenh->updateScreen();
LOCPLINT->adventureInt->updateScreen = false;
if(SDL_PollEvent(&sEvent)) //wait for event...
{
@@ -163,6 +164,12 @@ void CPlayerInterface::yourTurn()
void CPlayerInterface::handleEvent(SDL_Event *sEvent)
{
current = sEvent;
if(sEvent->type == SDL_MOUSEMOTION)
{
CGI->curh->cursorMove(sEvent->motion.x, sEvent->motion.y);
}
if(sEvent->type==SDL_QUIT)
exit(0);
else if (sEvent->type==SDL_KEYDOWN)