Editor Refactor
This refactor of the editor code makes the code more maintainable. All widget objects have now moved away from RAII and are now just allocated object that live for the entirety of the applications lifetime. This feels better as I am used to this style plus constantly pushing and popping objects from the stack seems a little wasteful (although I as of right now have no way to prove that it is ).
This commit is contained in:
22
Editor/src/Console.h
Normal file
22
Editor/src/Console.h
Normal file
@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "../../YoggieEngine/src/YoggieEngine.h"
|
||||
#include "EditorWindow.h"
|
||||
#include <imgui.h>
|
||||
|
||||
class Console : public EditorWindow {
|
||||
public:
|
||||
|
||||
Console();
|
||||
~Console();
|
||||
|
||||
void Draw() override;
|
||||
|
||||
void Show();
|
||||
|
||||
void AddLog(const char* fmt, ...);
|
||||
|
||||
private:
|
||||
ImVector<char*> Items;
|
||||
bool AutoScroll;
|
||||
bool ScrollToBottom;
|
||||
};
|
Reference in New Issue
Block a user