Port 2V0-f window input and UI render command bridge
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// Commands emitted by the 40250 UI drawing calls, consumed by Godot's CanvasItem.
|
||||
// The port layer stays independent of godot-cpp.
|
||||
struct UIRenderCommand {
|
||||
enum Kind { Bar, Line, Text, Image } kind;
|
||||
float x1, y1, x2, y2;
|
||||
std::uint32_t argb;
|
||||
float clip_x1 = 0, clip_y1 = 0, clip_x2 = 0, clip_y2 = 0;
|
||||
std::string text;
|
||||
};
|
||||
|
||||
void UIRenderSetSize(int width, int height);
|
||||
void UIRenderGetSize(unsigned* width, unsigned* height);
|
||||
void UIRenderBeginFrame();
|
||||
void UIRenderAdd(UIRenderCommand command);
|
||||
const std::vector<UIRenderCommand>& UIRenderCommands();
|
||||
void UIRenderSetClip(float x, float y, float width, float height);
|
||||
void UIRenderRestoreClip();
|
||||
Reference in New Issue
Block a user