content browser and textures on entity sprites
This commit is contained in:
@@ -10,10 +10,25 @@
|
||||
int main(int argc, char **argv);
|
||||
|
||||
namespace OpenEngine {
|
||||
|
||||
struct ApplicationCommandLineArgs
|
||||
{
|
||||
int count = 0;
|
||||
char** args = nullptr;
|
||||
|
||||
const char* operator[](int index)
|
||||
{
|
||||
OE_CORE_ASSERT(index < count, "Index is higher than argument count.");
|
||||
|
||||
return args[index];
|
||||
};
|
||||
};
|
||||
|
||||
class Application
|
||||
{
|
||||
public:
|
||||
Application(const std::string& name = "OpenEngine Project");
|
||||
Application(const std::string& name,
|
||||
ApplicationCommandLineArgs& args);
|
||||
~Application();
|
||||
|
||||
virtual void OnEvent(Event& event);
|
||||
@@ -25,6 +40,7 @@ namespace OpenEngine {
|
||||
ImGuiLayer* GetImGuiLayer() { return imgui_layer.get(); };
|
||||
|
||||
inline static Application& Get() { return *instance; };
|
||||
ApplicationCommandLineArgs GetCommandLineArgs() const { return arguments; };
|
||||
|
||||
inline Window& GetWindow() { return *window; };
|
||||
|
||||
@@ -36,6 +52,7 @@ namespace OpenEngine {
|
||||
bool OnWindowResize(WindowResizeEvent& event);
|
||||
|
||||
private:
|
||||
ApplicationCommandLineArgs arguments;
|
||||
const std::string name;
|
||||
std::unique_ptr<Window> window;
|
||||
|
||||
@@ -49,7 +66,7 @@ namespace OpenEngine {
|
||||
};
|
||||
|
||||
// Is defined by client
|
||||
Application* CreateApplication();
|
||||
Application* CreateApplication(ApplicationCommandLineArgs args);
|
||||
}
|
||||
|
||||
#endif // APPLICATION_HPP
|
||||
|
||||
Reference in New Issue
Block a user