Giter Club home page Giter Club logo

dockingcam's People

Contributors

dennytx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dockingcam's Issues

Installing DockingCam overwrites the default text style

When installing this mod, the default text style gets overwritten with the font color of red. Looking through the code, this is because of the following lines:

        public DockingCamera(Part part, bool noiseActive, string windowLabel = "Docking Camera")
            : base(part, windowLabel)
        {
            this.noiseActive = noiseActive;
            target = new TargetHelper(part);
            guiStyleRedLabel = HighLogic.Skin.label;
            guiStyleRedLabel.normal.textColor = Color.red;
            if (textureWhiteNoise != null || !noiseActive) return;
            textureWhiteNoise = new List<Texture2D>[3];
            for (int j = 0; j < 3; j++)
            {
                textureWhiteNoise[j] = new List<Texture2D>();
                for (int i = 0; i < 4; i++)
                    textureWhiteNoise[j].Add(Util.WhiteNoiseTexture((int)texturePosition.width, (int)texturePosition.height));

            }
        }

https://github.com/DennyTX/DockingCam/blob/master/KSPCamera/Camera/DockingCamera.cs#L35

The guiStyleRedLabel is a reference type, and doesn't create a local copy by default. In kOS, we implemented a "deep copy" of the skin. I didn't implement it myself, but it looks like you probably want to change line 3 to guiStyleRedLabel = new GUIStyle(HighLogic.Skin.label); https://github.com/KSP-KOS/KOS/blob/develop/src/kOS/Utilities/Utils.cs#L134

KerbalStuff Down

Any chance you can provide an alternate download link, as KerbalStuff is now offline?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.