Basic about window added, status bar added, docking seems to work correctly
parent
7c0eb5a77a
commit
97db356d66
@ -0,0 +1,38 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* File - about.cpp
|
||||||
|
* Author - Joey Pollack
|
||||||
|
* Date - 2021/11/03 (y/m/d)
|
||||||
|
* Mod Date - 2021/11/03 (y/m/d)
|
||||||
|
* Description - The About panel
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
#include "about.h"
|
||||||
|
#include <dearimgui/imgui.h>
|
||||||
|
#include <core/version.h>
|
||||||
|
|
||||||
|
namespace lunarium
|
||||||
|
{
|
||||||
|
AboutPanel::AboutPanel()
|
||||||
|
: Panel(PanelType::PT_ABOUT)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AboutPanel::DoFrame()
|
||||||
|
{
|
||||||
|
if (!mIsOpen)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
ImGui::SetNextWindowSize(ImVec2(300, ImGui::GetFrameHeight() * 20));
|
||||||
|
if (!ImGui::Begin("About", &mIsOpen, ImGuiWindowFlags_NoCollapse ))
|
||||||
|
{
|
||||||
|
ImGui::End();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::TextWrapped("Lunarium Editor Version %s - Written by Joey Pollack", Version::GetVersion().ToString().c_str());
|
||||||
|
|
||||||
|
ImGui::End();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* File - about.h
|
||||||
|
* Author - Joey Pollack
|
||||||
|
* Date - 2021/11/03 (y/m/d)
|
||||||
|
* Mod Date - 2021/11/03 (y/m/d)
|
||||||
|
* Description - The About panel
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
#ifndef PANEL_ABOUT_H_
|
||||||
|
#define PANEL_ABOUT_H_
|
||||||
|
|
||||||
|
#include "iPanel.h"
|
||||||
|
|
||||||
|
namespace lunarium
|
||||||
|
{
|
||||||
|
class Editor;
|
||||||
|
class AboutPanel : public Panel
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AboutPanel();
|
||||||
|
|
||||||
|
// Returns false if the window is closed
|
||||||
|
bool DoFrame();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // PANEL_ABOUT_H_
|
||||||
Loading…
Reference in New Issue