Add About dialog.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
4c8b74332c
commit
6a75299826
2 changed files with 31 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "frontends/sdl/imgui/settingshelper.h"
|
||||
#include "frontends/sdl/sdlframe.h"
|
||||
#include "linux/registry.h"
|
||||
#include "linux/version.h"
|
||||
|
||||
#include "Interface.h"
|
||||
#include "CardManager.h"
|
||||
|
@ -601,6 +602,22 @@ namespace sa2
|
|||
ImGui::End();
|
||||
}
|
||||
|
||||
void ImGuiSettings::showAboutWindow()
|
||||
{
|
||||
if (ImGui::Begin("About", &myShowAbout, ImGuiWindowFlags_AlwaysAutoResize))
|
||||
{
|
||||
ImGui::TextUnformatted("sa2: Apple ][ emulator for Linux");
|
||||
ImGui::Text("Based on AppleWin %s", getVersion().c_str());
|
||||
|
||||
ImGui::Separator();
|
||||
SDL_version sdl;
|
||||
SDL_GetVersion(&sdl);
|
||||
ImGui::Text("SDL version %d.%d.%d", sdl.major, sdl.minor, sdl.patch);
|
||||
ImGui::Text("Dear ImGui %s", ImGui::GetVersion());
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
void ImGuiSettings::show(SDLFrame * frame)
|
||||
{
|
||||
if (myShowSettings)
|
||||
|
@ -618,6 +635,11 @@ namespace sa2
|
|||
showDebugger(frame);
|
||||
}
|
||||
|
||||
if (myShowAbout)
|
||||
{
|
||||
showAboutWindow();
|
||||
}
|
||||
|
||||
if (myShowDemo)
|
||||
{
|
||||
ImGui::ShowDemoWindow(&myShowDemo);
|
||||
|
@ -639,8 +661,14 @@ namespace sa2
|
|||
{
|
||||
DebugBegin();
|
||||
}
|
||||
ImGui::Separator();
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Help"))
|
||||
{
|
||||
ImGui::MenuItem("Demo", nullptr, &myShowDemo);
|
||||
ImGui::Separator();
|
||||
ImGui::MenuItem("About", nullptr, &myShowAbout);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
ImGui::EndMainMenuBar();
|
||||
|
|
|
@ -22,6 +22,7 @@ namespace sa2
|
|||
bool myShowMemory = false;
|
||||
bool myShowDebugger = false;
|
||||
bool mySyncCPU = true;
|
||||
bool myShowAbout = false;
|
||||
|
||||
int myStepCycles = 0;
|
||||
int mySpeakerVolume;
|
||||
|
@ -35,6 +36,7 @@ namespace sa2
|
|||
void showSettings(SDLFrame* frame);
|
||||
void showDebugger(SDLFrame* frame);
|
||||
void showMemory();
|
||||
void showAboutWindow();
|
||||
|
||||
void drawDisassemblyTable();
|
||||
void drawConsole();
|
||||
|
|
Loading…
Add table
Reference in a new issue