Okna trybu natychmiastowego i elementy sterujące oparte na wywołaniu zwrotnym.
Dostępne funkcje
imgui.create
Tworzy sledzony ImGui window record i zwraca ImGuiWindow object. Argument title uzywa “REAL_IM_UI”, gdy zostanie pominiety albo jest nil. Title musi byc unikalny wsrod aktualnie sledzonych ImGui windows; utworzenie kolejnego tracked window z tym samym title wywoluje Lua error.
imgui.setvsync
Aktualizuje vertical synchronization preference dla ImGui renderer. Aktualny presentation path zapisuje te preference, ale jej nie stosuje.
ImGuiWindow.Button
Dolacza button element do ImGuiWindow i zapisuje callback. Gdy wyrenderowany button zostanie klikniety, callback trafia do queue i pozniej jest wywolywany bez arguments. Method zwraca to samo ImGuiWindow object.
ImGuiWindow.Checkbox
Appends a checkbox element to an ImGuiWindow. The callback is invoked with the new boolean value when the checkbox changes, and the method returns the same ImGuiWindow object.
ImGuiWindow.CollapsingHeader
Dolacza collapsing header start marker, natychmiast wywoluje content callback z tym samym ImGuiWindow object, aby mogl dodac nested elements, a potem dolacza header end marker. Podczas rendering nested elements sa pomijane, gdy header jest collapsed. Callback errors sa przechwytywane i nie sa zwracane przez ta method.
ImGuiWindow.ColorPicker
Appends a RGBA color editor to an ImGuiWindow and stores the callback. Missing or nil color components default to 1.0. When the rendered editor changes, the callback is queued and later invoked with red, green, blue, and alpha. The method returns the same ImGuiWindow object.
ImGuiWindow.destroy
Niszczy ImGuiWindow. Jesli object nadal wskazuje na window, method usuwa to window z tracked ImGui window list Real, wykonuje unreference dla stored element callbacks, usuwa window record i ustawia Instance reference na nil. Ponowne wywolanie destroy na tym samym object wraca bez wykonywania zadnej akcji.
ImGuiWindow.InputText
Dolacza single-line ImGui InputText element do ImGuiWindow i zapisuje callback. Initial text jest odczytywany przez optional string handling i kopiowany do fixed 256-byte text buffer elementu. Gdy wyrenderowany input sie zmieni, callback trafia do queue i pozniej jest wywolywany z current string. Method zwraca to samo ImGuiWindow object.
ImGuiWindow.SameLine
Dodaje SameLine layout marker do okna. Podczas rendering Real wywoluje a same-line layout marker w tym miejscu element list, aby nastepny renderowany element mogl kontynuowac w tym samym wierszu.
ImGuiWindow.Separator
Dodaje Separator marker do okna. Podczas rendering Real wywoluje a separator w tym miejscu element list.
ImGuiWindow.SliderFloat
Dodaje SliderFloat element do okna. label, value, minimum i maximum sa czytane z argumentow od 2 do 5, a argumenty liczbowe sa sprawdzane przez number type checking. Podczas rendering Real wywoluje a floating-point slider z zapisanym value i zakresem. Gdy ImGui zglosi zmieniona wartosc, onChange trafia do queue i jest pozniej wywolywane z jednym Lua number. Real nie dodaje w tym closure osobnej walidacji minimum <= maximum.
ImGuiWindow.SliderInt
Adds an integer slider to the window. The label, value, minimum, and maximum arguments are required. When the user changes the slider, the callback receives the updated integer value.
ImGuiWindow.Text
Dodaje nieinteraktywny Text element do okna. Argument text jest czytany przez string type checking i zapisywany w element. Podczas rendering Real wywoluje a text element, wiec podany text jest uzywany jako string content, a nie jako ImGui format string.