Skip to content

Instantly share code, notes, and snippets.

@chuwilliamson
Last active February 6, 2024 07:31
Show Gist options
  • Save chuwilliamson/a6cbd55915ea146f10378194b1ac8917 to your computer and use it in GitHub Desktop.
Save chuwilliamson/a6cbd55915ea146f10378194b1ac8917 to your computer and use it in GitHub Desktop.
#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