mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Texture processor cleanup, new asset properties config UI
This commit is contained in:
@@ -35,4 +35,43 @@ extension ImGui
|
||||
{
|
||||
return SetDragDropPayload(type.GetName(), data, sz, cond);
|
||||
}
|
||||
|
||||
/// Starts a new row in the table and enters the first column.
|
||||
public static bool BeginPropertyTable(char8* name, uint32 tableId)
|
||||
{
|
||||
return ImGui.BeginTableEx(name, tableId, 2, .SizingStretchSame | .BordersInner | .Resizable);
|
||||
}
|
||||
|
||||
/// Starts a new row in the table and enters the first column.
|
||||
public static void PropertyTableStartNewRow()
|
||||
{
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableSetColumnIndex(0);
|
||||
}
|
||||
|
||||
/// Starts a new property by creating a new table row, writing the name in the first column and entering the second column.
|
||||
public static void PropertyTableStartNewProperty(StringView propertyName)
|
||||
{
|
||||
PropertyTableStartNewRow();
|
||||
|
||||
bool isFirstTableRow = ImGui.TableGetRowIndex() == 0;
|
||||
|
||||
if (isFirstTableRow)
|
||||
ImGui.PushItemWidth(-1);
|
||||
|
||||
ImGui.TextUnformatted(propertyName);
|
||||
|
||||
ImGui.AttachTooltip(propertyName);
|
||||
|
||||
ImGui.TableSetColumnIndex(1);
|
||||
|
||||
if (isFirstTableRow)
|
||||
ImGui.PushItemWidth(-1);
|
||||
}
|
||||
|
||||
public static void PropertyTableStartNewProperty(StringView propertyName, StringView tooltip)
|
||||
{
|
||||
PropertyTableStartNewProperty(propertyName);
|
||||
AttachTooltip(tooltip);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user