Skip to content

Commit

Permalink
Editor: update room navbar items when a object's description changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Feb 7, 2025
1 parent 3e73d96 commit ec1d4ee
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Editor/AGS.Editor/Panes/Room/RoomSettingsEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -972,10 +972,13 @@ protected override void OnPropertyChanged(string propertyName, object oldValue)
}

if (propertyName == RoomHotspot.PROPERTY_NAME_SCRIPT_NAME ||
propertyName == RoomObject.PROPERTY_NAME_SCRIPT_NAME ||
propertyName == RoomHotspot.PROPERTY_NAME_DESCRIPTION ||
propertyName == RoomObject.PROPERTY_NAME_SCRIPT_NAME ||
propertyName == RoomObject.PROPERTY_NAME_DESCRIPTION ||
propertyName == Character.PROPERTY_NAME_SCRIPTNAME ||
propertyName == Character.PROPERTY_NAME_DESCRIPTION ||
needRefresh)
{
{
if (_layer != null)
{
// Force the layer to refresh its property list with the new name
Expand All @@ -984,7 +987,7 @@ protected override void OnPropertyChanged(string propertyName, object oldValue)
_layer.FilterOn();
}
RefreshLayersTree();
}
}
}

protected override void OnWindowActivated()
Expand Down
1 change: 1 addition & 0 deletions Editor/AGS.Types/Character.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace AGS.Types
public class Character : ICustomTypeDescriptor, IToXml, IComparable<Character>
{
public const string PROPERTY_NAME_SCRIPTNAME = "ScriptName";
public const string PROPERTY_NAME_DESCRIPTION = "RealName";
public const string PROPERTY_NAME_STARTINGROOM = "StartingRoom";
public const int NARRATOR_CHARACTER_ID = 999;

Expand Down
1 change: 1 addition & 0 deletions Editor/AGS.Types/RoomHotspot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace AGS.Types
public class RoomHotspot : IChangeNotification
{
public const string PROPERTY_NAME_SCRIPT_NAME = "Name";
public const string PROPERTY_NAME_DESCRIPTION = "Description";

private static InteractionSchema _interactionSchema;

Expand Down
1 change: 1 addition & 0 deletions Editor/AGS.Types/RoomObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace AGS.Types
public class RoomObject : IComparable<RoomObject>, IChangeNotification, ICustomTypeDescriptor
{
public const string PROPERTY_NAME_SCRIPT_NAME = "Name";
public const string PROPERTY_NAME_DESCRIPTION = "Description";

private static InteractionSchema _interactionSchema;

Expand Down

0 comments on commit ec1d4ee

Please sign in to comment.