mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-08-13 17:03:47 -04:00
d24c8453db
subrepo: subdir: "libultraship" merged: "a484cda98" upstream: origin: "https://github.com/HarbourMasters/libultraship.git" branch: "main" commit: "a484cda98" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
58 lines
1.1 KiB
C++
58 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "SohConsole.h"
|
|
|
|
struct GameAsset {
|
|
uint32_t textureId;
|
|
int width;
|
|
int height;
|
|
};
|
|
|
|
namespace SohImGui {
|
|
enum class Backend {
|
|
DX11,
|
|
SDL
|
|
};
|
|
|
|
enum class Dialogues {
|
|
dConsole,
|
|
dMenubar,
|
|
dLoadSettings,
|
|
};
|
|
|
|
typedef struct {
|
|
Backend backend;
|
|
union {
|
|
struct {
|
|
void* window;
|
|
void* device_context;
|
|
void* device;
|
|
} dx11;
|
|
struct {
|
|
void* window;
|
|
void* context;
|
|
} sdl;
|
|
};
|
|
} WindowImpl;
|
|
|
|
typedef union {
|
|
struct {
|
|
void* handle;
|
|
int msg;
|
|
int wparam;
|
|
int lparam;
|
|
} win32;
|
|
struct {
|
|
void* event;
|
|
} sdl;
|
|
} EventImpl;
|
|
|
|
extern Console* console;
|
|
void Init(WindowImpl window_impl);
|
|
void Update(EventImpl event);
|
|
void Draw(void);
|
|
void ShowCursor(bool hide, Dialogues w);
|
|
void BindCmd(const std::string& cmd, CommandEntry entry);
|
|
void* GetTextureByID(int id);
|
|
}
|