You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.1 KiB
C
52 lines
1.1 KiB
C
|
4 years ago
|
/******************************************************************************
|
||
|
|
* File - iPanel.h
|
||
|
|
* Author - Joey Pollack
|
||
|
|
* Date - 2021/11/01 (y/m/d)
|
||
|
|
* Mod Date - 2021/11/01 (y/m/d)
|
||
|
|
* Description - Base class for all editor panels
|
||
|
|
******************************************************************************/
|
||
|
|
|
||
|
|
#ifndef PANEL_H_
|
||
|
|
#define PANEL_H_
|
||
|
|
|
||
|
4 years ago
|
#include "panel_defs.h"
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
|
||
|
4 years ago
|
struct ImGuiInputTextCallbackData;
|
||
|
|
|
||
|
4 years ago
|
namespace lunarium
|
||
|
4 years ago
|
{
|
||
|
4 years ago
|
namespace gui
|
||
|
4 years ago
|
{
|
||
|
|
class Panel
|
||
|
|
{
|
||
|
|
public:
|
||
|
4 years ago
|
Panel(std::string name, PanelDockZone dock_zone, bool isOpen = false);
|
||
|
4 years ago
|
virtual ~Panel();
|
||
|
4 years ago
|
const char* GetName() const;
|
||
|
4 years ago
|
|
||
|
4 years ago
|
virtual void Update(float dt);
|
||
|
4 years ago
|
virtual bool DoFrame() = 0;
|
||
|
|
void SetOpen(bool isOpen);
|
||
|
|
bool IsOpen();
|
||
|
|
void GetPosition(int& x, int& y) const;
|
||
|
|
void GetSize(int& w, int& h) const;
|
||
|
4 years ago
|
PanelDockZone GetDockZone() const;
|
||
|
4 years ago
|
|
||
|
|
protected:
|
||
|
4 years ago
|
std::string mPanelName;
|
||
|
4 years ago
|
bool mIsOpen;
|
||
|
4 years ago
|
PanelDockZone mDockZone;
|
||
|
4 years ago
|
|
||
|
|
int mX;
|
||
|
|
int mY;
|
||
|
|
int mWidth;
|
||
|
|
int mHeight;
|
||
|
|
|
||
|
|
protected:
|
||
|
|
void UpdateMetaInfo();
|
||
|
|
};
|
||
|
4 years ago
|
}}
|
||
|
4 years ago
|
|
||
|
|
#endif // PANEL_H_
|