mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-19 06:17:45 +01:00
Better handling of sub-objects, better headers
This commit is contained in:
parent
045c84512f
commit
14eddac6f7
4 changed files with 109 additions and 46 deletions
|
|
@ -64,11 +64,17 @@ public partial class ModEditWindow
|
|||
_quickImportTrees ??= Array.Empty<ResourceTree>();
|
||||
}
|
||||
|
||||
var textColorNonPlayer = ImGui.GetColorU32( ImGuiCol.Text );
|
||||
var textColorPlayer = ( textColorNonPlayer & 0xFF000000u ) | ( ( textColorNonPlayer & 0x00FEFEFE ) >> 1 ) | 0x8000u; // Half green
|
||||
|
||||
foreach( var (tree, index) in _quickImportTrees.WithIndex() )
|
||||
{
|
||||
if( !ImGui.CollapsingHeader( $"{tree.Name}##{index}", ( index == 0 ) ? ImGuiTreeNodeFlags.DefaultOpen : 0 ) )
|
||||
using( var c = ImRaii.PushColor( ImGuiCol.Text, tree.PlayerRelated ? textColorPlayer : textColorNonPlayer ) )
|
||||
{
|
||||
continue;
|
||||
if( !ImGui.CollapsingHeader( $"{tree.Name}##{index}", ( index == 0 ) ? ImGuiTreeNodeFlags.DefaultOpen : 0 ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
using var id = ImRaii.PushId( index );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue