Giter Site home page Giter Site logo

Add an API for drawing a box about kotter HOT 3 CLOSED

varabyte avatar varabyte commented on July 17, 2024
Add an API for drawing a box

from kotter.

Comments (3)

bitspittle avatar bitspittle commented on July 17, 2024

If we want overlaying text, e.g. a GAME OVER message drawing over the screen, this can be gnarly, because of needing to understand and update colors, e.g. above if the X's are yellow and Hello is red, we need to change the color back to yellow.

This probably means this feature is too custom and is kind of a deal breaker, unless we come up with some way to render text to an intermediate string and then we can merge those two together.

from kotter.

bitspittle avatar bitspittle commented on July 17, 2024

It's possible we could come up with an API similar to bordered which just got added today.

from kotter.

bitspittle avatar bitspittle commented on July 17, 2024

I don't think this has ever come up for me needing it, so I'm not going to add an API for it.

However, if you need it, you can delegate to justified:

justified(CENTER, minWidth = 10) {
   repeat(4) { textLine() }
   text("Hello")
   repeat(5) { textLine() }
}

from kotter.

Related Issues (20)

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.