Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Varisha

#76
Help / Re: InspectPanel
November 01, 2017, 08:07:42 AM
Quote from: CannibarRechter on November 01, 2017, 08:06:04 AM
> I cannot call that internal class :/

Did you try doing it with strings, instead of using it literally?

Do you mean in combination with reflection? No I didn't.
#77
Help / Re: InspectPanel
November 01, 2017, 07:45:17 AM
I was able to do something like this. This is basically how i would like to keep the old logic

namespace StorageAreaContent
{
    class MainTabWindow_ZoneInspect : MainTabWindow_Inspect
    {
        public new void DoPaneContents(Rect rect)
        {
            Zone selZone = ((ISelectable)Find.Selector.FirstSelectedObject) as Zone;
            if (selZone != null)
            {
                ZoneInspectPaneFiller.DoPaneContentsFor(selZone, rect); //missing basec InspectPanelFiller settings and functionality
            } else {
                base.DoPaneContents(rect);
            }
        }
    }
}


It this still creates the problem that i cannot reuse the common InspectPanelFiller settings, methods  and attributes for my ZoneInspectPaneFiller class. If i reimplement/copy what is currently available in InspectPanelFiller then i need to adjust my mod if any change will be done from core side. This is what i don't want ^^
What i tried with reflection so far is resulted as well in some kind of access modifier error in the IDE. I cannot call that internal class :/
#78
Help / Re: InspectPanel
November 01, 2017, 05:47:43 AM
The thing is, I only want to add some behavior for a selected zone. Currently it just prints the label and nothing else. I would like to put some more information but keep the logic for any other thing selected. So I would not mess up existing stuff, I am quite sure about this :)

I also thought about changing the calling method in the MainWindow_Inspect class (if I recall it right), but there was the problem with instantiating the internal class. I will check reflection topic. Maybe there is a way.

Thanks,, Vari
#79
Help / [Resolved] InspectPanel
October 30, 2017, 03:54:42 PM
Released:  Thread
------
Hi,

i am quite familiar with java programming for many years now and thought i will start some modding on RimWorld gaining as well some C# experience. Unfortunatly it seems I have a feature in mind I cannot easily integrate due to access modifiers of targeted base classes ^^

I would like to show some more specific information in the inspect window. The class i figured out would be good to use is: InspectPaneFiller.
This is declared as internal class.

Just to be sure I would like to ask if i am right, that:
- InspectPaneFiller cannot be used as base class in my namespace as it is internal in namespace RimWorld (I assume I should not use that namespace in my mod files)
- I cannot instantiate InspectPaneFiller for the reason it is not in my namespace
- I cannot even call public static methods of this internal class


Does this completely destroy my idea of modding the inspect window? I dont want to copy core-content of this internal class, as later core changes need to be included by me then, which is not needed if i could derive it or instantiate it.

Regards Vari