Touch/mouse support for storyflow.

This commit is contained in:
Xawotihs
2011-09-17 21:27:36 +00:00
parent c96d2fea55
commit c5203a9caf
2 changed files with 6 additions and 2 deletions
+6
View File
@@ -37,6 +37,12 @@ public:
} }
; ;
virtual float getHeight() = 0; virtual float getHeight() = 0;
virtual bool getTopLeft(float& top, float& left)
{
top = mY;
left = mX;
return true;
}
}; };
class StoryText: public StoryDialogElement class StoryText: public StoryDialogElement
-2
View File
@@ -501,7 +501,6 @@ void StoryDialog::Update(float dt)
void StoryDialog::RenderElement(StoryDialogElement * elmt) void StoryDialog::RenderElement(StoryDialogElement * elmt)
{ {
float mYBackup = elmt->mY;
if (!elmt->mY) elmt->mY = currentY; if (!elmt->mY) elmt->mY = currentY;
if (elmt->mY == -1) if (elmt->mY == -1)
{ {
@@ -510,7 +509,6 @@ void StoryDialog::RenderElement(StoryDialogElement * elmt)
elmt->Render(); elmt->Render();
previousY = currentY; previousY = currentY;
currentY = elmt->mY + elmt->getHeight() + LINE_SPACE; currentY = elmt->mY + elmt->getHeight() + LINE_SPACE;
elmt->mY = mYBackup;
} }
void StoryDialog::Render() void StoryDialog::Render()