Question Question about getting the Portrait box in a dialogue

IMAWPI

Newcomer
I've been trying to create a framework mod (for my future mods) wherein I need to replace the Vanilla Portrait in a Dialogue window with a custom one (it's most likely going to be 512x512 or 1024x1024, just testing stuff right now).
I have little to no experience working in C# and never really did mods before (a few very small, unreleased ones for Minecraft a couple years back) and the Problem I'm facing right now is that I can't quite seem to get the right position to replace the Vanilla Portrait, almost every time I run into the same Problem. Either the Image loads in the top left corner (probably close to 0, 0) or it detects the whole Dialogue Box (not just the Portrait) and stretches it over the entire thing.
I even went as far and tried to work with ChatGPT to get it to a working state, but most of the stuff that comes out of it WOULD work, if it was in 1.5, not 1.6.

tl:dr
I'd Appreciate it if someone knew how exactly to either hook into the needed method to get the Vanilla Portrait or how I could go about getting the information I need.

I did think about just using one of the available mods that I think would work in SDV 1.6, but I'd much rather try creating my own one that I can tweak however I like and overall just to learn how to do it myself instead of just using a already made mod.

Ps. I'd want it to be able to load high Resolution Images but just shrink it down without it getting pixelated (Something along the likes of "HD Portraiture (Plus)", but again It's important to me that I do it on my own without just using another mod.

Thanks
 
Top