File tree Expand file tree Collapse file tree
DynamicVariablePowerTools Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using FrooxEngine ;
2+ using HarmonyLib ;
3+ using MonkeyLoader . Resonite . UI ;
4+ using MonkeyLoader . Resonite . UI . Inspectors ;
5+ using System ;
6+ using System . Collections . Generic ;
7+ using System . Linq ;
8+ using System . Text ;
9+ using System . Threading . Tasks ;
10+
11+ namespace DynamicVariablePowerTools
12+ {
13+ internal sealed class OpenLinkedDynamicVariableSpace
14+ : ResoniteInspectorMonkey < OpenLinkedDynamicVariableSpace , BuildInspectorHeaderEvent >
15+ {
16+ public override bool CanBeDisabled => true ;
17+ public override int Priority => HarmonyLib . Priority . First ;
18+
19+ // Needs to be able to handle interfaces for IDynamicVariable
20+ public OpenLinkedDynamicVariableSpace ( ) : base ( typeof ( DynamicVariableBase < > ) )
21+ { }
22+
23+ protected override void Handle ( BuildInspectorHeaderEvent eventData )
24+ {
25+ if ( Traverse . Create ( eventData . Worker ) . Field ( "handler" ) . Field ( "_currentSpace" ) . GetValue ( ) is not DynamicVariableSpace space )
26+ return ;
27+
28+ InspectorUIHelper . BuildHeaderOpenParentButtons ( eventData . UI , space ) ;
29+ }
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments