[Solved] Having Some Problems Altering Existing Panel Properties
Posted: Thu May 21, 2020 2:26 pm
So i'm adding a custom UI graphic that is replacing an already existing one, specifically the pop-up window for the merchant "repair/talk/sell/exit" asset. After hours of fiddling I was able to get my custom asset to replace this graphic, when I started trying to edit the properties from the base class though I started to run into some problems. The primary one being that some properties have internal access modifiers, which won't allow me to change properties such as the panel Size (which I want 9 pixels taller, otherwise is squashes my custom asset slightly).
From "BaseScreenComponent.cs":
They are both set as virtual, so I tried to override them in my derived class, but it can't seem to find the method:
But "Size" is throwing "No suitable method found to override", so i'm not sure how to properly override that.
Oh yeah, and the reason that the internal part is not allowing my derived class to access that set is because of this apparently, "The Internal modifier means that the symbol can only be accessed from within the same assembly. Only code that is compiled into the same DLL as your code can access your properties or methods that are tagged with internal."
As noted in this post: https://stackoverflow.com/questions/444 ... n-assembly
Sorry if this is a bit dis-organized, but hopefully what i'm asking makes sense and what i'm having issues with in this regard, thanks for your time.
From "BaseScreenComponent.cs":
Code: Select all
/// <summary>
/// Gets position relative to parent panel.
/// </summary>
public virtual Vector2 Position
{
get { return position; }
internal set { position = value; }
}
/// <summary>
/// Gets size of component.
/// </summary>
public virtual Vector2 Size
{
get { return size; }
internal set { size = value; }
}
Code: Select all
/*Vector2 size;
public override Vector2 Size
{
get { return size; }
set { size = value; }
}*/
Oh yeah, and the reason that the internal part is not allowing my derived class to access that set is because of this apparently, "The Internal modifier means that the symbol can only be accessed from within the same assembly. Only code that is compiled into the same DLL as your code can access your properties or methods that are tagged with internal."
As noted in this post: https://stackoverflow.com/questions/444 ... n-assembly
Sorry if this is a bit dis-organized, but hopefully what i'm asking makes sense and what i'm having issues with in this regard, thanks for your time.