summaryrefslogtreecommitdiff
path: root/engine-ocean/Game/MenuScreen.cpp
diff options
context:
space:
mode:
authorjjesswan <jessica_wan@brown.edu>2024-04-22 21:56:26 -0400
committerjjesswan <jessica_wan@brown.edu>2024-04-22 21:56:26 -0400
commita556b45abf18f1bd509daaf63b66b7d55e9fd291 (patch)
treebc9b8a2d184c12aee236e7f9f276a34b84ca552d /engine-ocean/Game/MenuScreen.cpp
parentcd7c76017a12bb548036571c1ff13e551369d06d (diff)
add engine version
Diffstat (limited to 'engine-ocean/Game/MenuScreen.cpp')
-rw-r--r--engine-ocean/Game/MenuScreen.cpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/engine-ocean/Game/MenuScreen.cpp b/engine-ocean/Game/MenuScreen.cpp
new file mode 100644
index 0000000..dcf2f2e
--- /dev/null
+++ b/engine-ocean/Game/MenuScreen.cpp
@@ -0,0 +1,59 @@
+#include "menuscreen.h"
+#include "Game/GameWorld.h"
+#include "Graphics/global.h"
+
+MenuScreen::MenuScreen(std::map<int, Input>& input_map):
+ m_input_map(input_map)
+{
+
+}
+
+MenuScreen::~MenuScreen(){
+
+}
+
+
+void MenuScreen::update(double deltaTime){
+
+
+}
+
+void MenuScreen::draw(){
+ Global::graphics.setClearColor(glm::vec3(0.f));
+ Global::graphics.clearScreen(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ Global::graphics.bindShader("text");
+ Global::graphics.drawUIText(Global::graphics.getFont("opensans"), "Game Menu", glm::ivec2(200, 200), AnchorPoint::TopLeft, Global::graphics.getFramebufferSize().x, 1.f, 0.1f, glm::vec3(1, 1, 1));
+ Global::graphics.drawUIText(Global::graphics.getFont("opensans"), "Press 'B' to resume the game.", glm::ivec2(20, 70), AnchorPoint::TopLeft, Global::graphics.getFramebufferSize().x, 0.2f, 0.1f, glm::vec3(1, 1, 1));
+
+
+}
+
+void MenuScreen::keyEvent(int key, int action){
+
+}
+
+void MenuScreen::mousePosEvent(double xpos, double ypos){
+
+
+
+}
+
+void MenuScreen::mouseButtonEvent(int button, int action){
+
+
+}
+
+void MenuScreen::scrollEvent(double distance){
+
+
+}
+
+void MenuScreen::framebufferResizeEvent(int width, int height){
+ Global::graphics.setFramebufferSize(glm::ivec2(width, height));
+
+}
+
+void MenuScreen::windowResizeEvent(int width, int height){
+ Global::graphics.setWindowSize(glm::ivec2(width, height));
+
+}