aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Views/View.cs')
-rw-r--r--Views/View.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Views/View.cs b/Views/View.cs
new file mode 100644
index 0000000..5db14c9
--- /dev/null
+++ b/Views/View.cs
@@ -0,0 +1,24 @@
+using System;
+using KukaPizza.Controllers;
+
+namespace KukaPizza.Views
+{
+ public abstract class View
+ {
+ private Controller _controller;
+ public void Init(Controller controller)
+ {
+ _controller = controller;
+ Draw();
+ Interact();
+ }
+
+ protected abstract void Draw();
+ protected abstract void Interact();
+
+ public void NavigateTo(Type view)
+ {
+ Activator.CreateInstance(view, _controller);
+ }
+ }
+} \ No newline at end of file