Skip to content

Commit

Permalink
Add parent entry to code editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Skirlez committed Oct 5, 2024
1 parent 9f4f13a commit f9b6d5a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion UndertaleModTool/Editors/UndertaleCodeEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<UserControl.InputBindings>
<KeyBinding Modifiers="Control" Key="K" Command="{x:Static local:UndertaleCodeEditor.Compile}"/>
</UserControl.InputBindings>
<UserControl.Resources>
<local:NullToVisibilityConverter x:Key="VisibleIfNotNull" nullValue="Collapsed" notNullValue="Visible"/>
</UserControl.Resources>
<Grid MaxHeight="{Binding ElementName=DataEditor, Path=ActualHeight}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
Expand All @@ -24,6 +27,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>

Expand All @@ -39,7 +43,10 @@
<TextBlock Grid.Row="3" Grid.Column="0" Margin="3">Offset</TextBlock>
<local:TextBoxDark Grid.Row="3" Grid.Column="1" Margin="3" Text="{Binding Offset}"/>

<TabControl x:Name="CodeModeTabs" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" SelectionChanged="TabControl_SelectionChanged">
<TextBlock Grid.Row="4" Grid.Column="0" Margin="3" Visibility="{Binding ParentEntry, Converter={StaticResource VisibleIfNotNull}}">Parent entry</TextBlock>
<local:UndertaleObjectReference Grid.Row="4" Grid.Column="1" Margin="3" Visibility="{Binding ParentEntry, Converter={StaticResource VisibleIfNotNull}}" ObjectReference="{Binding ParentEntry}" ObjectType="{x:Type undertale:UndertaleCode}" CanRemove="False"/>

<TabControl x:Name="CodeModeTabs" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" SelectionChanged="TabControl_SelectionChanged">
<TabItem Header="Decompiled" Name="DecompiledTab">
<Grid>
<avalonEdit:TextEditor
Expand Down

0 comments on commit f9b6d5a

Please sign in to comment.