saltyhotdog / BattletechIssueTracker

Public issue tracker to communicate with modders and HBS.
MIT License
6 stars 0 forks source link

Resizing Starmap #4

Closed Morphyum closed 6 years ago

Morphyum commented 6 years ago

Describe the location in the code your question is about StarmapScreen.RenderStarmap() or where else the actual starmap gets rendered.

What is the question you have about this code? I want to resize the actual starmap, so that you have to scroll more and the systems are more spread out. What are the variables, that i have to look for?

Leave any additional comments here I tried to change _Size and _AspectRatio already and both didn't achieve anything.

caardappel-hbs commented 6 years ago

StarmapScreen has two private variables, width and height, that determine the size of the RenderTexture. Try manipulating those as well.

Morphyum commented 6 years ago

I tried those too but they seem to have absolutely no effects :-/

caardappel-hbs commented 6 years ago

_starRT should also be set to null to force the recalculation.

Morphyum commented 6 years ago

Sadly that also did have no effect :-/

Morphyum commented 6 years ago
private void RefreshStarmap()
        {
            this.height = 4000;
            this._starRT = null;
            if (this.starmap == null)
            {
                return;
            }
            Vector3 localScale = base.transform.localScale;
            float aspectRatio = 1f;
            this.RenderStarmap(this.starmap, this.screenMaterial, this.starRT, this.size, this.starTex, aspectRatio);
        }
Morphyum commented 6 years ago

We managed to do it, so closeing this