Touch/mouse support for storyflow.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user