-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathui.cpp
More file actions
42 lines (32 loc) · 1.02 KB
/
ui.cpp
File metadata and controls
42 lines (32 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// Created by mrjar on 12/1/2025.
//
#include "ui.h"
#include "imgui/imgui.h"
#include "imgui_impl_android.h"
#include "imgui_impl_opengl3.h"
void render_ui() {
ImGui::SetNextWindowPos(ImVec2(10, 10), ImGuiCond_FirstUseEver);
ImGui::SetNextWindowSize(ImVec2(400, 320), ImGuiCond_FirstUseEver);
ImGui::Begin("Aethra Menu", nullptr, ImGuiWindowFlags_AlwaysAutoResize);
ImGui::Text("FPS: %.1f", ImGui::GetIO().Framerate);
ImGui::Separator();
static int clicks = 0;
if (ImGui::Button("Click Me", ImVec2(200, 80))) {
clicks++;
}
ImGui::Text("Button Clicks: %d", clicks);
static bool checkbox = false;
ImGui::Checkbox("Enable", &checkbox);
static float slider = 50.0f;
ImGui::SliderFloat("Value", &slider, 0.0f, 100.0f, "%.1f");
ImGui::Text("Status: %s", checkbox ? "ON" : "OFF");
ImGui::End();
}
void cleanup_ui() {
if (ImGui::GetCurrentContext()) {
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplAndroid_Shutdown();
ImGui::DestroyContext();
}
}