James Cummins / Mbed 2 deprecated el17jnc

Dependencies:   mbed

Revision:
22:4e305ff8a050
Child:
23:61fa82f76808
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Options_Engine/OptionsEngine.h	Thu Apr 18 11:50:53 2019 +0000
@@ -0,0 +1,40 @@
+#ifndef OPTIONSENGINE_H
+#define OPTIONSENGINE_H
+
+#include "mbed.h"
+#include "Gamepad.h"
+#include "N5110.h"
+#include "Ball.h"
+
+enum Option{
+    BRIGHTNESS,
+    BALL_SPEED,
+    HIGH_SCORES
+    };
+
+struct OptionSelection{
+    int output;
+    Option next_state[3];
+    };
+    
+class OptionsEngine {
+
+public:
+    OptionsEngine();    //constructor
+    ~OptionsEngine();   //destructor
+    void init();        //initialiser
+    void options_menu(Gamepad &gamepad, N5110 &lcd);
+    void change_brightness(Gamepad &gamepad, N5110 &lcd);
+
+private:
+    void display_options(N5110 &lcd);
+    Option option_selection(Gamepad &gamepad, N5110 &lcd);
+    void read_brightness_input(Gamepad &gamepad);
+    Option _state;
+    int _next_state;
+    float _brightness;
+    int _ball_speed;
+    Ball _ball;
+    
+};
+#endif
\ No newline at end of file