Last active
February 6, 2024 07:31
-
-
Save chuwilliamson/a6cbd55915ea146f10378194b1ac8917 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "Application.h" | |
#include <Renderer2D.h> | |
class RPG_Application : public aie::Application | |
{ | |
public: | |
RPG_Application(); | |
virtual ~RPG_Application(); | |
bool startup() override; | |
void shutdown() override; | |
void update(float deltaTime) override; | |
void draw() override; | |
aie::Renderer2D* renderer; | |
}; | |
#include "RPG_Application.h" | |
#include <imgui.h> | |
#include <iostream> | |
RPG_Application::RPG_Application() | |
{ | |
} | |
RPG_Application::~RPG_Application() | |
{ | |
} | |
bool RPG_Application::startup() | |
{ | |
renderer = new aie::Renderer2D(); | |
return true; | |
} | |
void RPG_Application::shutdown() | |
{ | |
} | |
void RPG_Application::update(float deltaTime) | |
{ | |
} | |
void RPG_Application::draw() | |
{ | |
renderer->begin(); | |
if (ImGui::Button("it works", ImVec2(getWindowWidth() / 2, getWindowHeight() / 2))) | |
{ | |
std::cout << "yayyyy"; | |
} | |
renderer->end(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment