styyx-util 1.0
Utility Header for SKSE Plugin development
Loading...
Searching...
No Matches
FUCK_API.h
Go to the documentation of this file.
1#pragma once
2#include <imgui.h>
3
4#define FUCK_API_VERSION 2
5
6// ==================================================
7// [ SECTION 1 ] TYPES & INTERFACES
8// ==================================================
9
10namespace FUCK
11{
12inline const char* g_pluginName = "UnknownPlugin";
13
14// --- Core Enums ---
15enum class Font
16{
19};
20
29
35
36enum class Modifier
37{
38 kShift = 0,
39 kCtrl = 1,
40 kAlt = 2
41};
42
49
51{
52 kLocked, // Grey
53 kNormal, // Purple
54 kSelected, // Green
55 kHovered // Bright Green
56};
57
58enum class TableBgTarget
59{
60 kNone = 0,
64};
65
66// --- Bitflags ---
67enum class WindowFlags
68{
69 kNone = 0,
70 kPauseHard = 1 << 0, // Fully suspends the game engine
71 kPauseSoft = 1 << 1, // Freezes game time
72 kBlockVanity = 1 << 2, // Prevents idle vanity camera
73 kHideHUD = 1 << 3, // Hides the in-game HUD
74 kBlurBackground = 1 << 4, // Blurs the game world
75 kPassInputToGame = 1 << 5, // Allows player control while open
76 kCloseOnEsc = 1 << 6, // Closes when Escape is pressed
77 kCloseOnGameMenu = 1 << 7, // Hides when native game menus open
78 kNoDecoration = 1 << 8, // Removes title bar and controls
79 kNoBackground = 1 << 9, // Makes window background transparent
80 kExtendBorder = 1 << 10, // Draws border outside window bounds
81 kNoResize = 1 << 11, // Prevents manual resizing by the user
82 kNoMove = 1 << 12, // Prevents manual dragging by the user
83 kAutoResize = 1 << 13, // Sizes automatically to contents
84 kIgnoreUserScale = 1 << 14, // Ignores global UI scaling slider
85 kCustomPosition = 1 << 15 // Opts out of Host-managed pos saving/loading
86};
87
110
112{
113 kNone = 0,
114 kDisabled = 1 << 0,
115 kDefaultHide = 1 << 1,
116 kDefaultSort = 1 << 2,
118 kWidthFixed = 1 << 4,
119 kNoResize = 1 << 5,
120 kNoReorder = 1 << 6,
121 kNoHide = 1 << 7,
122 kNoClip = 1 << 8,
123 kNoSort = 1 << 9,
126 kNoHeaderLabel = 1 << 12,
127 kNoHeaderWidth = 1 << 13,
130 kIndentEnable = 1 << 16,
132};
133
148
149enum class ItemFlags
150{
151 kNone = 0,
152 kNoTabStop = 1 << 0,
154 kDisabled = 1 << 2,
155 kNoNav = 1 << 3
156};
157
165
167{
168 return static_cast<WindowFlags>(static_cast<int>(a) | static_cast<int>(b));
169}
171{
172 return (static_cast<int>(a) & static_cast<int>(b)) != 0;
173}
175{
176 return static_cast<TableFlags>(static_cast<int>(a) | static_cast<int>(b));
177}
179{
180 return static_cast<TableColumnFlags>(static_cast<int>(a) | static_cast<int>(b));
181}
183{
184 return static_cast<DragDropFlags>(static_cast<int>(a) | static_cast<int>(b));
185}
187{
188 return (static_cast<int>(a) & static_cast<int>(b)) != 0;
189}
191{
192 return static_cast<ItemFlags>(static_cast<int>(a) | static_cast<int>(b));
193}
195{
196 return (static_cast<int>(a) & static_cast<int>(b)) != 0;
197}
198
199enum class HotkeyFlags : int
200{
201 kNone = 0,
202 kAlignNear = 1 << 0,
203 kLabelRight = 1 << 1,
207};
209{
210 return static_cast<HotkeyFlags>(static_cast<int>(a) | static_cast<int>(b));
211}
213{
214 return (static_cast<int>(a) & static_cast<int>(b)) != 0;
215}
216
218{
219 std::uint32_t kKey = 0, gKey = 0;
220 std::int32_t kMod1 = -1, gMod1 = -1;
221 std::int32_t kMod2 = -1, gMod2 = -1;
222 bool isBinding = false;
223 bool wasTriggered = false;
224 bool waitForRelease = false;
225 bool disallowModifiers = false; // Single-key binds only, modifier keys treated as bindable.
226
227 void Clear()
228 {
229 kKey = gKey = 0;
230 kMod1 = gMod1 = kMod2 = gMod2 = -1;
231 isBinding = false;
232 wasTriggered = false;
233 waitForRelease = false;
234 }
235};
236
237// --- Extension Interfaces ---
238
240class ITool
241{
242 public:
243 virtual ~ITool() = default;
244
247 virtual const char* PluginName() const { return FUCK::g_pluginName; }
248
249 virtual const char* Name() const = 0;
250 virtual const char* Group() const { return nullptr; }
251 virtual void Draw() = 0;
252 virtual void RenderOverlay() {}
253 virtual void OnOpen() {}
254 virtual void OnClose() {}
255 virtual bool OnAsyncInput(const void*) { return false; }
256 virtual bool ShowInSidebar() const { return true; }
257};
258
262{
263 public:
264 virtual ~IWindow() = default;
265
269 virtual const char* Id() const = 0;
270
273 virtual const char* PluginName() const { return FUCK::g_pluginName; }
274
277 virtual const char* Title() const = 0;
278
279 virtual void Draw() = 0;
280 virtual void RenderOverlay() {}
281 virtual bool IsOpen() const = 0;
282 virtual void SetOpen(bool a_open) = 0;
283 virtual WindowFlags GetFlags() const { return WindowFlags::kNone; }
284 virtual ImVec2 GetDefaultSize() const { return ImVec2(400.0f, 300.0f); }
285 virtual ImVec2 GetDefaultPos() const { return ImVec2(0.0f, 0.0f); }
286
287 virtual bool OnAsyncInput(const void*) { return false; }
288};
289} // namespace FUCK
290
291// ==================================================
292// [ SECTION 2 ] C-ABI INTERFACE
293// ==================================================
294
295#pragma pack(push, 1)
297{
298 unsigned int version;
299
300 // Registration
304
305 // Display
307 float (*GetGlobalScale)();
308 float (*GetUserScale)();
309 void (*GetDisplaySize)(float*, float*);
310 void (*TranslateScaleformToScreen)(float, float, float*, float*);
311 ImFont* (*GetFont)(FUCK::Font);
312 void (*PushFont)(ImFont*, float);
313 void (*PopFont)();
314 void (*SuspendRendering)(bool);
315 void (*SetMenuOpen)(bool);
316 bool (*IsMenuOpen)();
317
318 // IO
319 float (*GetDeltaTime)();
320 double (*GetTime)();
321 void (*GetMouseDelta)(float*, float*);
322 void (*GetMousePos)(float*, float*);
323 float (*GetMouseWheel)();
324
325 // Styling
326 void (*PushStyleColor)(ImGuiCol, const ImVec4&);
327 void (*PopStyleColor)(int);
328 void (*PushStyleVar)(ImGuiStyleVar, float);
329 void (*PushStyleVarVec)(ImGuiStyleVar, const ImVec2&);
330 void (*PopStyleVar)(int);
331 float (*GetStyleVar)(ImGuiStyleVar);
332 void (*GetStyleVarVec)(ImGuiStyleVar, float*, float*);
333 void (*GetStyleColorVec4)(ImGuiCol, float*, float*, float*, float*);
334 void (*SetWindowFontScale)(float);
335
336 // Layout
337 void (*SetCursorPosX)(float);
338 void (*SetCursorPosY)(float);
339 void (*GetCursorPos)(float*, float*);
340 void (*SetCursorPos)(float, float);
341 void (*GetCursorScreenPos)(float*, float*);
342 void (*SetCursorScreenPos)(float, float);
344 void (*GetContentRegionAvail)(float*, float*);
345 float (*CalcItemWidth)();
346 void (*CalcTextSize)(const char*, const char*, bool, float, float*, float*);
347 void (*GetItemRectMin)(float*, float*);
348 void (*GetItemRectMax)(float*, float*);
349 void (*SetNextItemWidth)(float);
350 void (*SetNextItemOpen)(bool, int);
351 void (*Dummy)(float, float);
352 void (*Spacing)();
353 void (*Separator)();
354 void (*SeparatorThick)();
355 void (*SeparatorText)(const char*);
356 float (*GetColumnWidth)(int);
357
358 // Metrics
361 float (*GetFrameHeight)();
363
364 // Utils
365 void (*LoadTranslation)(const char*);
366 const char* (*GetTranslation)(const char*);
367 void (*SanitizePath)(char*, const char*, size_t);
368 void (*GetPluginConfigPath)(const char*, char*, size_t);
369 void (*LoadPluginINI)(const char* pluginName, void* userdata, void (*callback)(CSimpleIniA&, void*));
370 void (*SavePluginINI)(const char* pluginName, void* userdata, void (*callback)(CSimpleIniA&, void*));
371 void (*LoadPluginINIDefaults)(const char*, void*, void (*)(CSimpleIniA&, void*));
372 void (*LoadPluginKeybinds)(const char* pluginName, void* userdata, void (*callback)(CSimpleIniA&, void*));
373 void (*SavePluginKeybinds)(const char* pluginName, void* userdata, void (*callback)(CSimpleIniA&, void*));
374 void (*LoadPluginKeybindsDefaults)(const char* pluginName, void* userdata, void (*callback)(CSimpleIniA&, void*));
376 void (*PopItemFlag)();
377 void (*HelpMarker)(const char*);
378 void (*PushID_Str)(const char*);
379 void (*PushID_Int)(int);
380 void (*PushID_Ptr)(const void*);
381 void (*PopID)();
382
383 // Menu Events
384 void (*AddMenuListener)(void* userdata, void (*callback)(const char* menuName, bool opening, void* userdata));
385 void (*RemoveMenuListener)(void* userdata);
386
387 // Assets
388 void* (*LoadImage)(const char*, bool);
389 void (*ReleaseImage)(void*);
390 void (*GetImageInfo)(void*, float*, float*);
391 void* (*GetIconForKey)(std::uint32_t);
392 void (*GetIconSizeForKey)(std::uint32_t, float*, float*);
393 void (*Spinner)(const char*, float, float, const ImVec4&);
394 void (*DrawOverlay)(FUCK::Overlay, float, ImU32, float, float, float, float);
395
396 // Game Control
397 void (*SetGameTimeFrozen)(bool);
398 void (*SetAutoVanityBlocked)(bool);
399 void (*SetHardPause)(bool);
400 void (*SetSoftPause)(bool);
401 void (*ForceCursor)(bool);
402
403 // Input
404 bool (*IsInputPressed)(const void*, std::uint32_t);
405 bool (*IsInputDown)(std::uint32_t);
406 float (*GetAnalogInput)(std::uint32_t);
409 const char* (*GetKeyName)(std::uint32_t);
410 bool (*IsGamepadKey)(std::uint32_t);
411
412 bool (*IsBinding)();
413 void (*AbortBinding)();
414 void (*StartBinding)(std::uint32_t, std::int32_t, std::int32_t, bool);
415 FUCK::BindResult (*UpdateBinding)(const void*, std::uint32_t*, std::int32_t*, std::int32_t*);
416 FUCK::BindResult (*GetInputBind)(const void*, std::uint32_t*, std::int32_t*, std::int32_t*);
417
418 bool (*DrawManagedHotkey)(const char*, FUCK::ManagedHotkey*, int, float, float);
422
423 // Interaction
424 bool (*IsPopupOpen)(const char*, int);
425 bool (*IsItemHovered)(int);
426 bool (*IsItemClicked)(int);
427 bool (*IsItemActive)();
428 bool (*IsItemFocused)();
433 bool (*IsWindowFocused)(int);
434 bool (*IsWindowHovered)(int);
435 bool (*IsMouseDown)(int);
436 bool (*IsMouseClicked)(int, bool);
437 bool (*IsMouseReleased)(int);
438 bool (*IsKeyDown)(ImGuiKey);
439 bool (*IsKeyPressed)(ImGuiKey, bool);
442
444 bool (*SetDragDropPayload)(const char*, const void*, size_t, int);
447 const ImGuiPayload* (*AcceptDragDropPayload)(const char*, int);
449
450 // Drawing Primitives
451 void (*DrawRect)(const ImVec2&, const ImVec2&, const ImVec4&, float, float);
452 void (*DrawRectFilled)(const ImVec2&, const ImVec2&, const ImVec4&, float);
453 void (*DrawLine)(const ImVec2&, const ImVec2&, const ImVec4&, float);
454 void (*DrawImage)(void*, const ImVec2&, const ImVec2&, const ImVec2&, const ImVec4&);
455 void (*DrawImageQuad)(void*, const ImVec2&, const ImVec2&, const ImVec2&, const ImVec2&, const ImVec2&,
456 const ImVec2&, const ImVec2&, const ImVec2&, const ImVec4&);
457 void (*AddImage)(void*, const ImVec2&, const ImVec2&, const ImVec2&, const ImVec2&, const ImVec4&);
458 void (*DrawBackgroundImage)(void*, float);
459 void (*DrawBackgroundLine)(float, float, float, float, unsigned int, float);
460 void (*DrawBackgroundRect)(const ImVec2&, const ImVec2&, ImU32, float);
461
462 // Screen primitives
463 void (*DrawScreenRect)(const ImVec2&, const ImVec2&, ImU32, float, float);
464 void (*DrawScreenRectFilled)(const ImVec2&, const ImVec2&, ImU32, float);
465 void (*DrawScreenLine)(float, float, float, float, ImU32, float);
466
467 // Windows
468 void (*SetNextWindowPos)(float, float, int, float, float);
469 void (*SetNextWindowSize)(float, float, int);
470 void (*GetWindowPos)(float*, float*);
471 void (*GetWindowSize)(float*, float*);
472 void (*SetWindowPos)(float, float, int);
473 void (*SetWindowSize)(float, float, int);
474 bool (*BeginWindow)(const char*, bool*, int);
475 void (*EndWindow)();
477 void (*BeginChild)(const char*, float, float, bool, int);
478 void (*EndChild)();
479 bool (*TreeNode)(const char*);
480 void (*TreePop)();
481 bool (*BeginPopupContextItem)(const char*, int);
482 void (*EndPopup)();
483
484 // Widgets
485 bool (*Button)(const char*);
486 bool (*InvisibleButton)(const char*, const ImVec2&, int);
487 bool (*Checkbox)(const char*, bool*, bool, bool);
488 bool (*Hotkey)(const char*, std::uint32_t, std::int32_t, std::int32_t, bool, bool, bool);
489 bool (*ToggleButton)(const char*, bool*, bool, bool);
490 bool (*InputText)(const char*, char*, size_t, int);
491 bool (*ColorEdit3)(const char*, float[3], int);
492 bool (*ColorEdit4)(const char*, float[4], int);
493 bool (*SliderFloat)(const char*, float*, float, float, const char*);
494 bool (*SliderInt)(const char*, int*, int, int, const char*);
495 bool (*DragInt)(const char*, int*, float, int, int, const char*);
496 bool (*DragFloat)(const char*, float*, float, float, float, const char*);
497 bool (*DragFloat2)(const char*, float[2], float, float, float, const char*);
498 bool (*DragFloat3)(const char*, float[3], float, float, float, const char*);
499 bool (*DragFloat4)(const char*, float[4], float, float, float, const char*);
500 bool (*Combo)(const char*, int*, const char* const*, int);
501 bool (*ComboWithFilter)(const char*, int*, const char* const*, int, int);
502 bool (*ComboForm)(const char*, std::uint32_t*, std::uint8_t);
503 bool (*ComboFormStr)(const char*, char*, size_t, std::uint8_t);
504 bool (*Selectable)(const char*, bool, int, const ImVec2&);
505 ImGuiTableSortSpecs* (*GetTableSortSpecs)();
506 void (*Header)(const char*);
507 void (*LeftLabel)(const char*);
508
509 void (*TextColored)(const ImVec4&, const char*);
510 void (*TextColoredWrapped)(const ImVec4&, const char*);
511 void (*TextDisabled)(const char*);
512 void (*CenteredText)(const char*, bool);
513 void (*CenteredTextWithArrows)(const char*, const char*, bool*, bool*, bool*);
514
515 bool (*ButtonIconWithLabel)(const char*, void*, float, float, bool, bool);
516 bool (*ImageButton)(const char*, void*, float, float, const ImVec4*);
517 void (*Stepper)(const char*, const char*, bool*, bool*);
518
519 bool (*BeginTabBar)(const char*, int);
520 void (*EndTabBar)();
521 bool (*BeginTabItem)(const char*, int);
522 void (*EndTabItem)();
523
524 bool (*BeginTable)(const char*, int, int, const ImVec2&, float);
525 void (*EndTable)();
526 void (*TableSetupColumn)(const char*, int, float, std::uint32_t);
527 void (*TableNextRow)(int, float);
530 void (*TableSetBgColor)(int, ImU32, int);
531
532 void (*Columns)(int, const char*, bool);
533 void (*NextColumn)();
534
535 void (*SameLine)(float, float);
536 bool (*CollapsingHeader)(const char*, int);
537 void (*BeginGroup)();
538 void (*EndGroup)();
539 void (*BeginDisabled)(bool);
540 void (*EndDisabled)();
541
542 bool (*IsWidgetFocused)(const char*);
543 void (*SetTooltip)(const char*);
544 void (*Indent)(float);
545 void (*Unindent)(float);
546 void (*Text)(const char*);
547 void (*TextWrapped)(const char*);
548 void (*TextUnformatted)(const char*, const char*);
549
550 // Version 2
552 void (*PushItemWidth)(float);
553 void (*PopItemWidth)();
554 bool (*BeginTooltip)();
555 void (*EndTooltip)();
556 void (*SetScrollHereY)(float);
557 bool (*InputTextMultiline)(const char*, char*, size_t, const ImVec2&, int);
558};
559#pragma pack(pop)
560
561// ==================================================
562// [ SECTION 3 ] C++ PUBLIC API WRAPPER
563// ==================================================
564
565namespace FUCK
566{
567// --------------------------------------------------
568// Init & Registration
569// --------------------------------------------------
570
572{
573 static FUCK_Interface* s = nullptr;
574 return s;
575}
576
580inline bool Connect(const char* pluginName, unsigned int a_minVersion = FUCK_API_VERSION)
581{
582 if (!pluginName || pluginName[0] == '\0')
583 {
584 SKSE::log::error("FUCK API Connection failed: You must provide a valid pluginName.");
585 return false;
586 }
587
588 auto handle = GetModuleHandleW(L"FUCK.dll");
589 if (!handle)
590 return false;
591 auto fetcher = (void* (*)())GetProcAddress(handle, "RequestFUCK");
592 if (!fetcher)
593 return false;
594 auto* iface = static_cast<FUCK_Interface*>(fetcher());
595 if (!iface || iface->version < a_minVersion)
596 {
597 SKSE::log::error("FUCK API Version Mismatch: Expected {}, found {}", a_minVersion, iface ? iface->version : 0);
598 return false;
599 }
600
601 GetInterface() = iface;
602
603 // --- Cache the plugin name globally for this DLL ---
604 g_pluginName = pluginName;
605 GetInterface()->LoadTranslation(pluginName);
606
607 SKSE::log::info("Connected to FUCK API version {}", iface->version);
608 return true;
609}
610
611inline void RegisterTool(ITool* tool)
612{
613 if (auto i = GetInterface())
614 i->RegisterTool(tool);
615}
616inline void RegisterWindow(IWindow* window)
617{
618 if (auto i = GetInterface())
619 i->RegisterWindow(window);
620}
621inline void UnregisterWindow(IWindow* window)
622{
623 if (auto i = GetInterface())
624 i->UnregisterWindow(window);
625}
626
627// --------------------------------------------------
628// Display, Styles, Metrics
629// --------------------------------------------------
630
632inline float GetResolutionScale()
633{
634 return GetInterface() ? GetInterface()->GetResolutionScale() : 1.0f;
635}
636
639inline float GetGlobalScale()
640{
641 return GetInterface() ? GetInterface()->GetGlobalScale() : 1.0f;
642}
643
645inline float GetUserScale()
646{
647 return GetInterface() ? GetInterface()->GetUserScale() : 1.0f;
648}
649
651inline float Scale(float value)
652{
653 return value * GetResolutionScale();
654}
655inline ImVec2 Scale(float x, float y)
656{
657 return ImVec2(x * GetResolutionScale(), y * GetResolutionScale());
658}
659inline ImVec2 Scale(const ImVec2& value)
660{
661 return ImVec2(value.x * GetResolutionScale(), value.y * GetResolutionScale());
662}
663
665inline float UIScale(float value)
666{
667 return value * GetGlobalScale();
668}
669inline ImVec2 UIScale(float x, float y)
670{
671 return ImVec2(x * GetGlobalScale(), y * GetGlobalScale());
672}
673inline ImVec2 UIScale(const ImVec2& value)
674{
675 return ImVec2(value.x * GetGlobalScale(), value.y * GetGlobalScale());
676}
677
678inline ImVec2 GetDisplaySize()
679{
680 if (auto i = GetInterface())
681 {
682 ImVec2 s;
683 i->GetDisplaySize(&s.x, &s.y);
684 return s;
685 }
686 return ImVec2(0, 0);
687}
688
691inline ImVec2 TranslateScaleformToScreen(float stageX, float stageY)
692{
693 ImVec2 screenPos;
694 if (auto i = GetInterface())
695 i->TranslateScaleformToScreen(stageX, stageY, &screenPos.x, &screenPos.y);
696 return screenPos;
697}
698
701inline ImVec2 TranslateScaleformToScreen(const ImVec2& stagePos)
702{
703 return TranslateScaleformToScreen(stagePos.x, stagePos.y);
704}
705
706inline void SuspendRendering(bool suspend)
707{
708 if (auto i = GetInterface())
709 i->SuspendRendering(suspend);
710}
711inline void SetMenuOpen(bool open)
712{
713 if (auto i = GetInterface())
714 i->SetMenuOpen(open);
715}
716inline bool IsMenuOpen()
717{
718 if (auto i = GetInterface())
719 return i->IsMenuOpen();
720 return false;
721}
722
723inline ImFont* GetFont(Font font)
724{
725 return GetInterface() ? GetInterface()->GetFont(font) : nullptr;
726}
727inline void PushFont(ImFont* font, float size = 0.0f)
728{
729 if (auto i = GetInterface())
730 i->PushFont(font, size);
731}
732inline void PopFont()
733{
734 if (auto i = GetInterface())
735 i->PopFont();
736}
737inline void SetWindowFontScale(float scale)
738{
739 if (auto i = GetInterface())
740 i->SetWindowFontScale(scale);
741}
742
743inline void PushStyleColor(ImGuiCol idx, const ImVec4& col)
744{
745 if (auto i = GetInterface())
746 i->PushStyleColor(idx, col);
747}
748inline void PopStyleColor(int count = 1)
749{
750 if (auto i = GetInterface())
751 i->PopStyleColor(count);
752}
753inline void PushStyleVar(ImGuiStyleVar idx, float val)
754{
755 if (auto i = GetInterface())
756 i->PushStyleVar(idx, val);
757}
758inline void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val)
759{
760 if (auto i = GetInterface())
761 i->PushStyleVarVec(idx, val);
762}
763inline void PopStyleVar(int count = 1)
764{
765 if (auto i = GetInterface())
766 i->PopStyleVar(count);
767}
768
769inline float GetStyleVar(ImGuiStyleVar idx)
770{
771 return GetInterface() ? GetInterface()->GetStyleVar(idx) : 0.0f;
772}
773inline ImVec2 GetStyleVarVec(ImGuiStyleVar idx)
774{
775 ImVec2 v(0, 0);
776 if (auto i = GetInterface())
777 i->GetStyleVarVec(idx, &v.x, &v.y);
778 return v;
779}
780inline ImVec4 GetStyleColorVec4(ImGuiCol idx)
781{
782 ImVec4 v(0, 0, 0, 0);
783 if (auto i = GetInterface())
784 i->GetStyleColorVec4(idx, &v.x, &v.y, &v.z, &v.w);
785 return v;
786}
787
788inline float GetTextLineHeight()
789{
790 return GetInterface() ? GetInterface()->GetTextLineHeight() : 0.0f;
791}
793{
795}
796inline float GetFrameHeight()
797{
798 return GetInterface() ? GetInterface()->GetFrameHeight() : 0.0f;
799}
801{
803}
804
805// --------------------------------------------------
806// Layout & Cursor
807// --------------------------------------------------
808
809inline void SetCursorPosX(float x)
810{
811 if (auto i = GetInterface())
812 i->SetCursorPosX(x);
813}
814inline void SetCursorPosY(float y)
815{
816 if (auto i = GetInterface())
817 i->SetCursorPosY(y);
818}
819inline ImVec2 GetCursorPos()
820{
821 ImVec2 p;
822 if (auto i = GetInterface())
823 i->GetCursorPos(&p.x, &p.y);
824 return p;
825}
826inline void SetCursorPos(const ImVec2& pos)
827{
828 if (auto i = GetInterface())
829 i->SetCursorPos(pos.x, pos.y);
830}
831inline ImVec2 GetCursorScreenPos()
832{
833 ImVec2 p;
834 if (auto i = GetInterface())
835 i->GetCursorScreenPos(&p.x, &p.y);
836 return p;
837}
838inline void SetCursorScreenPos(const ImVec2& pos)
839{
840 if (auto i = GetInterface())
841 i->SetCursorScreenPos(pos.x, pos.y);
842}
844{
845 if (auto i = GetInterface())
846 i->AlignTextToFramePadding();
847}
849{
850 ImVec2 s;
851 if (auto i = GetInterface())
852 i->GetContentRegionAvail(&s.x, &s.y);
853 return s;
854}
855inline float CalcItemWidth()
856{
857 return GetInterface() ? GetInterface()->CalcItemWidth() : 0.0f;
858}
859inline ImVec2 CalcTextSize(const char* text, const char* text_end = nullptr, bool hide_text_after_double_hash = false,
860 float wrap_width = -1.0f)
861{
862 ImVec2 s;
863 if (auto i = GetInterface())
864 i->CalcTextSize(text, text_end, hide_text_after_double_hash, wrap_width, &s.x, &s.y);
865 return s;
866}
867
868inline ImVec2 GetItemRectMin()
869{
870 ImVec2 p;
871 if (auto i = GetInterface())
872 i->GetItemRectMin(&p.x, &p.y);
873 return p;
874}
875inline ImVec2 GetItemRectMax()
876{
877 ImVec2 p;
878 if (auto i = GetInterface())
879 i->GetItemRectMax(&p.x, &p.y);
880 return p;
881}
882inline ImVec2 GetItemRectSize()
883{
884 ImVec2 min = GetItemRectMin();
885 ImVec2 max = GetItemRectMax();
886 return ImVec2(max.x - min.x, max.y - min.y);
887}
888inline void SetNextItemWidth(float width)
889{
890 if (auto i = GetInterface())
891 i->SetNextItemWidth(width);
892}
893inline void SetNextItemOpen(bool is_open, int cond = 0)
894{
895 if (auto i = GetInterface())
896 i->SetNextItemOpen(is_open, cond);
897}
898
899inline void Dummy(const ImVec2& size)
900{
901 if (auto i = GetInterface())
902 i->Dummy(size.x, size.y);
903}
904inline void Spacing(int count = 1)
905{
906 if (auto i = GetInterface())
907 {
908 for (int k = 0; k < count; ++k)
909 i->Spacing();
910 }
911}
912inline void Indent(float width = 0.0f)
913{
914 if (auto i = GetInterface())
915 i->Indent(width);
916}
917inline void Unindent(float width = 0.0f)
918{
919 if (auto i = GetInterface())
920 i->Unindent(width);
921}
922inline void SameLine(float offset_from_start_x = 0.0f, float spacing = -1.0f)
923{
924 if (auto i = GetInterface())
925 i->SameLine(offset_from_start_x, spacing);
926}
927inline void Separator()
928{
929 if (auto i = GetInterface())
930 i->Separator();
931}
932inline void SeparatorThick()
933{
934 if (auto i = GetInterface())
935 i->SeparatorThick();
936}
937inline void SeparatorText(const char* label)
938{
939 if (auto i = GetInterface())
940 i->SeparatorText(label);
941}
942
943inline void BeginGroup()
944{
945 if (auto i = GetInterface())
946 i->BeginGroup();
947}
948inline void EndGroup()
949{
950 if (auto i = GetInterface())
951 i->EndGroup();
952}
953inline void BeginDisabled(bool disabled = true)
954{
955 if (auto i = GetInterface())
956 i->BeginDisabled(disabled);
957}
958inline void EndDisabled()
959{
960 if (auto i = GetInterface())
961 i->EndDisabled();
962}
963inline void PushID(const char* str_id)
964{
965 if (auto i = GetInterface())
966 i->PushID_Str(str_id);
967}
968inline void PushID(int int_id)
969{
970 if (auto i = GetInterface())
971 i->PushID_Int(int_id);
972}
973inline void PushID(const void* ptr_id)
974{
975 if (auto i = GetInterface())
976 i->PushID_Ptr(ptr_id);
977}
978inline void PopID()
979{
980 if (auto i = GetInterface())
981 i->PopID();
982}
983inline void PushItemFlag(ItemFlags flag, bool enabled)
984{
985 if (auto i = GetInterface())
986 i->PushItemFlag(flag, enabled);
987}
988inline void PopItemFlag()
989{
990 if (auto i = GetInterface())
991 i->PopItemFlag();
992}
993
994// --------------------------------------------------
995// Game State & Input Control
996// --------------------------------------------------
997
998inline float GetDeltaTime()
999{
1000 return GetInterface() ? GetInterface()->GetDeltaTime() : 0.0f;
1001}
1002inline double GetTime()
1003{
1004 return GetInterface() ? GetInterface()->GetTime() : 0.0;
1005}
1006inline ImVec2 GetMouseDelta()
1007{
1008 ImVec2 p(0, 0);
1009 if (auto i = GetInterface())
1010 i->GetMouseDelta(&p.x, &p.y);
1011 return p;
1012}
1013inline ImVec2 GetMousePos()
1014{
1015 ImVec2 p(0, 0);
1016 if (auto i = GetInterface())
1017 i->GetMousePos(&p.x, &p.y);
1018 return p;
1019}
1020inline float GetMouseWheel()
1021{
1022 return GetInterface() ? GetInterface()->GetMouseWheel() : 0.0f;
1023}
1024inline void SetGameTimeFrozen(bool frozen)
1025{
1026 if (auto i = GetInterface())
1027 i->SetGameTimeFrozen(frozen);
1028}
1029inline void SetAutoVanityBlocked(bool blocked)
1030{
1031 if (auto i = GetInterface())
1032 i->SetAutoVanityBlocked(blocked);
1033}
1034inline void SetHardPause(bool paused)
1035{
1036 if (auto i = GetInterface())
1037 i->SetHardPause(paused);
1038}
1039inline void SetSoftPause(bool paused)
1040{
1041 if (auto i = GetInterface())
1042 i->SetSoftPause(paused);
1043}
1044inline void ForceCursor(bool force)
1045{
1046 if (auto i = GetInterface())
1047 i->ForceCursor(force);
1048}
1049
1050inline bool IsInputPressed(const void* inputEvent, std::uint32_t keyId)
1051{
1052 return GetInterface() ? GetInterface()->IsInputPressed(inputEvent, keyId) : false;
1053}
1054inline bool IsInputDown(std::uint32_t keyId)
1055{
1056 return GetInterface() ? GetInterface()->IsInputDown(keyId) : false;
1057}
1058inline float GetAnalogInput(std::uint32_t keyId)
1059{
1060 return GetInterface() ? GetInterface()->GetAnalogInput(keyId) : 0.0f;
1061}
1063{
1064 return GetInterface() ? GetInterface()->IsModifierPressed(mod) : false;
1065}
1070inline const char* GetKeyName(std::uint32_t k)
1071{
1072 return GetInterface() ? GetInterface()->GetKeyName(k) : "";
1073}
1074inline bool IsGamepadKey(std::uint32_t k)
1075{
1076 return GetInterface() ? GetInterface()->IsGamepadKey(k) : false;
1077}
1078
1079inline void AbortBinding()
1080{
1081 if (auto i = GetInterface())
1082 i->AbortBinding();
1083}
1084inline bool IsBinding()
1085{
1086 return GetInterface() ? GetInterface()->IsBinding() : false;
1087}
1088inline void StartBinding(std::uint32_t key, std::int32_t mod1, std::int32_t mod2, bool disallowModifiers = false)
1089{
1090 if (auto i = GetInterface())
1091 i->StartBinding(key, mod1, mod2, disallowModifiers);
1092}
1093inline BindResult UpdateBinding(const void* inputEvent, std::uint32_t* outKey, std::int32_t* outMod1,
1094 std::int32_t* outMod2)
1095{
1096 return GetInterface() ? GetInterface()->UpdateBinding(inputEvent, outKey, outMod1, outMod2) : BindResult::kNone;
1097}
1098inline BindResult GetInputBind(const void* inputEvent, std::uint32_t* outKey, std::int32_t* outMod1,
1099 std::int32_t* outMod2)
1100{
1101 return GetInterface() ? GetInterface()->GetInputBind(inputEvent, outKey, outMod1, outMod2) : BindResult::kNone;
1102}
1103
1104// --------------------------------------------------
1105// Widgets & Interaction
1106// --------------------------------------------------
1107
1108inline bool IsPopupOpen(const char* str_id = nullptr, PopupFlags flags = PopupFlags::kNone)
1109{
1110 return GetInterface() ? GetInterface()->IsPopupOpen(str_id, static_cast<int>(flags)) : false;
1111}
1112inline bool IsItemHovered(int flags = 0)
1113{
1114 return GetInterface() ? GetInterface()->IsItemHovered(flags) : false;
1115}
1116inline bool IsItemClicked(int mouse_button = 0)
1117{
1118 return GetInterface() ? GetInterface()->IsItemClicked(mouse_button) : false;
1119}
1120inline bool IsItemActive()
1121{
1122 return GetInterface() ? GetInterface()->IsItemActive() : false;
1123}
1124inline bool IsItemFocused()
1125{
1126 return GetInterface() ? GetInterface()->IsItemFocused() : false;
1127}
1129{
1130 return GetInterface() ? GetInterface()->IsItemDeactivated() : false;
1131}
1133{
1135}
1136inline bool IsAnyItemActive()
1137{
1138 return GetInterface() ? GetInterface()->IsAnyItemActive() : false;
1139}
1140inline bool IsAnyItemHovered()
1141{
1142 return GetInterface() ? GetInterface()->IsAnyItemHovered() : false;
1143}
1144inline bool IsWindowFocused(int flags = 0)
1145{
1146 return GetInterface() ? GetInterface()->IsWindowFocused(flags) : false;
1147}
1148inline bool IsWindowHovered(int flags = 0)
1149{
1150 return GetInterface() ? GetInterface()->IsWindowHovered(flags) : false;
1151}
1152inline bool IsMouseDown(int button)
1153{
1154 return GetInterface() ? GetInterface()->IsMouseDown(button) : false;
1155}
1156inline bool IsMouseClicked(int button, bool repeat = false)
1157{
1158 return GetInterface() ? GetInterface()->IsMouseClicked(button, repeat) : false;
1159}
1160inline bool IsMouseReleased(int button)
1161{
1162 return GetInterface() ? GetInterface()->IsMouseReleased(button) : false;
1163}
1164inline bool IsKeyDown(ImGuiKey key)
1165{
1166 return GetInterface() ? GetInterface()->IsKeyDown(key) : false;
1167}
1168inline bool IsKeyPressed(ImGuiKey key, bool repeat = true)
1169{
1170 return GetInterface() ? GetInterface()->IsKeyPressed(key, repeat) : false;
1171}
1172
1173inline void SetKeyboardFocusHere(int offset = 0)
1174{
1175 if (auto i = GetInterface())
1176 i->SetKeyboardFocusHere(offset);
1177}
1179{
1180 if (auto i = GetInterface())
1181 i->SetItemDefaultFocus();
1182}
1183inline bool IsWidgetFocused(const char* label)
1184{
1185 return GetInterface() ? GetInterface()->IsWidgetFocused(label) : false;
1186}
1187
1189{
1190 return GetInterface() ? GetInterface()->BeginDragDropSource(static_cast<int>(flags)) : false;
1191}
1192inline bool SetDragDropPayload(const char* type, const void* data, size_t sz, int cond = 0)
1193{
1194 return GetInterface() ? GetInterface()->SetDragDropPayload(type, data, sz, cond) : false;
1195}
1197{
1198 if (auto i = GetInterface())
1199 i->EndDragDropSource();
1200}
1202{
1203 return GetInterface() ? GetInterface()->BeginDragDropTarget() : false;
1204}
1205inline const ImGuiPayload* AcceptDragDropPayload(const char* type, DragDropFlags flags = DragDropFlags::kNone)
1206{
1207 return GetInterface() ? GetInterface()->AcceptDragDropPayload(type, static_cast<int>(flags)) : nullptr;
1208}
1210{
1211 if (auto i = GetInterface())
1212 i->EndDragDropTarget();
1213}
1214
1215inline bool Button(const char* label)
1216{
1217 return GetInterface() ? GetInterface()->Button(label) : false;
1218}
1219inline bool InvisibleButton(const char* str_id, const ImVec2& size, int flags = 0)
1220{
1221 return GetInterface() ? GetInterface()->InvisibleButton(str_id, size, flags) : false;
1222}
1223inline bool Checkbox(const char* label, bool* v, bool alignFar = true, bool labelLeft = true)
1224{
1225 return GetInterface() ? GetInterface()->Checkbox(label, v, alignFar, labelLeft) : false;
1226}
1227inline bool Hotkey(const char* label, std::uint32_t key, std::int32_t modifier, std::int32_t modifier2,
1228 bool alignFar = true, bool labelLeft = true, bool flashing = false)
1229{
1230 return GetInterface() ? GetInterface()->Hotkey(label, key, modifier, modifier2, alignFar, labelLeft, flashing)
1231 : false;
1232}
1233inline bool ToggleButton(const char* label, bool* v, bool alignFar = true, bool labelLeft = true)
1234{
1235 return GetInterface() ? GetInterface()->ToggleButton(label, v, alignFar, labelLeft) : false;
1236}
1237inline bool InputText(const char* label, char* buf, size_t buf_size, int flags = 0)
1238{
1239 return GetInterface() ? GetInterface()->InputText(label, buf, buf_size, flags) : false;
1240}
1241inline bool ColorEdit3(const char* label, float col[3], int flags = 0)
1242{
1243 return GetInterface() ? GetInterface()->ColorEdit3(label, col, flags) : false;
1244}
1245inline bool ColorEdit4(const char* label, float col[4], int flags = 0)
1246{
1247 return GetInterface() ? GetInterface()->ColorEdit4(label, col, flags) : false;
1248}
1249inline bool SliderFloat(const char* label, float* v, float min, float max, const char* fmt = "%.3f")
1250{
1251 return GetInterface() ? GetInterface()->SliderFloat(label, v, min, max, fmt) : false;
1252}
1253inline bool SliderInt(const char* label, int* v, int min, int max, const char* fmt = "%d")
1254{
1255 return GetInterface() ? GetInterface()->SliderInt(label, v, min, max, fmt) : false;
1256}
1257inline bool DragInt(const char* label, int* v, float speed = 1.0f, int min = 0, int max = 0, const char* fmt = "%d")
1258{
1259 return GetInterface() ? GetInterface()->DragInt(label, v, speed, min, max, fmt) : false;
1260}
1261inline bool DragFloat(const char* label, float* v, float speed = 1.0f, float min = 0.0f, float max = 0.0f,
1262 const char* fmt = "%.3f")
1263{
1264 return GetInterface() ? GetInterface()->DragFloat(label, v, speed, min, max, fmt) : false;
1265}
1266inline bool DragFloat2(const char* label, float v[2], float speed = 1.0f, float min = 0.0f, float max = 0.0f,
1267 const char* fmt = "%.3f")
1268{
1269 return GetInterface() ? GetInterface()->DragFloat2(label, v, speed, min, max, fmt) : false;
1270}
1271inline bool DragFloat3(const char* label, float v[3], float speed = 1.0f, float min = 0.0f, float max = 0.0f,
1272 const char* fmt = "%.3f")
1273{
1274 return GetInterface() ? GetInterface()->DragFloat3(label, v, speed, min, max, fmt) : false;
1275}
1276inline bool DragFloat4(const char* label, float v[4], float speed = 1.0f, float min = 0.0f, float max = 0.0f,
1277 const char* fmt = "%.3f")
1278{
1279 return GetInterface() ? GetInterface()->DragFloat4(label, v, speed, min, max, fmt) : false;
1280}
1281inline bool Combo(const char* label, int* current_item, const char* const* items, int items_count)
1282{
1283 return GetInterface() ? GetInterface()->Combo(label, current_item, items, items_count) : false;
1284}
1285inline bool ComboWithFilter(const char* label, int* current_item, const char* const* items, int items_count,
1286 int popup_max_height_in_items = -1)
1287{
1288 return GetInterface()
1289 ? GetInterface()->ComboWithFilter(label, current_item, items, items_count, popup_max_height_in_items)
1290 : false;
1291}
1292inline bool ComboForm(const char* label, std::uint32_t* currentFormID, std::uint8_t formType)
1293{
1294 return GetInterface() ? GetInterface()->ComboForm(label, currentFormID, formType) : false;
1295}
1296inline bool ComboForm(const char* label, std::string* currentEdid, std::uint8_t formType)
1297{
1298 if (!currentEdid || !GetInterface())
1299 return false;
1300 char buf[256];
1301 strncpy_s(buf, sizeof(buf), currentEdid->c_str(), _TRUNCATE);
1302 if (GetInterface()->ComboFormStr(label, buf, sizeof(buf), formType))
1303 {
1304 *currentEdid = buf;
1305 return true;
1306 }
1307 return false;
1308}
1309
1310inline bool Selectable(const char* label, bool selected = false, int flags = 0, const ImVec2& size = ImVec2(0, 0))
1311{
1312 return GetInterface() ? GetInterface()->Selectable(label, selected, flags, size) : false;
1313}
1314
1315inline ImGuiTableSortSpecs* GetTableSortSpecs()
1316{
1317 return GetInterface() ? GetInterface()->GetTableSortSpecs() : nullptr;
1318}
1319
1320inline void Header(const char* label)
1321{
1322 if (auto i = GetInterface())
1323 i->Header(label);
1324}
1325inline void LeftLabel(const char* label)
1326{
1327 if (auto i = GetInterface())
1328 i->LeftLabel(label);
1329}
1330inline void CenteredText(const char* label, bool vertical = false)
1331{
1332 if (auto i = GetInterface())
1333 i->CenteredText(label, vertical);
1334}
1335inline void SetTooltip(const char* fmt)
1336{
1337 if (auto i = GetInterface())
1338 i->SetTooltip(fmt);
1339}
1340inline void HelpMarker(const char* desc)
1341{
1342 if (auto i = GetInterface())
1343 i->HelpMarker(desc);
1344}
1345
1346inline void TextColored(const ImVec4& color, const char* fmt, ...)
1347{
1348 auto i = GetInterface();
1349 if (!i)
1350 return;
1351 va_list args;
1352 va_start(args, fmt);
1353 char buf[1024];
1354 vsnprintf(buf, 1024, fmt, args);
1355 va_end(args);
1356 i->TextColored(color, buf);
1357}
1358inline void TextColoredWrapped(const ImVec4& col, const char* fmt, ...)
1359{
1360 auto i = GetInterface();
1361 if (!i)
1362 return;
1363 va_list args;
1364 va_start(args, fmt);
1365 char buf[1024];
1366 vsnprintf(buf, 1024, fmt, args);
1367 va_end(args);
1368 i->TextColoredWrapped(col, buf);
1369}
1370inline void TextDisabled(const char* fmt, ...)
1371{
1372 auto i = GetInterface();
1373 if (!i)
1374 return;
1375 va_list args;
1376 va_start(args, fmt);
1377 char buf[1024];
1378 vsnprintf(buf, 1024, fmt, args);
1379 va_end(args);
1380 i->TextDisabled(buf);
1381}
1382inline void Text(const char* fmt, ...)
1383{
1384 auto i = GetInterface();
1385 if (!i)
1386 return;
1387 va_list args;
1388 va_start(args, fmt);
1389 char buf[1024];
1390 vsnprintf(buf, 1024, fmt, args);
1391 va_end(args);
1392 i->Text(buf);
1393}
1394inline void TextWrapped(const char* fmt, ...)
1395{
1396 auto i = GetInterface();
1397 if (!i)
1398 return;
1399 va_list args;
1400 va_start(args, fmt);
1401 char buf[1024];
1402 vsnprintf(buf, 1024, fmt, args);
1403 va_end(args);
1404 i->TextWrapped(buf);
1405}
1406inline void TextUnformatted(const char* text, const char* text_end = nullptr)
1407{
1408 if (auto i = GetInterface())
1409 i->TextUnformatted(text, text_end);
1410}
1411
1412inline bool ButtonIconWithLabel(const char* label, ImTextureID textureID, const ImVec2& size, bool alignFar = true,
1413 bool labelLeft = true)
1414{
1415 return GetInterface() ? GetInterface()->ButtonIconWithLabel(label, reinterpret_cast<void*>(textureID), size.x,
1416 size.y, alignFar, labelLeft)
1417 : false;
1418}
1419inline bool ImageButton(const char* str_id, ImTextureID user_texture_id, const ImVec2& image_size,
1420 const ImVec4* tint = nullptr)
1421{
1422 return GetInterface() ? GetInterface()->ImageButton(str_id, reinterpret_cast<void*>(user_texture_id), image_size.x,
1423 image_size.y, tint)
1424 : false;
1425}
1426inline void Stepper(const char* label, const char* text, bool* outLeft, bool* outRight)
1427{
1428 if (auto i = GetInterface())
1429 i->Stepper(label, text, outLeft, outRight);
1430}
1431
1432// --------------------------------------------------
1433// Windows & Containers
1434// --------------------------------------------------
1435
1436inline bool BeginWindow(const char* name, bool* p_open = nullptr, int flags = 0)
1437{
1438 return GetInterface() ? GetInterface()->BeginWindow(name, p_open, flags) : false;
1439}
1440inline void EndWindow()
1441{
1442 if (auto i = GetInterface())
1443 i->EndWindow();
1444}
1446{
1447 if (auto i = GetInterface())
1448 i->ExtendWindowPastBorder();
1449}
1450inline ImVec2 GetWindowPos()
1451{
1452 if (auto i = GetInterface())
1453 {
1454 ImVec2 p;
1455 i->GetWindowPos(&p.x, &p.y);
1456 return p;
1457 }
1458 return ImVec2(0, 0);
1459}
1460inline ImVec2 GetWindowSize()
1461{
1462 if (auto i = GetInterface())
1463 {
1464 ImVec2 p;
1465 i->GetWindowSize(&p.x, &p.y);
1466 return p;
1467 }
1468 return ImVec2(0, 0);
1469}
1470inline void SetWindowPos(const ImVec2& pos, int cond = 0)
1471{
1472 if (auto i = GetInterface())
1473 i->SetWindowPos(pos.x, pos.y, cond);
1474}
1475inline void SetWindowSize(const ImVec2& size, int cond = 0)
1476{
1477 if (auto i = GetInterface())
1478 i->SetWindowSize(size.x, size.y, cond);
1479}
1480inline void SetNextWindowPos(const ImVec2& pos, int cond = 0, const ImVec2& pivot = ImVec2(0, 0))
1481{
1482 if (auto i = GetInterface())
1483 i->SetNextWindowPos(pos.x, pos.y, cond, pivot.x, pivot.y);
1484}
1485inline void SetNextWindowSize(const ImVec2& size, int cond = 0)
1486{
1487 if (auto i = GetInterface())
1488 i->SetNextWindowSize(size.x, size.y, cond);
1489}
1490
1491inline void BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), bool border = false, int flags = 0)
1492{
1493 if (auto i = GetInterface())
1494 i->BeginChild(str_id, size.x, size.y, border, flags);
1495}
1496inline void EndChild()
1497{
1498 if (auto i = GetInterface())
1499 i->EndChild();
1500}
1501
1505inline void BeginPanelFrame(const char* str_id, float padding = 8.0f)
1506{
1507 float p = Scale(padding);
1508 PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(p, p));
1509 BeginChild(str_id, ImVec2(0, 0), false, 0);
1510 Dummy(ImVec2(0.0f, Scale(4.0f)));
1511 Indent(p);
1512 BeginGroup();
1513}
1514
1516inline void EndPanelFrame(float padding = 8.0f)
1517{
1518 EndGroup();
1519 Unindent(Scale(padding));
1520 Dummy(ImVec2(0.0f, Scale(4.0f)));
1521 EndChild();
1522 PopStyleVar(1);
1523}
1524
1525inline bool TreeNode(const char* label)
1526{
1527 return GetInterface() ? GetInterface()->TreeNode(label) : false;
1528}
1529inline void TreePop()
1530{
1531 if (auto i = GetInterface())
1532 i->TreePop();
1533}
1534inline bool CollapsingHeader(const char* label, int flags = 0)
1535{
1536 return GetInterface() ? GetInterface()->CollapsingHeader(label, flags) : false;
1537}
1538
1539inline bool BeginPopupContextItem(const char* str_id = nullptr, int mouse_button = 1)
1540{
1541 return GetInterface() ? GetInterface()->BeginPopupContextItem(str_id, mouse_button) : false;
1542}
1543inline void EndPopup()
1544{
1545 if (auto i = GetInterface())
1546 i->EndPopup();
1547}
1548
1549inline bool BeginTabBar(const char* str_id, int flags = 0)
1550{
1551 return GetInterface() ? GetInterface()->BeginTabBar(str_id, flags) : false;
1552}
1553inline void EndTabBar()
1554{
1555 if (auto i = GetInterface())
1556 i->EndTabBar();
1557}
1558inline bool BeginTabItem(const char* label, int flags = 0)
1559{
1560 return GetInterface() ? GetInterface()->BeginTabItem(label, flags) : false;
1561}
1562inline void EndTabItem()
1563{
1564 if (auto i = GetInterface())
1565 i->EndTabItem();
1566}
1567
1568inline bool BeginTable(const char* str_id, int column, TableFlags flags = TableFlags::kNone,
1569 const ImVec2& outer_size = ImVec2(0.0f, 0.0f), float inner_width = 0.0f)
1570{
1571 return GetInterface() ? GetInterface()->BeginTable(str_id, column, static_cast<int>(flags), outer_size, inner_width)
1572 : false;
1573}
1574inline void EndTable()
1575{
1576 if (auto i = GetInterface())
1577 i->EndTable();
1578}
1579
1580inline void TableSetBgColor(TableBgTarget target, ImU32 color, int column_n = -1)
1581{
1582 if (auto i = GetInterface())
1583 i->TableSetBgColor(static_cast<int>(target), color, column_n);
1584}
1585
1586inline float GetColumnWidth(int column_index = -1)
1587{
1588 return GetInterface() ? GetInterface()->GetColumnWidth(column_index) : 0.0f;
1589}
1590
1594inline bool UpdateProportionalWeight(float& inOutWeight, float totalWidth)
1595{
1596 if (IsMouseReleased(0) && totalWidth > 100.0f)
1597 {
1598 float childWidth = GetWindowSize().x;
1599 float newWeight = childWidth / totalWidth;
1600 if (std::abs(inOutWeight - newWeight) > 0.01f)
1601 {
1602 inOutWeight = newWeight;
1603 return true;
1604 }
1605 }
1606 return false;
1607}
1608
1609inline void TableSetupColumn(const char* label, TableColumnFlags flags = TableColumnFlags::kNone,
1610 float init_width_or_weight = 0.0f, std::uint32_t user_id = 0)
1611{
1612 if (auto i = GetInterface())
1613 i->TableSetupColumn(label, static_cast<int>(flags), init_width_or_weight, user_id);
1614}
1615inline void TableNextRow(int row_flags = 0, float min_row_height = 0.0f)
1616{
1617 if (auto i = GetInterface())
1618 i->TableNextRow(row_flags, min_row_height);
1619}
1620inline bool TableNextColumn()
1621{
1622 return GetInterface() ? GetInterface()->TableNextColumn() : false;
1623}
1624inline void TableHeadersRow()
1625{
1626 if (auto i = GetInterface())
1627 i->TableHeadersRow();
1628}
1629
1630inline void Columns(int count = 1, const char* id = nullptr, bool border = true)
1631{
1632 if (auto i = GetInterface())
1633 i->Columns(count, id, border);
1634}
1635inline void NextColumn()
1636{
1637 if (auto i = GetInterface())
1638 i->NextColumn();
1639}
1640
1641// --------------------------------------------------
1642// Drawing & Assets
1643// --------------------------------------------------
1644
1645inline ImTextureID GetIconForKey(std::uint32_t key, ImVec2* outSize = nullptr)
1646{
1647 if (auto i = GetInterface())
1648 {
1649 if (outSize)
1650 i->GetIconSizeForKey(key, &outSize->x, &outSize->y);
1651 return reinterpret_cast<ImTextureID>(i->GetIconForKey(key));
1652 }
1653 return static_cast<ImTextureID>(0);
1654}
1655inline void Spinner(const char* label, float radius, float thickness, const ImVec4& color)
1656{
1657 if (auto i = GetInterface())
1658 i->Spinner(label, radius, thickness, color);
1659}
1660inline void DrawOverlay(Overlay type, float thickness = 1.0f, ImU32 color = 0, float paramA = 0.0f, float paramB = 0.0f,
1661 float paramC = 0.0f, float paramD = 0.0f)
1662{
1663 if (auto i = GetInterface())
1664 i->DrawOverlay(type, thickness, color, paramA, paramB, paramC, paramD);
1665}
1666inline void DrawGrid(float thickness = 0.0f, ImU32 color = 0, float rows = 3.0f, float cols = 3.0f,
1667 float rotationDeg = 0.0f)
1668{
1669 DrawOverlay(Overlay::kGrid, thickness, color, rows, cols, rotationDeg, 0.0f);
1670}
1671inline void DrawCrosshair(float thickness = 1.0f, ImU32 color = 0, float rows = 1.0f, float cols = 1.0f)
1672{
1673 DrawOverlay(Overlay::kCrosshair, thickness, color, rows, cols, 0.0f, 0.0f);
1674}
1675inline void DrawGoldenSpiral(float thickness = 1.0f, ImU32 color = 0, int anchorIndex = 0, float turns = 6.0f,
1676 float rotationDeg = 0.0f, float scale = 1.0f, bool showSquares = false)
1677{
1678 float pA = static_cast<float>(anchorIndex) + (showSquares ? 10.0f : 0.0f);
1679 DrawOverlay(Overlay::kGoldenSpiral, thickness, color, pA, turns, rotationDeg, scale);
1680}
1681inline void DrawGoldenGrid(float thickness = 1.0f, ImU32 color = 0, int subdivisions = 0)
1682{
1683 DrawOverlay(Overlay::kGoldenRatio, thickness, color, static_cast<float>(subdivisions), 0.0f, 0.0f, 0.0f);
1684}
1685inline void DrawTriangle(float thickness = 1.0f, ImU32 color = 0, bool mirror = false)
1686{
1687 DrawOverlay(Overlay::kTriangle, thickness, color, mirror ? 1.0f : 0.0f, 0.0f, 0.0f, 0.0f);
1688}
1689
1690inline void DrawRect(const ImVec2& min, const ImVec2& max, const ImVec4& col, float rounding = 0.0f,
1691 float thickness = 1.0f)
1692{
1693 if (auto i = GetInterface())
1694 i->DrawRect(min, max, col, rounding, thickness);
1695}
1696inline void DrawRectFilled(const ImVec2& min, const ImVec2& max, const ImVec4& col, float rounding = 0.0f)
1697{
1698 if (auto i = GetInterface())
1699 i->DrawRectFilled(min, max, col, rounding);
1700}
1701inline void DrawLine(const ImVec2& p1, const ImVec2& p2, const ImVec4& col, float thickness = 1.0f)
1702{
1703 if (auto i = GetInterface())
1704 i->DrawLine(p1, p2, col, thickness);
1705}
1706inline void DrawImage(ImTextureID textureId, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0),
1707 const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1))
1708{
1709 if (auto i = GetInterface())
1710 i->DrawImage((void*)textureId, size, uv0, uv1, tint_col);
1711}
1712inline void DrawImageQuad(ImTextureID textureId, const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4,
1713 const ImVec2& uv1, const ImVec2& uv2, const ImVec2& uv3, const ImVec2& uv4,
1714 const ImVec4& tint_col = ImVec4(1, 1, 1, 1))
1715{
1716 if (auto i = GetInterface())
1717 i->DrawImageQuad((void*)textureId, p1, p2, p3, p4, uv1, uv2, uv3, uv4, tint_col);
1718}
1719inline void AddImage(ImTextureID textureId, const ImVec2& min, const ImVec2& max, const ImVec2& uv0 = ImVec2(0, 0),
1720 const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& col = ImVec4(1, 1, 1, 1))
1721{
1722 if (auto i = GetInterface())
1723 i->AddImage((void*)textureId, min, max, uv0, uv1, col);
1724}
1725inline void DrawBackgroundImage(ImTextureID tex, float alpha)
1726{
1727 if (auto i = GetInterface())
1728 i->DrawBackgroundImage((void*)tex, alpha);
1729}
1730inline void DrawBackgroundLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness)
1731{
1732 if (auto i = GetInterface())
1733 i->DrawBackgroundLine(p1.x, p1.y, p2.x, p2.y, col, thickness);
1734}
1735inline void DrawBackgroundRect(const ImVec2& min, const ImVec2& max, ImU32 col, float thickness)
1736{
1737 if (auto i = GetInterface())
1738 i->DrawBackgroundRect(min, max, col, thickness);
1739}
1740inline void DrawScreenRect(const ImVec2& min, const ImVec2& max, ImU32 col, float rounding = 0.0f,
1741 float thickness = 1.0f)
1742{
1743 if (auto i = GetInterface())
1744 i->DrawScreenRect(min, max, col, rounding, thickness);
1745}
1746inline void DrawScreenRectFilled(const ImVec2& min, const ImVec2& max, ImU32 col, float rounding = 0.0f)
1747{
1748 if (auto i = GetInterface())
1749 i->DrawScreenRectFilled(min, max, col, rounding);
1750}
1751inline void DrawScreenLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f)
1752{
1753 if (auto i = GetInterface())
1754 i->DrawScreenLine(p1.x, p1.y, p2.x, p2.y, col, thickness);
1755}
1756
1757// --------------------------------------------------
1758// Strings & Utilities
1759// --------------------------------------------------
1760
1761inline const char* Translate(const char* key)
1762{
1763 return GetInterface() ? GetInterface()->GetTranslation(key) : key;
1764}
1765inline void LoadTranslation(const char* pluginName)
1766{
1767 if (auto i = GetInterface())
1768 i->LoadTranslation(pluginName);
1769}
1770inline void SanitizePath(char* dest, const char* source, size_t size)
1771{
1772 if (auto i = GetInterface())
1773 i->SanitizePath(dest, source, size);
1774}
1775inline void GetPluginConfigPath(const char* pluginName, char* dest, size_t size)
1776{
1777 if (auto i = GetInterface())
1778 i->GetPluginConfigPath(pluginName, dest, size);
1779}
1780
1781inline void AddMenuListener(void* userdata, void (*callback)(const char* menuName, bool opening, void* userdata))
1782{
1783 if (auto i = GetInterface())
1784 i->AddMenuListener(userdata, callback);
1785}
1786inline void RemoveMenuListener(void* userdata)
1787{
1788 if (auto i = GetInterface())
1789 i->RemoveMenuListener(userdata);
1790}
1791
1792// ==================================================
1793// [ SECTION 4 ] SMART WRAPPERS & UTILITIES
1794// ==================================================
1795
1798{
1799 public:
1800 Image() = default;
1801 Image(const char* a_path, bool a_resizeToScreen = false)
1802 {
1803 if (auto i = GetInterface())
1804 {
1805 _handle = i->LoadImage(a_path, a_resizeToScreen);
1806 if (_handle)
1807 i->GetImageInfo(_handle, &_width, &_height);
1808 }
1809 }
1810 ~Image() { Reset(); }
1811 Image(Image&& other) noexcept
1812 : _handle(other._handle),
1813 _width(other._width),
1814 _height(other._height)
1815 {
1816 other._handle = nullptr;
1817 other._width = 0.0f;
1818 other._height = 0.0f;
1819 }
1820 Image& operator=(Image&& other) noexcept
1821 {
1822 if (this != &other)
1823 {
1824 Reset();
1825 _handle = other._handle;
1826 _width = other._width;
1827 _height = other._height;
1828 other._handle = nullptr;
1829 other._width = 0.0f;
1830 other._height = 0.0f;
1831 }
1832 return *this;
1833 }
1834 Image(const Image&) = delete;
1835 Image& operator=(const Image&) = delete;
1836
1837 [[nodiscard]] bool IsLoaded() const { return _handle != nullptr; }
1838 [[nodiscard]] ImTextureID GetID() const { return (ImTextureID)_handle; }
1839 operator ImTextureID() const { return (ImTextureID)_handle; }
1840 operator void*() const { return _handle; }
1841
1842 [[nodiscard]] float GetWidth() const { return _width; }
1843 [[nodiscard]] float GetHeight() const { return _height; }
1844 [[nodiscard]] ImVec2 GetSize() const { return ImVec2(_width, _height); }
1845
1846 void Reset()
1847 {
1848 if (_handle)
1849 {
1850 if (auto i = GetInterface())
1851 i->ReleaseImage(_handle);
1852 _handle = nullptr;
1853 _width = 0.0f;
1854 _height = 0.0f;
1855 }
1856 }
1857
1858 private:
1859 void* _handle = nullptr;
1860 float _width = 0.0f;
1861 float _height = 0.0f;
1862};
1863
1866{
1867 public:
1868 // --- Automatically defaults to the globally registered plugin name ---
1869 PluginSettings(const char* a_pluginName = FUCK::g_pluginName)
1870 : _pluginName(a_pluginName)
1871 {
1872 }
1873
1874 using INIFunc = std::function<void(CSimpleIniA&)>;
1875
1876 void Load(INIFunc a_func) const
1877 {
1878 if (!a_func)
1879 return;
1880 if (auto* i = GetInterface())
1881 i->LoadPluginINI(_pluginName, &a_func,
1882 [](CSimpleIniA& ini, void* ud) { (*static_cast<INIFunc*>(ud))(ini); });
1883 }
1884
1885 void Save(INIFunc a_func) const
1886 {
1887 if (!a_func)
1888 return;
1889 if (auto* i = GetInterface())
1890 i->SavePluginINI(_pluginName, &a_func,
1891 [](CSimpleIniA& ini, void* ud) { (*static_cast<INIFunc*>(ud))(ini); });
1892 }
1893
1895 void LoadDefaults(INIFunc a_func) const
1896 {
1897 if (!a_func)
1898 return;
1899 if (auto* i = GetInterface())
1900 i->LoadPluginINIDefaults(_pluginName, &a_func,
1901 [](CSimpleIniA& ini, void* ud) { (*static_cast<INIFunc*>(ud))(ini); });
1902 }
1903
1904 void LoadKeybinds(INIFunc a_func) const
1905 {
1906 if (!a_func)
1907 return;
1908 if (auto* i = GetInterface())
1909 i->LoadPluginKeybinds(_pluginName, &a_func,
1910 [](CSimpleIniA& ini, void* ud) { (*static_cast<INIFunc*>(ud))(ini); });
1911 }
1912
1913 void SaveKeybinds(INIFunc a_func) const
1914 {
1915 if (!a_func)
1916 return;
1917 if (auto* i = GetInterface())
1918 i->SavePluginKeybinds(_pluginName, &a_func,
1919 [](CSimpleIniA& ini, void* ud) { (*static_cast<INIFunc*>(ud))(ini); });
1920 }
1921
1923 {
1924 if (!a_func)
1925 return;
1926 if (auto* i = GetInterface())
1927 i->LoadPluginKeybindsDefaults(_pluginName, &a_func,
1928 [](CSimpleIniA& ini, void* ud) { (*static_cast<INIFunc*>(ud))(ini); });
1929 }
1930
1933 std::string GetConfigDirectory() const
1934 {
1935 char buf[512] = {0};
1936 if (auto* i = GetInterface())
1937 i->GetPluginConfigPath(_pluginName, buf, sizeof(buf));
1938 return std::string(buf);
1939 }
1940
1941 private:
1942 const char* _pluginName;
1943};
1944
1946template <size_t N>
1947inline void StringCopy(char (&dest)[N], const char* source)
1948{
1949 if (!source)
1950 {
1951 dest[0] = '\0';
1952 return;
1953 }
1954 strncpy_s(dest, N, source, _TRUNCATE);
1955}
1956
1957template <size_t N>
1958inline void StringCopy(char (&dest)[N], const std::string& source)
1959{
1960 strncpy_s(dest, N, source.c_str(), _TRUNCATE);
1961}
1962
1964namespace INI
1965{
1966inline bool LoadBool(const CSimpleIniA& ini, const char* sec, const char* key, bool defVal)
1967{
1968 return ini.GetBoolValue(sec, key, defVal);
1969}
1970
1971inline float LoadFloat(const CSimpleIniA& ini, const char* sec, const char* key, float defVal)
1972{
1973 return static_cast<float>(ini.GetDoubleValue(sec, key, static_cast<double>(defVal)));
1974}
1975
1976// Handles mixed ints
1977template <typename T>
1978inline T LoadInt(const CSimpleIniA& ini, const char* sec, const char* key, T defVal)
1979{
1980 static_assert(std::is_integral_v<T> || std::is_enum_v<T>, "FUCK::INI::LoadInt requires integral or enum types.");
1981 return static_cast<T>(ini.GetLongValue(sec, key, static_cast<long>(defVal)));
1982}
1983
1984inline void SaveBool(CSimpleIniA& ini, const char* sec, const char* key, bool val, bool defVal)
1985{
1986 if (val == defVal)
1987 ini.Delete(sec, key, true);
1988 else
1989 ini.SetBoolValue(sec, key, val);
1990}
1991
1992// Handles mixed ints
1993template <typename T, typename U>
1994inline void SaveInt(CSimpleIniA& ini, const char* sec, const char* key, T val, U defVal)
1995{
1996 static_assert(std::is_integral_v<T> && std::is_integral_v<U>, "FUCK::INI::SaveInt requires integral types.");
1997 if (val == static_cast<T>(defVal))
1998 {
1999 ini.Delete(sec, key, true);
2000 }
2001 else
2002 {
2003 ini.SetLongValue(sec, key, static_cast<long>(val));
2004 }
2005}
2006
2007inline void SaveDouble(CSimpleIniA& ini, const char* sec, const char* key, double val, double defVal,
2008 const char* fmt = "%.2f")
2009{
2010 if (std::abs(val - defVal) < 0.00001)
2011 {
2012 ini.Delete(sec, key, true);
2013 }
2014 else
2015 {
2016 char buf[64];
2017 snprintf(buf, sizeof(buf), fmt, val);
2018 ini.SetValue(sec, key, buf);
2019 }
2020}
2021
2022inline void SaveString(CSimpleIniA& ini, const char* sec, const char* key, const char* val, const char* defVal)
2023{
2024 if (strcmp(val, defVal) == 0)
2025 ini.Delete(sec, key, true);
2026 else
2027 ini.SetValue(sec, key, val);
2028}
2029
2030template <size_t N>
2031inline void LoadString(const CSimpleIniA& ini, const char* sec, const char* key, char (&dest)[N], const char* defVal)
2032{
2033 const char* val = ini.GetValue(sec, key, defVal);
2034 strncpy_s(dest, N, val, _TRUNCATE);
2035}
2036} // namespace INI
2037
2040{
2041 public:
2042 using Callback = std::function<void(const char* menuName, bool opening)>;
2043
2046 : _callback(std::move(a_cb))
2047 {
2049 }
2051 {
2052 if (_callback)
2053 RemoveMenuListener(this);
2054 }
2055
2059 {
2060 if (this != &other)
2061 {
2062 if (_callback)
2063 RemoveMenuListener(this);
2064 _callback = std::move(other._callback);
2065 if (_callback)
2066 {
2067 RemoveMenuListener(&other);
2069 other._callback = nullptr;
2070 }
2071 }
2072 return *this;
2073 }
2074
2075 private:
2076 static void Dispatch(const char* menuName, bool opening, void* userdata)
2077 {
2078 static_cast<MenuEventListener*>(userdata)->_callback(menuName, opening);
2079 }
2081};
2082
2084inline bool DrawManagedHotkey(const char* label, ManagedHotkey& h, HotkeyFlags flags = HotkeyFlags::kNone,
2085 float iconScale = 1.0f, float labelScale = 1.0f)
2086{
2087 if (auto i = GetInterface())
2088 return i->DrawManagedHotkey(label, &h, static_cast<int>(flags), iconScale, labelScale);
2089 return false;
2090}
2091
2092inline bool UpdateManagedHotkey(const void* e, ManagedHotkey& h)
2093{
2094 return GetInterface() ? GetInterface()->UpdateManagedHotkey(e, &h) : false;
2095}
2096
2097inline bool ProcessManagedHotkey(const void* e, ManagedHotkey& h)
2098{
2099 return GetInterface() ? GetInterface()->ProcessManagedHotkey(e, &h) : false;
2100}
2101
2103{
2104 return GetInterface() ? GetInterface()->IsManagedHotkeyDown(&h) : false;
2105}
2106
2108{
2109 if (h.isBinding)
2110 {
2111 AbortBinding();
2112 h.isBinding = false;
2113 }
2114}
2115
2116// --------------------------------------------------
2117// Overloads & Templates
2118// --------------------------------------------------
2119
2121inline void DrawEditorBounds(const ImVec2& min, const ImVec2& max, EditorBoundsState state = EditorBoundsState::kNormal,
2122 float thickness = 2.0f, bool screenSpace = false, const ImVec2* customAnchor = nullptr)
2123{
2124 ImU32 boundsColor;
2125 switch (state)
2126 {
2128 boundsColor = IM_COL32(150, 150, 150, 150); // Grey
2129 break;
2131 boundsColor = IM_COL32(51, 204, 51, 255); // Green
2132 break;
2134 boundsColor = IM_COL32(0, 255, 0, 255); // Bright Green
2135 break;
2137 default:
2138 boundsColor = IM_COL32(204, 51, 255, 255); // Purple
2139 break;
2140 }
2141
2142 if (screenSpace)
2143 {
2144 DrawScreenRect(min, max, boundsColor, 0.0f, thickness);
2145 }
2146 else
2147 {
2148 ImVec4 colV4 = ImGui::ColorConvertU32ToFloat4(boundsColor);
2149 DrawRect(min, max, colV4, 0.0f, thickness);
2150 }
2151
2152 ImVec2 anchor =
2153 customAnchor ? *customAnchor : ImVec2(min.x + (max.x - min.x) * 0.5f, min.y + (max.y - min.y) * 0.5f);
2154 float crossSize = Scale(10.0f);
2155 ImU32 anchorColor = IM_COL32(255, 0, 0, 204);
2156
2157 if (screenSpace)
2158 {
2159 DrawScreenLine({anchor.x - crossSize, anchor.y}, {anchor.x + crossSize, anchor.y}, anchorColor, 2.0f);
2160 DrawScreenLine({anchor.x, anchor.y - crossSize}, {anchor.x, anchor.y + crossSize}, anchorColor, 2.0f);
2161 }
2162 else
2163 {
2164 ImVec4 anchorV4 = ImGui::ColorConvertU32ToFloat4(anchorColor);
2165 DrawLine({anchor.x - crossSize, anchor.y}, {anchor.x + crossSize, anchor.y}, anchorV4, 2.0f);
2166 DrawLine({anchor.x, anchor.y - crossSize}, {anchor.x, anchor.y + crossSize}, anchorV4, 2.0f);
2167 }
2168}
2169
2172inline bool ClampPosToScreen(ImVec2& pos, float outOfBoundsTolerance = 50.0f)
2173{
2174 ImVec2 displaySize = GetDisplaySize();
2175 if (displaySize.x <= 0.0f || displaySize.y <= 0.0f)
2176 {
2177 return false;
2178 }
2179
2180 bool changed = false;
2181 float tolerance = Scale(outOfBoundsTolerance);
2182
2183 // X Axis
2184 if (pos.x > displaySize.x - tolerance)
2185 {
2186 pos.x = std::max(0.0f, displaySize.x - tolerance);
2187 changed = true;
2188 }
2189 else if (pos.x < 0.0f)
2190 {
2191 pos.x = 0.0f;
2192 changed = true;
2193 }
2194
2195 // Y Axis
2196 if (pos.y > displaySize.y - tolerance)
2197 {
2198 pos.y = std::max(0.0f, displaySize.y - tolerance);
2199 changed = true;
2200 }
2201 else if (pos.y < 0.0f)
2202 {
2203 pos.y = 0.0f;
2204 changed = true;
2205 }
2206
2207 return changed;
2208}
2209
2216
2219inline PosInitResult InitializeCustomPosition(ImVec2& pos, const ImVec2& defaultPos, bool& outHasClamped,
2220 float tolerance = 50.0f)
2221{
2222 ImVec2 displaySize = GetDisplaySize();
2223 if (displaySize.x <= 100.0f || displaySize.y <= 100.0f)
2224 {
2226 }
2227
2228 bool changed = false;
2229
2230 if (pos.x < 0.0f || pos.y < 0.0f)
2231 {
2232 pos = defaultPos;
2233 changed = true;
2234 }
2235 else if (!outHasClamped)
2236 {
2237 if (ClampPosToScreen(pos, tolerance))
2238 {
2239 changed = true;
2240 }
2241 outHasClamped = true;
2242 }
2243
2245}
2246
2248inline bool WASDNudge(float& outDeltaX, float& outDeltaY, bool isActiveOrHovered, float step = 1.0f,
2249 float sprintMult = 10.0f)
2250{
2251 if (!isActiveOrHovered || IsMouseDown(0))
2252 return false;
2253
2254 float moveStep = step / GetResolutionScale();
2255 if (IsKeyDown(ImGuiMod_Shift))
2256 moveStep = (step * sprintMult) / GetResolutionScale();
2257
2258 outDeltaX = 0.0f;
2259 outDeltaY = 0.0f;
2260 if (IsKeyPressed(ImGuiKey_W, true))
2261 outDeltaY -= moveStep;
2262 if (IsKeyPressed(ImGuiKey_S, true))
2263 outDeltaY += moveStep;
2264 if (IsKeyPressed(ImGuiKey_A, true))
2265 outDeltaX -= moveStep;
2266 if (IsKeyPressed(ImGuiKey_D, true))
2267 outDeltaX += moveStep;
2268
2269 return (outDeltaX != 0.0f || outDeltaY != 0.0f);
2270}
2271
2272inline bool Combo(const char* label, int* current_item, const std::vector<std::string>& items)
2273{
2274 std::vector<const char*> ptrs(items.size());
2275 for (size_t i = 0; i < items.size(); ++i)
2276 ptrs[i] = items[i].c_str();
2277 return Combo(label, current_item, ptrs.data(), static_cast<int>(ptrs.size()));
2278}
2279
2280inline bool ComboWithFilter(const char* label, int* current_item, std::span<const std::string> items,
2281 int popup_max_height_in_items = -1)
2282{
2283 std::vector<const char*> ptrs(items.size());
2284 for (size_t i = 0; i < items.size(); ++i)
2285 ptrs[i] = items[i].c_str();
2286 return GetInterface() ? GetInterface()->ComboWithFilter(label, current_item, ptrs.data(),
2287 static_cast<int>(ptrs.size()), popup_max_height_in_items)
2288 : false;
2289}
2290
2291inline bool InputText(const char* label, std::string* str, int flags = 0)
2292{
2293 if (!str)
2294 return false;
2295 char buf[2048];
2296 strncpy_s(buf, sizeof(buf), str->c_str(), _TRUNCATE);
2297 const bool changed = InputText(label, buf, sizeof(buf), flags);
2298 if (changed)
2299 *str = buf;
2300 return changed;
2301}
2302
2303template <typename T>
2304bool EnumStepper(const char* label, T* current_val, const std::vector<std::string>& items, bool a_translate = true)
2305{
2306 if (items.empty())
2307 return false;
2308
2309 int idx = static_cast<int>(*current_val);
2310 if (idx < 0)
2311 idx = 0;
2312 if (idx >= static_cast<int>(items.size()))
2313 idx = static_cast<int>(items.size()) - 1;
2314
2315 bool l = false, r = false;
2316
2317 const char* displayText = a_translate ? Translate(items[idx].c_str()) : items[idx].c_str();
2318
2319 Stepper(label, displayText, &l, &r);
2320
2321 if (l)
2322 {
2323 *current_val = static_cast<T>((idx - 1 + static_cast<int>(items.size())) % static_cast<int>(items.size()));
2324 return true;
2325 }
2326 if (r)
2327 {
2328 *current_val = static_cast<T>((idx + 1) % static_cast<int>(items.size()));
2329 return true;
2330 }
2331 return false;
2332}
2333
2334// --------------------------------------------------
2335// Version 2
2336// --------------------------------------------------
2337
2339{
2340 if (auto i = GetInterface(); i && i->version >= 2 && i->SeparatorVertical)
2341 i->SeparatorVertical();
2342}
2343
2344inline void PushItemWidth(float item_width)
2345{
2346 if (auto i = GetInterface(); i && i->version >= 2 && i->PushItemWidth)
2347 i->PushItemWidth(item_width);
2348}
2349
2350inline void PopItemWidth()
2351{
2352 if (auto i = GetInterface(); i && i->version >= 2 && i->PopItemWidth)
2353 i->PopItemWidth();
2354}
2355
2356inline bool BeginTooltip()
2357{
2358 if (auto i = GetInterface(); i && i->version >= 2 && i->BeginTooltip)
2359 return i->BeginTooltip();
2360 return false;
2361}
2362
2363inline void EndTooltip()
2364{
2365 if (auto i = GetInterface(); i && i->version >= 2 && i->EndTooltip)
2366 i->EndTooltip();
2367}
2368
2369inline void SetScrollHereY(float center_y_ratio = 0.5f)
2370{
2371 if (auto i = GetInterface(); i && i->version >= 2 && i->SetScrollHereY)
2372 i->SetScrollHereY(center_y_ratio);
2373}
2374
2375inline bool InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size = ImVec2(0, 0),
2376 int flags = 0)
2377{
2378 if (auto i = GetInterface(); i && i->version >= 2 && i->InputTextMultiline)
2379 return i->InputTextMultiline(label, buf, buf_size, size, flags);
2380 return false;
2381}
2382
2383inline bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), int flags = 0)
2384{
2385 if (!str || !GetInterface() || GetInterface()->version < 2)
2386 return false;
2387
2388 char buf[4096];
2389 strncpy_s(buf, sizeof(buf), str->c_str(), _TRUNCATE);
2390 const bool changed = InputTextMultiline(label, buf, sizeof(buf), size, flags);
2391 if (changed)
2392 *str = buf;
2393 return changed;
2394}
2395
2396} // namespace FUCK
2397
2398// ==================================================
2399// [ SECTION 5 ] GLOBAL LITERALS
2400// ==================================================
2401
2403inline const char* operator""_T(const char* str, std::size_t)
2404{
2405 return FUCK::Translate(str);
2406}
#define FUCK_API_VERSION
Definition FUCK_API.h:4
Implement this to add a new Tool to the FUCK Sidebar.
Definition FUCK_API.h:241
virtual void OnOpen()
Definition FUCK_API.h:253
virtual bool OnAsyncInput(const void *)
Definition FUCK_API.h:255
virtual const char * Name() const =0
virtual const char * Group() const
Definition FUCK_API.h:250
virtual bool ShowInSidebar() const
Definition FUCK_API.h:256
virtual const char * PluginName() const
The exact name of your SKSE plugin.
Definition FUCK_API.h:247
virtual void Draw()=0
virtual void RenderOverlay()
Definition FUCK_API.h:252
virtual void OnClose()
Definition FUCK_API.h:254
virtual ~ITool()=default
Implement this to add a floating, independent Window to the FUCK framework.
Definition FUCK_API.h:262
virtual bool IsOpen() const =0
virtual WindowFlags GetFlags() const
Definition FUCK_API.h:283
virtual const char * PluginName() const
The exact name of your SKSE plugin.
Definition FUCK_API.h:273
virtual void SetOpen(bool a_open)=0
virtual bool OnAsyncInput(const void *)
Definition FUCK_API.h:287
virtual ImVec2 GetDefaultSize() const
Definition FUCK_API.h:284
virtual const char * Id() const =0
Unique identifier for this specific window within your plugin.
virtual ~IWindow()=default
virtual void Draw()=0
virtual void RenderOverlay()
Definition FUCK_API.h:280
virtual ImVec2 GetDefaultPos() const
Definition FUCK_API.h:285
virtual const char * Title() const =0
Display title shown on the Window chrome. Translates natively if a localized string key is passed.
float GetWidth() const
Definition FUCK_API.h:1842
Image & operator=(Image &&other) noexcept
Definition FUCK_API.h:1820
Image(const char *a_path, bool a_resizeToScreen=false)
Definition FUCK_API.h:1801
Image & operator=(const Image &)=delete
bool IsLoaded() const
Definition FUCK_API.h:1837
Image()=default
float _width
Definition FUCK_API.h:1860
Image(Image &&other) noexcept
Definition FUCK_API.h:1811
ImVec2 GetSize() const
Definition FUCK_API.h:1844
float GetHeight() const
Definition FUCK_API.h:1843
float _height
Definition FUCK_API.h:1861
void * _handle
Definition FUCK_API.h:1859
ImTextureID GetID() const
Definition FUCK_API.h:1838
void Reset()
Definition FUCK_API.h:1846
Image(const Image &)=delete
~Image()
Definition FUCK_API.h:1810
Callback _callback
Definition FUCK_API.h:2080
MenuEventListener & operator=(MenuEventListener &&other) noexcept
Definition FUCK_API.h:2058
static void Dispatch(const char *menuName, bool opening, void *userdata)
Definition FUCK_API.h:2076
MenuEventListener(const MenuEventListener &)=delete
std::function< void(const char *menuName, bool opening)> Callback
Definition FUCK_API.h:2042
~MenuEventListener()
Definition FUCK_API.h:2050
MenuEventListener & operator=(const MenuEventListener &)=delete
MenuEventListener(Callback a_cb)
Definition FUCK_API.h:2045
void SaveKeybinds(INIFunc a_func) const
Definition FUCK_API.h:1913
const char * _pluginName
Definition FUCK_API.h:1942
std::function< void(CSimpleIniA &)> INIFunc
Definition FUCK_API.h:1874
void LoadKeybindsDefaults(INIFunc a_func) const
Definition FUCK_API.h:1922
std::string GetConfigDirectory() const
Returns the absolute path string pointing to this plugin's dedicated config folder.
Definition FUCK_API.h:1933
void LoadKeybinds(INIFunc a_func) const
Definition FUCK_API.h:1904
void LoadDefaults(INIFunc a_func) const
Loads the default shipped INI, ignoring user settings.
Definition FUCK_API.h:1895
void Save(INIFunc a_func) const
Definition FUCK_API.h:1885
PluginSettings(const char *a_pluginName=FUCK::g_pluginName)
Definition FUCK_API.h:1869
void Load(INIFunc a_func) const
Definition FUCK_API.h:1876
Delta save/load INI values.
Definition FUCK_API.h:1965
float LoadFloat(const CSimpleIniA &ini, const char *sec, const char *key, float defVal)
Definition FUCK_API.h:1971
void SaveDouble(CSimpleIniA &ini, const char *sec, const char *key, double val, double defVal, const char *fmt="%.2f")
Definition FUCK_API.h:2007
void LoadString(const CSimpleIniA &ini, const char *sec, const char *key, char(&dest)[N], const char *defVal)
Definition FUCK_API.h:2031
bool LoadBool(const CSimpleIniA &ini, const char *sec, const char *key, bool defVal)
Definition FUCK_API.h:1966
void SaveString(CSimpleIniA &ini, const char *sec, const char *key, const char *val, const char *defVal)
Definition FUCK_API.h:2022
void SaveInt(CSimpleIniA &ini, const char *sec, const char *key, T val, U defVal)
Definition FUCK_API.h:1994
T LoadInt(const CSimpleIniA &ini, const char *sec, const char *key, T defVal)
Definition FUCK_API.h:1978
void SaveBool(CSimpleIniA &ini, const char *sec, const char *key, bool val, bool defVal)
Definition FUCK_API.h:1984
Definition FUCK_API.h:11
PosInitResult InitializeCustomPosition(ImVec2 &pos, const ImVec2 &defaultPos, bool &outHasClamped, float tolerance=50.0f)
Handles first-frame initialization, default loading, and screen clamping for custom-positioned window...
Definition FUCK_API.h:2219
void SuspendRendering(bool suspend)
Definition FUCK_API.h:706
void SanitizePath(char *dest, const char *source, size_t size)
Definition FUCK_API.h:1770
float GetDeltaTime()
Definition FUCK_API.h:998
void AddMenuListener(void *userdata, void(*callback)(const char *menuName, bool opening, void *userdata))
Definition FUCK_API.h:1781
bool UpdateProportionalWeight(float &inOutWeight, float totalWidth)
Utility to capture a Table Column's width ratio upon releasing the mouse. Returns true when the weigh...
Definition FUCK_API.h:1594
bool EnumStepper(const char *label, T *current_val, const std::vector< std::string > &items, bool a_translate=true)
Definition FUCK_API.h:2304
void PushStyleVar(ImGuiStyleVar idx, float val)
Definition FUCK_API.h:753
void EndPanelFrame(float padding=8.0f)
Closes the panel opened by BeginPanelFrame.
Definition FUCK_API.h:1516
void EndTabBar()
Definition FUCK_API.h:1553
void TableSetBgColor(TableBgTarget target, ImU32 color, int column_n=-1)
Definition FUCK_API.h:1580
void SeparatorVertical()
Definition FUCK_API.h:2338
bool IsKeyPressed(ImGuiKey key, bool repeat=true)
Definition FUCK_API.h:1168
bool IsPopupOpen(const char *str_id=nullptr, PopupFlags flags=PopupFlags::kNone)
Definition FUCK_API.h:1108
bool BeginTabItem(const char *label, int flags=0)
Definition FUCK_API.h:1558
void BeginGroup()
Definition FUCK_API.h:943
float GetFrameHeight()
Definition FUCK_API.h:796
bool WASDNudge(float &outDeltaX, float &outDeltaY, bool isActiveOrHovered, float step=1.0f, float sprintMult=10.0f)
WASD key widget nudging.
Definition FUCK_API.h:2248
ImVec2 GetWindowPos()
Definition FUCK_API.h:1450
void TreePop()
Definition FUCK_API.h:1529
bool BeginWindow(const char *name, bool *p_open=nullptr, int flags=0)
Definition FUCK_API.h:1436
void SetGameTimeFrozen(bool frozen)
Definition FUCK_API.h:1024
bool TreeNode(const char *label)
Definition FUCK_API.h:1525
void Columns(int count=1, const char *id=nullptr, bool border=true)
Definition FUCK_API.h:1630
TableBgTarget
Definition FUCK_API.h:59
@ kRowBg1
Definition FUCK_API.h:62
@ kCellBg
Definition FUCK_API.h:63
@ kRowBg0
Definition FUCK_API.h:61
bool TableNextColumn()
Definition FUCK_API.h:1620
bool IsItemFocused()
Definition FUCK_API.h:1124
const char * GetKeyName(std::uint32_t k)
Definition FUCK_API.h:1070
bool IsGamepadKey(std::uint32_t k)
Definition FUCK_API.h:1074
bool IsModifierPressed(Modifier mod)
Definition FUCK_API.h:1062
void PopFont()
Definition FUCK_API.h:732
void SetMenuOpen(bool open)
Definition FUCK_API.h:711
bool DragFloat3(const char *label, float v[3], float speed=1.0f, float min=0.0f, float max=0.0f, const char *fmt="%.3f")
Definition FUCK_API.h:1271
bool SliderInt(const char *label, int *v, int min, int max, const char *fmt="%d")
Definition FUCK_API.h:1253
void Indent(float width=0.0f)
Definition FUCK_API.h:912
ImVec2 GetMousePos()
Definition FUCK_API.h:1013
bool InputText(const char *label, char *buf, size_t buf_size, int flags=0)
Definition FUCK_API.h:1237
void DrawScreenRectFilled(const ImVec2 &min, const ImVec2 &max, ImU32 col, float rounding=0.0f)
Definition FUCK_API.h:1746
bool BeginTable(const char *str_id, int column, TableFlags flags=TableFlags::kNone, const ImVec2 &outer_size=ImVec2(0.0f, 0.0f), float inner_width=0.0f)
Definition FUCK_API.h:1568
void Unindent(float width=0.0f)
Definition FUCK_API.h:917
ImVec2 GetItemRectMax()
Definition FUCK_API.h:875
void Header(const char *label)
Definition FUCK_API.h:1320
float GetColumnWidth(int column_index=-1)
Definition FUCK_API.h:1586
void TextColored(const ImVec4 &color, const char *fmt,...)
Definition FUCK_API.h:1346
bool InvisibleButton(const char *str_id, const ImVec2 &size, int flags=0)
Definition FUCK_API.h:1219
Modifier
Definition FUCK_API.h:37
@ kAlt
Definition FUCK_API.h:40
@ kShift
Definition FUCK_API.h:38
@ kCtrl
Definition FUCK_API.h:39
bool IsAnyItemActive()
Definition FUCK_API.h:1136
ImVec2 TranslateScaleformToScreen(float stageX, float stageY)
Converts standard 1280x720 Flash Stage coordinates into physical screen pixels (accounting for Aspect...
Definition FUCK_API.h:691
void TextWrapped(const char *fmt,...)
Definition FUCK_API.h:1394
bool BeginTooltip()
Definition FUCK_API.h:2356
void CenteredText(const char *label, bool vertical=false)
Definition FUCK_API.h:1330
const ImGuiPayload * AcceptDragDropPayload(const char *type, DragDropFlags flags=DragDropFlags::kNone)
Definition FUCK_API.h:1205
InputDevice
Definition FUCK_API.h:31
@ kGamepad
Definition FUCK_API.h:33
@ kMouseKeyboard
Definition FUCK_API.h:32
bool UpdateManagedHotkey(const void *e, ManagedHotkey &h)
Definition FUCK_API.h:2092
void DrawEditorBounds(const ImVec2 &min, const ImVec2 &max, EditorBoundsState state=EditorBoundsState::kNormal, float thickness=2.0f, bool screenSpace=false, const ImVec2 *customAnchor=nullptr)
Visual for UI widget editing. Handles Screen-Space and Window-Space.
Definition FUCK_API.h:2121
float GetResolutionScale()
Gets the physical screen resolution scale multiplier (Base 1080p).
Definition FUCK_API.h:632
void DrawGoldenSpiral(float thickness=1.0f, ImU32 color=0, int anchorIndex=0, float turns=6.0f, float rotationDeg=0.0f, float scale=1.0f, bool showSquares=false)
Definition FUCK_API.h:1675
ImVec2 GetCursorScreenPos()
Definition FUCK_API.h:831
void ForceCursor(bool force)
Definition FUCK_API.h:1044
void RegisterTool(ITool *tool)
Definition FUCK_API.h:611
void SetNextItemOpen(bool is_open, int cond=0)
Definition FUCK_API.h:893
ImTextureID GetIconForKey(std::uint32_t key, ImVec2 *outSize=nullptr)
Definition FUCK_API.h:1645
void EndTabItem()
Definition FUCK_API.h:1562
bool ComboForm(const char *label, std::uint32_t *currentFormID, std::uint8_t formType)
Definition FUCK_API.h:1292
EditorBoundsState
Definition FUCK_API.h:51
@ kNormal
Definition FUCK_API.h:53
@ kHovered
Definition FUCK_API.h:55
@ kSelected
Definition FUCK_API.h:54
@ kLocked
Definition FUCK_API.h:52
void RegisterWindow(IWindow *window)
Definition FUCK_API.h:616
void SetCursorPosY(float y)
Definition FUCK_API.h:814
bool SliderFloat(const char *label, float *v, float min, float max, const char *fmt="%.3f")
Definition FUCK_API.h:1249
TableColumnFlags
Definition FUCK_API.h:112
@ kWidthFixed
Definition FUCK_API.h:118
@ kNoSortAscending
Definition FUCK_API.h:124
@ kNoHeaderLabel
Definition FUCK_API.h:126
@ kNone
Definition FUCK_API.h:113
@ kIndentDisable
Definition FUCK_API.h:131
@ kIndentEnable
Definition FUCK_API.h:130
@ kNoReorder
Definition FUCK_API.h:120
@ kNoSortDescending
Definition FUCK_API.h:125
@ kDisabled
Definition FUCK_API.h:114
@ kNoHeaderWidth
Definition FUCK_API.h:127
@ kPreferSortDescending
Definition FUCK_API.h:129
@ kNoSort
Definition FUCK_API.h:123
@ kDefaultSort
Definition FUCK_API.h:116
@ kNoHide
Definition FUCK_API.h:121
@ kDefaultHide
Definition FUCK_API.h:115
@ kWidthStretch
Definition FUCK_API.h:117
@ kPreferSortAscending
Definition FUCK_API.h:128
@ kNoClip
Definition FUCK_API.h:122
void StringCopy(char(&dest)[N], const char *source)
String copy utility.
Definition FUCK_API.h:1947
PosInitResult
Definition FUCK_API.h:2211
@ kUnchanged
Definition FUCK_API.h:2213
@ kChanged
Definition FUCK_API.h:2214
@ kNotReady
Definition FUCK_API.h:2212
void DrawRectFilled(const ImVec2 &min, const ImVec2 &max, const ImVec4 &col, float rounding=0.0f)
Definition FUCK_API.h:1696
bool IsBinding()
Definition FUCK_API.h:1084
void BeginDisabled(bool disabled=true)
Definition FUCK_API.h:953
bool IsMenuOpen()
Definition FUCK_API.h:716
void SetWindowSize(const ImVec2 &size, int cond=0)
Definition FUCK_API.h:1475
void TextColoredWrapped(const ImVec4 &col, const char *fmt,...)
Definition FUCK_API.h:1358
bool InputTextMultiline(const char *label, char *buf, size_t buf_size, const ImVec2 &size=ImVec2(0, 0), int flags=0)
Definition FUCK_API.h:2375
ImVec2 GetStyleVarVec(ImGuiStyleVar idx)
Definition FUCK_API.h:773
void SetScrollHereY(float center_y_ratio=0.5f)
Definition FUCK_API.h:2369
HotkeyFlags
Definition FUCK_API.h:200
@ kNone
Definition FUCK_API.h:201
@ kCtrlToRebind
Definition FUCK_API.h:204
@ kLabelRight
Definition FUCK_API.h:203
@ kAlwaysHighlight
Definition FUCK_API.h:205
@ kNoModifiers
Definition FUCK_API.h:206
@ kAlignNear
Definition FUCK_API.h:202
void PopStyleColor(int count=1)
Definition FUCK_API.h:748
void DrawGrid(float thickness=0.0f, ImU32 color=0, float rows=3.0f, float cols=3.0f, float rotationDeg=0.0f)
Definition FUCK_API.h:1666
void Stepper(const char *label, const char *text, bool *outLeft, bool *outRight)
Definition FUCK_API.h:1426
const char * Translate(const char *key)
Definition FUCK_API.h:1761
void SetCursorPos(const ImVec2 &pos)
Definition FUCK_API.h:826
void DrawBackgroundRect(const ImVec2 &min, const ImVec2 &max, ImU32 col, float thickness)
Definition FUCK_API.h:1735
void SeparatorText(const char *label)
Definition FUCK_API.h:937
void LoadTranslation(const char *pluginName)
Definition FUCK_API.h:1765
WindowFlags
Definition FUCK_API.h:68
@ kNoDecoration
Definition FUCK_API.h:78
@ kAutoResize
Definition FUCK_API.h:83
@ kCustomPosition
Definition FUCK_API.h:85
@ kCloseOnEsc
Definition FUCK_API.h:76
@ kNone
Definition FUCK_API.h:69
@ kExtendBorder
Definition FUCK_API.h:80
@ kPauseHard
Definition FUCK_API.h:70
@ kBlurBackground
Definition FUCK_API.h:74
@ kPassInputToGame
Definition FUCK_API.h:75
@ kPauseSoft
Definition FUCK_API.h:71
@ kBlockVanity
Definition FUCK_API.h:72
@ kHideHUD
Definition FUCK_API.h:73
@ kNoBackground
Definition FUCK_API.h:79
@ kNoMove
Definition FUCK_API.h:82
@ kNoResize
Definition FUCK_API.h:81
@ kIgnoreUserScale
Definition FUCK_API.h:84
@ kCloseOnGameMenu
Definition FUCK_API.h:77
void GetPluginConfigPath(const char *pluginName, char *dest, size_t size)
Definition FUCK_API.h:1775
void EndDragDropSource()
Definition FUCK_API.h:1196
void SetTooltip(const char *fmt)
Definition FUCK_API.h:1335
float GetTextLineHeight()
Definition FUCK_API.h:788
void EndTooltip()
Definition FUCK_API.h:2363
ImVec2 GetWindowSize()
Definition FUCK_API.h:1460
void RemoveMenuListener(void *userdata)
Definition FUCK_API.h:1786
void DrawScreenLine(const ImVec2 &p1, const ImVec2 &p2, ImU32 col, float thickness=1.0f)
Definition FUCK_API.h:1751
void DrawImageQuad(ImTextureID textureId, const ImVec2 &p1, const ImVec2 &p2, const ImVec2 &p3, const ImVec2 &p4, const ImVec2 &uv1, const ImVec2 &uv2, const ImVec2 &uv3, const ImVec2 &uv4, const ImVec4 &tint_col=ImVec4(1, 1, 1, 1))
Definition FUCK_API.h:1712
void BeginChild(const char *str_id, const ImVec2 &size=ImVec2(0, 0), bool border=false, int flags=0)
Definition FUCK_API.h:1491
bool Hotkey(const char *label, std::uint32_t key, std::int32_t modifier, std::int32_t modifier2, bool alignFar=true, bool labelLeft=true, bool flashing=false)
Definition FUCK_API.h:1227
void AbortManagedHotkey(ManagedHotkey &h)
Definition FUCK_API.h:2107
float GetMouseWheel()
Definition FUCK_API.h:1020
void AbortBinding()
Definition FUCK_API.h:1079
void DrawLine(const ImVec2 &p1, const ImVec2 &p2, const ImVec4 &col, float thickness=1.0f)
Definition FUCK_API.h:1701
bool IsAnyItemHovered()
Definition FUCK_API.h:1140
void PopItemWidth()
Definition FUCK_API.h:2350
void TableSetupColumn(const char *label, TableColumnFlags flags=TableColumnFlags::kNone, float init_width_or_weight=0.0f, std::uint32_t user_id=0)
Definition FUCK_API.h:1609
bool IsInputPressed(const void *inputEvent, std::uint32_t keyId)
Definition FUCK_API.h:1050
bool SetDragDropPayload(const char *type, const void *data, size_t sz, int cond=0)
Definition FUCK_API.h:1192
bool DrawManagedHotkey(const char *label, ManagedHotkey &h, HotkeyFlags flags=HotkeyFlags::kNone, float iconScale=1.0f, float labelScale=1.0f)
Used for assigning Hotkeys within the FUCK interface.
Definition FUCK_API.h:2084
void EndTable()
Definition FUCK_API.h:1574
bool Combo(const char *label, int *current_item, const char *const *items, int items_count)
Definition FUCK_API.h:1281
DragDropFlags
Definition FUCK_API.h:135
@ kAcceptNoPreviewTooltip
Definition FUCK_API.h:145
@ kAcceptBeforeDelivery
Definition FUCK_API.h:143
@ kNone
Definition FUCK_API.h:136
@ kSourceNoHoldToOpenOthers
Definition FUCK_API.h:139
@ kSourceAllowNullID
Definition FUCK_API.h:140
@ kSourceNoDisableHover
Definition FUCK_API.h:138
@ kSourceNoPreviewTooltip
Definition FUCK_API.h:137
@ kAcceptNoDrawDefaultRect
Definition FUCK_API.h:144
@ kSourceAutoExpirePayload
Definition FUCK_API.h:142
@ kAcceptPeekOnly
Definition FUCK_API.h:146
@ kSourceExtern
Definition FUCK_API.h:141
Overlay
Definition FUCK_API.h:22
@ kTriangle
Definition FUCK_API.h:27
@ kGoldenSpiral
Definition FUCK_API.h:25
@ kCrosshair
Definition FUCK_API.h:24
@ kGoldenRatio
Definition FUCK_API.h:26
@ kGrid
Definition FUCK_API.h:23
bool IsWindowFocused(int flags=0)
Definition FUCK_API.h:1144
bool Button(const char *label)
Definition FUCK_API.h:1215
void TableHeadersRow()
Definition FUCK_API.h:1624
void PushItemWidth(float item_width)
Definition FUCK_API.h:2344
void PushStyleColor(ImGuiCol idx, const ImVec4 &col)
Definition FUCK_API.h:743
ImVec2 GetDisplaySize()
Definition FUCK_API.h:678
ImGuiTableSortSpecs * GetTableSortSpecs()
Definition FUCK_API.h:1315
void Dummy(const ImVec2 &size)
Definition FUCK_API.h:899
float GetAnalogInput(std::uint32_t keyId)
Definition FUCK_API.h:1058
void EndWindow()
Definition FUCK_API.h:1440
bool ImageButton(const char *str_id, ImTextureID user_texture_id, const ImVec2 &image_size, const ImVec4 *tint=nullptr)
Definition FUCK_API.h:1419
bool ColorEdit4(const char *label, float col[4], int flags=0)
Definition FUCK_API.h:1245
float UIScale(float value)
Scales by both Resolution and the User's UI Size slider.
Definition FUCK_API.h:665
WindowFlags operator|(WindowFlags a, WindowFlags b)
Definition FUCK_API.h:166
void NextColumn()
Definition FUCK_API.h:1635
bool IsItemDeactivated()
Definition FUCK_API.h:1128
FUCK_Interface *& GetInterface()
Definition FUCK_API.h:571
void DrawImage(ImTextureID textureId, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1))
Definition FUCK_API.h:1706
bool DragFloat4(const char *label, float v[4], float speed=1.0f, float min=0.0f, float max=0.0f, const char *fmt="%.3f")
Definition FUCK_API.h:1276
float CalcItemWidth()
Definition FUCK_API.h:855
void UnregisterWindow(IWindow *window)
Definition FUCK_API.h:621
bool BeginPopupContextItem(const char *str_id=nullptr, int mouse_button=1)
Definition FUCK_API.h:1539
bool IsKeyDown(ImGuiKey key)
Definition FUCK_API.h:1164
bool IsItemClicked(int mouse_button=0)
Definition FUCK_API.h:1116
void SeparatorThick()
Definition FUCK_API.h:932
void SetNextWindowSize(const ImVec2 &size, int cond=0)
Definition FUCK_API.h:1485
void DrawRect(const ImVec2 &min, const ImVec2 &max, const ImVec4 &col, float rounding=0.0f, float thickness=1.0f)
Definition FUCK_API.h:1690
void SetHardPause(bool paused)
Definition FUCK_API.h:1034
BindResult GetInputBind(const void *inputEvent, std::uint32_t *outKey, std::int32_t *outMod1, std::int32_t *outMod2)
Definition FUCK_API.h:1098
ItemFlags
Definition FUCK_API.h:150
@ kNoTabStop
Definition FUCK_API.h:152
@ kNoNav
Definition FUCK_API.h:155
@ kButtonRepeat
Definition FUCK_API.h:153
bool ToggleButton(const char *label, bool *v, bool alignFar=true, bool labelLeft=true)
Definition FUCK_API.h:1233
void DrawBackgroundImage(ImTextureID tex, float alpha)
Definition FUCK_API.h:1725
bool IsWindowHovered(int flags=0)
Definition FUCK_API.h:1148
ImVec4 GetStyleColorVec4(ImGuiCol idx)
Definition FUCK_API.h:780
void TextUnformatted(const char *text, const char *text_end=nullptr)
Definition FUCK_API.h:1406
bool IsItemDeactivatedAfterEdit()
Definition FUCK_API.h:1132
BindResult
Definition FUCK_API.h:44
@ kBound
Definition FUCK_API.h:46
@ kNone
Definition FUCK_API.h:45
@ kCancelled
Definition FUCK_API.h:47
void AddImage(ImTextureID textureId, const ImVec2 &min, const ImVec2 &max, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1), const ImVec4 &col=ImVec4(1, 1, 1, 1))
Definition FUCK_API.h:1719
const char * g_pluginName
Definition FUCK_API.h:12
void DrawScreenRect(const ImVec2 &min, const ImVec2 &max, ImU32 col, float rounding=0.0f, float thickness=1.0f)
Definition FUCK_API.h:1740
ImVec2 GetItemRectMin()
Definition FUCK_API.h:868
bool BeginDragDropSource(DragDropFlags flags=DragDropFlags::kNone)
Definition FUCK_API.h:1188
float GetTextLineHeightWithSpacing()
Definition FUCK_API.h:792
bool CollapsingHeader(const char *label, int flags=0)
Definition FUCK_API.h:1534
bool IsInputDown(std::uint32_t keyId)
Definition FUCK_API.h:1054
Font
Definition FUCK_API.h:16
@ kRegular
Definition FUCK_API.h:17
@ kLarge
Definition FUCK_API.h:18
float GetStyleVar(ImGuiStyleVar idx)
Definition FUCK_API.h:769
void EndDragDropTarget()
Definition FUCK_API.h:1209
void DrawGoldenGrid(float thickness=1.0f, ImU32 color=0, int subdivisions=0)
Definition FUCK_API.h:1681
TableFlags
Definition FUCK_API.h:89
@ kRowBg
Definition FUCK_API.h:97
@ kNone
Definition FUCK_API.h:90
@ kBordersOuterV
Definition FUCK_API.h:101
@ kBorders
Definition FUCK_API.h:104
@ kHideable
Definition FUCK_API.h:93
@ kBordersOuterH
Definition FUCK_API.h:99
@ kResizable
Definition FUCK_API.h:91
@ kSortable
Definition FUCK_API.h:94
@ kSizingFixedSame
Definition FUCK_API.h:106
@ kBordersInnerV
Definition FUCK_API.h:100
@ kBordersH
Definition FUCK_API.h:102
@ kNoSavedSettings
Definition FUCK_API.h:95
@ kSizingStretchSame
Definition FUCK_API.h:108
@ kContextMenuInBody
Definition FUCK_API.h:96
@ kBordersV
Definition FUCK_API.h:103
@ kSizingFixedFit
Definition FUCK_API.h:105
@ kReorderable
Definition FUCK_API.h:92
@ kSizingStretchProp
Definition FUCK_API.h:107
@ kBordersInnerH
Definition FUCK_API.h:98
bool BeginTabBar(const char *str_id, int flags=0)
Definition FUCK_API.h:1549
float GetFrameHeightWithSpacing()
Definition FUCK_API.h:800
void SetWindowFontScale(float scale)
Definition FUCK_API.h:737
PopupFlags
Definition FUCK_API.h:159
@ kNone
Definition FUCK_API.h:160
@ kAnyPopupId
Definition FUCK_API.h:161
@ kAnyPopup
Definition FUCK_API.h:163
@ kAnyPopupLevel
Definition FUCK_API.h:162
void PushItemFlag(ItemFlags flag, bool enabled)
Definition FUCK_API.h:983
bool IsItemHovered(int flags=0)
Definition FUCK_API.h:1112
void SetCursorScreenPos(const ImVec2 &pos)
Definition FUCK_API.h:838
float Scale(float value)
Scales by the Monitor Resolution.
Definition FUCK_API.h:651
void EndGroup()
Definition FUCK_API.h:948
float GetGlobalScale()
Gets the overall screen resolution combined with the user's selected UI Size Slider multiplier.
Definition FUCK_API.h:639
void PushID(const char *str_id)
Definition FUCK_API.h:963
void DrawOverlay(Overlay type, float thickness=1.0f, ImU32 color=0, float paramA=0.0f, float paramB=0.0f, float paramC=0.0f, float paramD=0.0f)
Definition FUCK_API.h:1660
void EndPopup()
Definition FUCK_API.h:1543
bool IsMouseClicked(int button, bool repeat=false)
Definition FUCK_API.h:1156
void SetItemDefaultFocus()
Definition FUCK_API.h:1178
BindResult UpdateBinding(const void *inputEvent, std::uint32_t *outKey, std::int32_t *outMod1, std::int32_t *outMod2)
Definition FUCK_API.h:1093
void PushFont(ImFont *font, float size=0.0f)
Definition FUCK_API.h:727
void PopStyleVar(int count=1)
Definition FUCK_API.h:763
ImFont * GetFont(Font font)
Definition FUCK_API.h:723
double GetTime()
Definition FUCK_API.h:1002
ImVec2 GetMouseDelta()
Definition FUCK_API.h:1006
void ExtendWindowPastBorder()
Definition FUCK_API.h:1445
ImVec2 GetCursorPos()
Definition FUCK_API.h:819
void Spinner(const char *label, float radius, float thickness, const ImVec4 &color)
Definition FUCK_API.h:1655
bool IsWidgetFocused(const char *label)
Definition FUCK_API.h:1183
bool BeginDragDropTarget()
Definition FUCK_API.h:1201
bool operator&(WindowFlags a, WindowFlags b)
Definition FUCK_API.h:170
void Separator()
Definition FUCK_API.h:927
void SetAutoVanityBlocked(bool blocked)
Definition FUCK_API.h:1029
void SetKeyboardFocusHere(int offset=0)
Definition FUCK_API.h:1173
void Text(const char *fmt,...)
Definition FUCK_API.h:1382
void AlignTextToFramePadding()
Definition FUCK_API.h:843
void LeftLabel(const char *label)
Definition FUCK_API.h:1325
void SetNextItemWidth(float width)
Definition FUCK_API.h:888
ImVec2 GetItemRectSize()
Definition FUCK_API.h:882
float GetUserScale()
Gets the user's custom UI Size Slider multiplier.
Definition FUCK_API.h:645
bool IsItemActive()
Definition FUCK_API.h:1120
void StartBinding(std::uint32_t key, std::int32_t mod1, std::int32_t mod2, bool disallowModifiers=false)
Definition FUCK_API.h:1088
void Spacing(int count=1)
Definition FUCK_API.h:904
ImVec2 CalcTextSize(const char *text, const char *text_end=nullptr, bool hide_text_after_double_hash=false, float wrap_width=-1.0f)
Definition FUCK_API.h:859
void EndChild()
Definition FUCK_API.h:1496
void TextDisabled(const char *fmt,...)
Definition FUCK_API.h:1370
void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition FUCK_API.h:922
void EndDisabled()
Definition FUCK_API.h:958
void SetSoftPause(bool paused)
Definition FUCK_API.h:1039
void DrawCrosshair(float thickness=1.0f, ImU32 color=0, float rows=1.0f, float cols=1.0f)
Definition FUCK_API.h:1671
bool ComboWithFilter(const char *label, int *current_item, const char *const *items, int items_count, int popup_max_height_in_items=-1)
Definition FUCK_API.h:1285
bool DragFloat(const char *label, float *v, float speed=1.0f, float min=0.0f, float max=0.0f, const char *fmt="%.3f")
Definition FUCK_API.h:1261
void PopID()
Definition FUCK_API.h:978
bool Connect(const char *pluginName, unsigned int a_minVersion=FUCK_API_VERSION)
Connects to the FUCK Host Framework.
Definition FUCK_API.h:580
bool ProcessManagedHotkey(const void *e, ManagedHotkey &h)
Definition FUCK_API.h:2097
bool IsMouseDown(int button)
Definition FUCK_API.h:1152
bool ButtonIconWithLabel(const char *label, ImTextureID textureID, const ImVec2 &size, bool alignFar=true, bool labelLeft=true)
Definition FUCK_API.h:1412
void SetCursorPosX(float x)
Definition FUCK_API.h:809
bool IsMouseReleased(int button)
Definition FUCK_API.h:1160
bool Checkbox(const char *label, bool *v, bool alignFar=true, bool labelLeft=true)
Definition FUCK_API.h:1223
void DrawTriangle(float thickness=1.0f, ImU32 color=0, bool mirror=false)
Definition FUCK_API.h:1685
bool ClampPosToScreen(ImVec2 &pos, float outOfBoundsTolerance=50.0f)
Clamps a window or widget position to the screen bounds if it strays too far off-screen.
Definition FUCK_API.h:2172
void BeginPanelFrame(const char *str_id, float padding=8.0f)
Begins an inset child panel using an inside-out group margin. This prevents native ImGui window paddi...
Definition FUCK_API.h:1505
void SetWindowPos(const ImVec2 &pos, int cond=0)
Definition FUCK_API.h:1470
bool DragInt(const char *label, int *v, float speed=1.0f, int min=0, int max=0, const char *fmt="%d")
Definition FUCK_API.h:1257
void SetNextWindowPos(const ImVec2 &pos, int cond=0, const ImVec2 &pivot=ImVec2(0, 0))
Definition FUCK_API.h:1480
bool Selectable(const char *label, bool selected=false, int flags=0, const ImVec2 &size=ImVec2(0, 0))
Definition FUCK_API.h:1310
void HelpMarker(const char *desc)
Definition FUCK_API.h:1340
bool DragFloat2(const char *label, float v[2], float speed=1.0f, float min=0.0f, float max=0.0f, const char *fmt="%.3f")
Definition FUCK_API.h:1266
void TableNextRow(int row_flags=0, float min_row_height=0.0f)
Definition FUCK_API.h:1615
bool ColorEdit3(const char *label, float col[3], int flags=0)
Definition FUCK_API.h:1241
bool IsManagedHotkeyDown(ManagedHotkey &h)
Definition FUCK_API.h:2102
ImVec2 GetContentRegionAvail()
Definition FUCK_API.h:848
void DrawBackgroundLine(const ImVec2 &p1, const ImVec2 &p2, ImU32 col, float thickness)
Definition FUCK_API.h:1730
InputDevice GetInputDevice()
Definition FUCK_API.h:1066
void PopItemFlag()
Definition FUCK_API.h:988
Definition FUCK_API.h:218
bool isBinding
Definition FUCK_API.h:222
bool disallowModifiers
Definition FUCK_API.h:225
std::int32_t kMod1
Definition FUCK_API.h:220
bool wasTriggered
Definition FUCK_API.h:223
std::int32_t gMod2
Definition FUCK_API.h:221
std::uint32_t kKey
Definition FUCK_API.h:219
std::uint32_t gKey
Definition FUCK_API.h:219
std::int32_t kMod2
Definition FUCK_API.h:221
bool waitForRelease
Definition FUCK_API.h:224
void Clear()
Definition FUCK_API.h:227
std::int32_t gMod1
Definition FUCK_API.h:220
Definition FUCK_API.h:297
void(* SetNextWindowSize)(float, float, int)
Definition FUCK_API.h:469
void(* DrawImage)(void *, const ImVec2 &, const ImVec2 &, const ImVec2 &, const ImVec4 &)
Definition FUCK_API.h:454
bool(* Button)(const char *)
Definition FUCK_API.h:485
bool(* IsManagedHotkeyDown)(FUCK::ManagedHotkey *)
Definition FUCK_API.h:421
void(* EndPopup)()
Definition FUCK_API.h:482
void(* ExtendWindowPastBorder)()
Definition FUCK_API.h:476
void(* LeftLabel)(const char *)
Definition FUCK_API.h:507
void(* PushItemFlag)(FUCK::ItemFlags, bool)
Definition FUCK_API.h:375
void(* TextDisabled)(const char *)
Definition FUCK_API.h:511
bool(* IsMenuOpen)()
Definition FUCK_API.h:316
bool(* ColorEdit3)(const char *, float[3], int)
Definition FUCK_API.h:491
float(* GetFrameHeightWithSpacing)()
Definition FUCK_API.h:362
void(* SetWindowSize)(float, float, int)
Definition FUCK_API.h:473
void(* TableHeadersRow)()
Definition FUCK_API.h:529
void(* Text)(const char *)
Definition FUCK_API.h:546
void(* PopItemWidth)()
Definition FUCK_API.h:553
void(* ReleaseImage)(void *)
Definition FUCK_API.h:389
bool(* IsWindowFocused)(int)
Definition FUCK_API.h:433
void(* BeginDisabled)(bool)
Definition FUCK_API.h:539
float(* GetMouseWheel)()
Definition FUCK_API.h:323
void(* DrawLine)(const ImVec2 &, const ImVec2 &, const ImVec4 &, float)
Definition FUCK_API.h:453
FUCK::BindResult(* UpdateBinding)(const void *, std::uint32_t *, std::int32_t *, std::int32_t *)
Definition FUCK_API.h:415
void(* GetMouseDelta)(float *, float *)
Definition FUCK_API.h:321
float(* CalcItemWidth)()
Definition FUCK_API.h:345
void(* HelpMarker)(const char *)
Definition FUCK_API.h:377
void(* DrawScreenRectFilled)(const ImVec2 &, const ImVec2 &, ImU32, float)
Definition FUCK_API.h:464
void(* Spinner)(const char *, float, float, const ImVec4 &)
Definition FUCK_API.h:393
void(* TextUnformatted)(const char *, const char *)
Definition FUCK_API.h:548
void(* AddMenuListener)(void *userdata, void(*callback)(const char *menuName, bool opening, void *userdata))
Definition FUCK_API.h:384
void(* SetNextItemOpen)(bool, int)
Definition FUCK_API.h:350
void(* SetItemDefaultFocus)()
Definition FUCK_API.h:441
bool(* TreeNode)(const char *)
Definition FUCK_API.h:479
void(* SetSoftPause)(bool)
Definition FUCK_API.h:400
void(* Header)(const char *)
Definition FUCK_API.h:506
void(* ForceCursor)(bool)
Definition FUCK_API.h:401
void(* RegisterTool)(FUCK::ITool *)
Definition FUCK_API.h:301
double(* GetTime)()
Definition FUCK_API.h:320
bool(* ComboWithFilter)(const char *, int *, const char *const *, int, int)
Definition FUCK_API.h:501
void(* LoadPluginKeybinds)(const char *pluginName, void *userdata, void(*callback)(CSimpleIniA &, void *))
Definition FUCK_API.h:372
void(* PopFont)()
Definition FUCK_API.h:313
void(* EndDragDropSource)()
Definition FUCK_API.h:445
void(* CalcTextSize)(const char *, const char *, bool, float, float *, float *)
Definition FUCK_API.h:346
void(* TextWrapped)(const char *)
Definition FUCK_API.h:547
const ImGuiPayload *(* AcceptDragDropPayload)(const char *, int)
Definition FUCK_API.h:447
bool(* IsModifierPressed)(FUCK::Modifier)
Definition FUCK_API.h:407
bool(* IsMouseClicked)(int, bool)
Definition FUCK_API.h:436
void(* PopItemFlag)()
Definition FUCK_API.h:376
void(* TranslateScaleformToScreen)(float, float, float *, float *)
Definition FUCK_API.h:310
void(* SeparatorText)(const char *)
Definition FUCK_API.h:355
void(* GetContentRegionAvail)(float *, float *)
Definition FUCK_API.h:344
bool(* DragFloat4)(const char *, float[4], float, float, float, const char *)
Definition FUCK_API.h:499
void(* Separator)()
Definition FUCK_API.h:353
void(* GetWindowPos)(float *, float *)
Definition FUCK_API.h:470
float(* GetUserScale)()
Definition FUCK_API.h:308
bool(* IsMouseDown)(int)
Definition FUCK_API.h:435
const char *(* GetTranslation)(const char *)
Definition FUCK_API.h:366
void(* SetAutoVanityBlocked)(bool)
Definition FUCK_API.h:398
bool(* CollapsingHeader)(const char *, int)
Definition FUCK_API.h:536
float(* GetTextLineHeight)()
Definition FUCK_API.h:359
void(* GetImageInfo)(void *, float *, float *)
Definition FUCK_API.h:390
void(* DrawBackgroundLine)(float, float, float, float, unsigned int, float)
Definition FUCK_API.h:459
FUCK::BindResult(* GetInputBind)(const void *, std::uint32_t *, std::int32_t *, std::int32_t *)
Definition FUCK_API.h:416
void(* Spacing)()
Definition FUCK_API.h:352
void(* PushID_Ptr)(const void *)
Definition FUCK_API.h:380
void(* LoadPluginKeybindsDefaults)(const char *pluginName, void *userdata, void(*callback)(CSimpleIniA &, void *))
Definition FUCK_API.h:374
void(* DrawScreenLine)(float, float, float, float, ImU32, float)
Definition FUCK_API.h:465
bool(* InputText)(const char *, char *, size_t, int)
Definition FUCK_API.h:490
void(* SetGameTimeFrozen)(bool)
Definition FUCK_API.h:397
void(* Columns)(int, const char *, bool)
Definition FUCK_API.h:532
void(* DrawRect)(const ImVec2 &, const ImVec2 &, const ImVec4 &, float, float)
Definition FUCK_API.h:451
void(* GetPluginConfigPath)(const char *, char *, size_t)
Definition FUCK_API.h:368
bool(* ComboForm)(const char *, std::uint32_t *, std::uint8_t)
Definition FUCK_API.h:502
void(* SameLine)(float, float)
Definition FUCK_API.h:535
void(* SeparatorVertical)()
Definition FUCK_API.h:551
void(* PushID_Int)(int)
Definition FUCK_API.h:379
void(* SuspendRendering)(bool)
Definition FUCK_API.h:314
void(* Dummy)(float, float)
Definition FUCK_API.h:351
const char *(* GetKeyName)(std::uint32_t)
Definition FUCK_API.h:409
bool(* ComboFormStr)(const char *, char *, size_t, std::uint8_t)
Definition FUCK_API.h:503
bool(* DragFloat2)(const char *, float[2], float, float, float, const char *)
Definition FUCK_API.h:497
bool(* BeginTable)(const char *, int, int, const ImVec2 &, float)
Definition FUCK_API.h:524
void(* CenteredTextWithArrows)(const char *, const char *, bool *, bool *, bool *)
Definition FUCK_API.h:513
bool(* IsInputPressed)(const void *, std::uint32_t)
Definition FUCK_API.h:404
bool(* SliderInt)(const char *, int *, int, int, const char *)
Definition FUCK_API.h:494
void(* DrawImageQuad)(void *, const ImVec2 &, const ImVec2 &, const ImVec2 &, const ImVec2 &, const ImVec2 &, const ImVec2 &, const ImVec2 &, const ImVec2 &, const ImVec4 &)
Definition FUCK_API.h:455
void(* BeginChild)(const char *, float, float, bool, int)
Definition FUCK_API.h:477
bool(* BeginDragDropTarget)()
Definition FUCK_API.h:446
bool(* IsItemFocused)()
Definition FUCK_API.h:428
float(* GetDeltaTime)()
Definition FUCK_API.h:319
bool(* SetDragDropPayload)(const char *, const void *, size_t, int)
Definition FUCK_API.h:444
void(* EndTooltip)()
Definition FUCK_API.h:555
float(* GetGlobalScale)()
Definition FUCK_API.h:307
void(* PopStyleColor)(int)
Definition FUCK_API.h:327
bool(* DragFloat)(const char *, float *, float, float, float, const char *)
Definition FUCK_API.h:496
void(* PopID)()
Definition FUCK_API.h:381
bool(* ColorEdit4)(const char *, float[4], int)
Definition FUCK_API.h:492
bool(* BeginPopupContextItem)(const char *, int)
Definition FUCK_API.h:481
void(* AbortBinding)()
Definition FUCK_API.h:413
void(* LoadPluginINIDefaults)(const char *, void *, void(*)(CSimpleIniA &, void *))
Definition FUCK_API.h:371
void(* SetNextItemWidth)(float)
Definition FUCK_API.h:349
void(* LoadPluginINI)(const char *pluginName, void *userdata, void(*callback)(CSimpleIniA &, void *))
Definition FUCK_API.h:369
bool(* BeginWindow)(const char *, bool *, int)
Definition FUCK_API.h:474
bool(* IsItemDeactivated)()
Definition FUCK_API.h:429
void(* SetCursorPosY)(float)
Definition FUCK_API.h:338
void(* SetCursorPos)(float, float)
Definition FUCK_API.h:340
bool(* BeginTooltip)()
Definition FUCK_API.h:554
void(* BeginGroup)()
Definition FUCK_API.h:537
void(* UnregisterWindow)(FUCK::IWindow *)
Definition FUCK_API.h:303
float(* GetStyleVar)(ImGuiStyleVar)
Definition FUCK_API.h:331
void(* GetStyleColorVec4)(ImGuiCol, float *, float *, float *, float *)
Definition FUCK_API.h:333
bool(* ProcessManagedHotkey)(const void *, FUCK::ManagedHotkey *)
Definition FUCK_API.h:420
bool(* IsKeyDown)(ImGuiKey)
Definition FUCK_API.h:438
void(* TextColored)(const ImVec4 &, const char *)
Definition FUCK_API.h:509
void(* PushID_Str)(const char *)
Definition FUCK_API.h:378
void(* EndDisabled)()
Definition FUCK_API.h:540
bool(* DrawManagedHotkey)(const char *, FUCK::ManagedHotkey *, int, float, float)
Definition FUCK_API.h:418
bool(* BeginDragDropSource)(int)
Definition FUCK_API.h:443
void(* AlignTextToFramePadding)()
Definition FUCK_API.h:343
void(* EndWindow)()
Definition FUCK_API.h:475
bool(* InvisibleButton)(const char *, const ImVec2 &, int)
Definition FUCK_API.h:486
void(* SetWindowPos)(float, float, int)
Definition FUCK_API.h:472
float(* GetFrameHeight)()
Definition FUCK_API.h:361
void(* GetWindowSize)(float *, float *)
Definition FUCK_API.h:471
bool(* TableNextColumn)()
Definition FUCK_API.h:528
void(* LoadTranslation)(const char *)
Definition FUCK_API.h:365
void(* Unindent)(float)
Definition FUCK_API.h:545
void(* TreePop)()
Definition FUCK_API.h:480
void(* PushStyleVar)(ImGuiStyleVar, float)
Definition FUCK_API.h:328
float(* GetAnalogInput)(std::uint32_t)
Definition FUCK_API.h:406
int(* GetInputDevice)()
Definition FUCK_API.h:408
void(* TableSetupColumn)(const char *, int, float, std::uint32_t)
Definition FUCK_API.h:526
bool(* IsAnyItemActive)()
Definition FUCK_API.h:431
void(* PopStyleVar)(int)
Definition FUCK_API.h:330
bool(* ImageButton)(const char *, void *, float, float, const ImVec4 *)
Definition FUCK_API.h:516
void(* SanitizePath)(char *, const char *, size_t)
Definition FUCK_API.h:367
void(* SetNextWindowPos)(float, float, int, float, float)
Definition FUCK_API.h:468
void(* DrawRectFilled)(const ImVec2 &, const ImVec2 &, const ImVec4 &, float)
Definition FUCK_API.h:452
void(* TableNextRow)(int, float)
Definition FUCK_API.h:527
void(* PushItemWidth)(float)
Definition FUCK_API.h:552
void(* PushFont)(ImFont *, float)
Definition FUCK_API.h:312
bool(* IsWindowHovered)(int)
Definition FUCK_API.h:434
void(* SetCursorPosX)(float)
Definition FUCK_API.h:337
void(* GetItemRectMax)(float *, float *)
Definition FUCK_API.h:348
void(* DrawOverlay)(FUCK::Overlay, float, ImU32, float, float, float, float)
Definition FUCK_API.h:394
bool(* DragFloat3)(const char *, float[3], float, float, float, const char *)
Definition FUCK_API.h:498
void(* EndChild)()
Definition FUCK_API.h:478
void(* GetStyleVarVec)(ImGuiStyleVar, float *, float *)
Definition FUCK_API.h:332
bool(* ToggleButton)(const char *, bool *, bool, bool)
Definition FUCK_API.h:489
bool(* DragInt)(const char *, int *, float, int, int, const char *)
Definition FUCK_API.h:495
void(* DrawBackgroundImage)(void *, float)
Definition FUCK_API.h:458
bool(* ButtonIconWithLabel)(const char *, void *, float, float, bool, bool)
Definition FUCK_API.h:515
bool(* Combo)(const char *, int *, const char *const *, int)
Definition FUCK_API.h:500
bool(* IsPopupOpen)(const char *, int)
Definition FUCK_API.h:424
void(* StartBinding)(std::uint32_t, std::int32_t, std::int32_t, bool)
Definition FUCK_API.h:414
void(* PushStyleVarVec)(ImGuiStyleVar, const ImVec2 &)
Definition FUCK_API.h:329
void(* GetIconSizeForKey)(std::uint32_t, float *, float *)
Definition FUCK_API.h:392
void(* GetItemRectMin)(float *, float *)
Definition FUCK_API.h:347
bool(* IsAnyItemHovered)()
Definition FUCK_API.h:432
void(* RegisterWindow)(FUCK::IWindow *)
Definition FUCK_API.h:302
bool(* Selectable)(const char *, bool, int, const ImVec2 &)
Definition FUCK_API.h:504
void(* RemoveMenuListener)(void *userdata)
Definition FUCK_API.h:385
bool(* UpdateManagedHotkey)(const void *, FUCK::ManagedHotkey *)
Definition FUCK_API.h:419
bool(* BeginTabBar)(const char *, int)
Definition FUCK_API.h:519
void(* SetMenuOpen)(bool)
Definition FUCK_API.h:315
unsigned int version
Definition FUCK_API.h:298
void(* SeparatorThick)()
Definition FUCK_API.h:354
ImGuiTableSortSpecs *(* GetTableSortSpecs)()
Definition FUCK_API.h:505
void(* GetCursorPos)(float *, float *)
Definition FUCK_API.h:339
void(* SetWindowFontScale)(float)
Definition FUCK_API.h:334
void(* GetMousePos)(float *, float *)
Definition FUCK_API.h:322
float(* GetColumnWidth)(int)
Definition FUCK_API.h:356
void(* SavePluginINI)(const char *pluginName, void *userdata, void(*callback)(CSimpleIniA &, void *))
Definition FUCK_API.h:370
void(* CenteredText)(const char *, bool)
Definition FUCK_API.h:512
bool(* IsItemActive)()
Definition FUCK_API.h:427
void(* SetScrollHereY)(float)
Definition FUCK_API.h:556
void(* EndTable)()
Definition FUCK_API.h:525
void(* DrawScreenRect)(const ImVec2 &, const ImVec2 &, ImU32, float, float)
Definition FUCK_API.h:463
bool(* IsGamepadKey)(std::uint32_t)
Definition FUCK_API.h:410
void(* SetHardPause)(bool)
Definition FUCK_API.h:399
void(* TextColoredWrapped)(const ImVec4 &, const char *)
Definition FUCK_API.h:510
void(* AddImage)(void *, const ImVec2 &, const ImVec2 &, const ImVec2 &, const ImVec2 &, const ImVec4 &)
Definition FUCK_API.h:457
void(* SavePluginKeybinds)(const char *pluginName, void *userdata, void(*callback)(CSimpleIniA &, void *))
Definition FUCK_API.h:373
bool(* IsItemHovered)(int)
Definition FUCK_API.h:425
ImFont *(* GetFont)(FUCK::Font)
Definition FUCK_API.h:311
void(* SetTooltip)(const char *)
Definition FUCK_API.h:543
void(* NextColumn)()
Definition FUCK_API.h:533
void(* DrawBackgroundRect)(const ImVec2 &, const ImVec2 &, ImU32, float)
Definition FUCK_API.h:460
void(* EndDragDropTarget)()
Definition FUCK_API.h:448
bool(* IsWidgetFocused)(const char *)
Definition FUCK_API.h:542
bool(* IsKeyPressed)(ImGuiKey, bool)
Definition FUCK_API.h:439
void(* GetDisplaySize)(float *, float *)
Definition FUCK_API.h:309
bool(* IsItemDeactivatedAfterEdit)()
Definition FUCK_API.h:430
void(* SetKeyboardFocusHere)(int)
Definition FUCK_API.h:440
bool(* IsBinding)()
Definition FUCK_API.h:412
bool(* IsInputDown)(std::uint32_t)
Definition FUCK_API.h:405
bool(* SliderFloat)(const char *, float *, float, float, const char *)
Definition FUCK_API.h:493
void(* EndGroup)()
Definition FUCK_API.h:538
void(* GetCursorScreenPos)(float *, float *)
Definition FUCK_API.h:341
bool(* Hotkey)(const char *, std::uint32_t, std::int32_t, std::int32_t, bool, bool, bool)
Definition FUCK_API.h:488
void(* EndTabItem)()
Definition FUCK_API.h:522
void(* Indent)(float)
Definition FUCK_API.h:544
void(* PushStyleColor)(ImGuiCol, const ImVec4 &)
Definition FUCK_API.h:326
void(* SetCursorScreenPos)(float, float)
Definition FUCK_API.h:342
void(* Stepper)(const char *, const char *, bool *, bool *)
Definition FUCK_API.h:517
void(* EndTabBar)()
Definition FUCK_API.h:520
bool(* BeginTabItem)(const char *, int)
Definition FUCK_API.h:521
bool(* IsItemClicked)(int)
Definition FUCK_API.h:426
bool(* Checkbox)(const char *, bool *, bool, bool)
Definition FUCK_API.h:487
void(* TableSetBgColor)(int, ImU32, int)
Definition FUCK_API.h:530
bool(* InputTextMultiline)(const char *, char *, size_t, const ImVec2 &, int)
Definition FUCK_API.h:557
bool(* IsMouseReleased)(int)
Definition FUCK_API.h:437
float(* GetResolutionScale)()
Definition FUCK_API.h:306
float(* GetTextLineHeightWithSpacing)()
Definition FUCK_API.h:360