Git Product home page Git Product logo

gconsole-ugui's People

Stargazers

 avatar Papa Brickolini avatar li5414 avatar Matt Sylvia avatar  avatar 财富吸引力 avatar Álvaro García avatar Gavin avatar Ray Yee avatar Pulaski Zhang avatar  avatar Robbie Cargill avatar Bryan Legend avatar

Watchers

Bryan Legend avatar  avatar

gconsole-ugui's Issues

Adding color

GConsole.Color = (text, color) => string.Format("<color=#{0}>{1}", color, text); < Need to add this to get color codes working with current version of GConsole.

example...

void Start ()
    {
        GConsole.OnOutput += OnOutput;  //Register the "OnOutput" method as a listener for console output.
        input.GetComponent<GConsoleuGUIInput> ().uGUI = this;
        foreach(GConsoleuGUISuggestion sugg in suggestions) {
            sugg.uGUI = this;
        }

        GConsole.Color = (text, color) => string.Format("<color=#{0}>{1}</color>", color, text); 
    }

Rich Text Colored output for uGUI

Hello.

I noticed that the markup for the new uGUI output was not correct.

I changed mine to this:

// In public class GConsole : MonoBehaviour
 public static string Color(string text, string colorCode) {
        if(instance.useColoredText) {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append("<color=#");
            sb.Append(colorCode);
            sb.Append(">");
            sb.Append(text);
            sb.Append("</color>");
            return sb.ToString();
        }
        else {
            return text;
        }
    }

Might want to arrange a pattern to provide different formats. Or just bake that in with a boolean.

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.