summaryrefslogtreecommitdiff
path: root/src/preview/PreviewView.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-22 14:13:24 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-22 14:13:24 (GMT)
commite6e23669eea8768ec004c16437c67717b66fb1a0 (patch)
treed78783f0bf1ad85f926503c32a8f8893c33d8cc5 /src/preview/PreviewView.h
parent2e48bd149ce70eb5e0f5ade518ff7709708ef49e (diff)
downloadpowder-e6e23669eea8768ec004c16437c67717b66fb1a0.zip
powder-e6e23669eea8768ec004c16437c67717b66fb1a0.tar.gz
Scrollable comments
Diffstat (limited to 'src/preview/PreviewView.h')
-rw-r--r--src/preview/PreviewView.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/preview/PreviewView.h b/src/preview/PreviewView.h
index 011f864..33510a2 100644
--- a/src/preview/PreviewView.h
+++ b/src/preview/PreviewView.h
@@ -9,6 +9,7 @@
#define PREVIEWVIEW_H_
#include <vector>
+#include "Comment.h"
#include "interface/Window.h"
#include "preview/PreviewController.h"
#include "preview/PreviewModel.h"
@@ -29,11 +30,18 @@ class PreviewView: public ui::Window {
ui::Label * saveNameLabel;
ui::Label * authorDateLabel;
ui::Textblock * saveDescriptionTextblock;
+ std::vector<SaveComment> comments;
std::vector<ui::Component*> commentComponents;
std::vector<ui::Component*> commentTextComponents;
int votesUp;
int votesDown;
bool doOpen;
+
+ int maxOffset;
+ float commentsOffset;
+ float commentsVel;
+
+ void displayComments(int yOffset);
public:
void AttachController(PreviewController * controller) { c = controller;}
PreviewView();
@@ -43,6 +51,7 @@ public:
virtual void DoDraw();
virtual void OnTick(float dt);
virtual void OnMouseDown(int x, int y, unsigned button);
+ virtual void OnMouseWheel(int x, int y, int d);
virtual ~PreviewView();
};