mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-06-17 04:16:48 -07:00
This adds luajit-imgui without submodules. Signed-off-by: Ronald Caesar <github43132@proton.me>
35 lines
1.2 KiB
Lua
35 lines
1.2 KiB
Lua
|
|
|
|
-- glfw3 implementation and extras ----------------------------------------
|
|
local cdecl = cdecl or ''
|
|
cdecl = cdecl..[[
|
|
|
|
|
|
//addons
|
|
bool Knob(const char* label, float* value_p, float minv, float maxv);
|
|
|
|
//Log
|
|
typedef struct Log Log;
|
|
Log* Log_new();
|
|
void Log_Add(Log* log,const char* fmt, ...);
|
|
void Log_Draw(Log* log, const char* title); //, bool* p_open = NULL
|
|
void Log_delete(Log* log);
|
|
|
|
]]
|
|
|
|
|
|
|
|
if jit.os == "Windows" then
|
|
cdecl = cdecl..[[
|
|
|
|
// Helpers: UTF-8 <> wchar
|
|
int igImTextStrToUtf8(char* buf, int buf_size, const ImWchar* in_text, const ImWchar* in_text_end); // return output UTF-8 bytes count
|
|
int igImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end); // return input UTF-8 bytes count
|
|
int igImTextStrFromUtf8(ImWchar* buf, int buf_size, const char* in_text, const char* in_text_end, const char** in_remaining); // return input UTF-8 bytes count
|
|
int igImTextCountCharsFromUtf8(const char* in_text, const char* in_text_end); // return number of UTF-8 code-points (NOT bytes count)
|
|
int igImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end); // return number of bytes to express string as UTF-8 code-points
|
|
|
|
]]
|
|
end
|
|
|
|
return cdecl |