Giter VIP home page Giter VIP logo

Comments (6)

nazmulidris avatar nazmulidris commented on September 22, 2024

@Cthutu Definitely. I can add a resize variant to ReadlineEvent. I will reply to you when I've added this (in a few hours).

I'd not envisioned people using this crate and controlling each "pixel" of the terminal viewport. The r3bl_tui crate is well suited for this use case. I don't know if you've had a chance to check that one out: https://docs.rs/r3bl_tui/latest/r3bl_tui/. (It is in the same mono repo as r3bl_terminal_async.

from r3bl-open-core.

nazmulidris avatar nazmulidris commented on September 22, 2024

@Cthutu I just made the changes you requested to v0.5.1. Here is the full changelog:
https://github.com/r3bl-org/r3bl-open-core/blob/main/CHANGELOG.md#v051-2024-04-28

PLMK if you have any questions about using the API or if you need any changes made. And please keep me posted on the game that you're building! 🎉

from r3bl-open-core.

nazmulidris avatar nazmulidris commented on September 22, 2024

@Cthutu If you haven't already, please star 🌟 this repo & please check out our YouTube channel 👀 here. There's an entire playlist on building the r3bl_terminal_async (roughly) from inception to release.

from r3bl-open-core.

Cthutu avatar Cthutu commented on September 22, 2024

I've started watching those videos - thanks for sharing your development experience. And thanks so much for adding that feature in a timely matter! It's really helpful. Knowing how wide the terminal is means I can wrap text properly. And those sneaky users can do it at runtime means I have to figure out what I will have to do when that happens.

from r3bl-open-core.

nazmulidris avatar nazmulidris commented on September 22, 2024

I've started watching those videos - thanks for sharing your development experience. And thanks so much for adding that feature in a timely matter! It's really helpful. Knowing how wide the terminal is means I can wrap text properly. And those sneaky users can do it at runtime means I have to figure out what I will have to do when that happens.

@Cthutu Glad to hear you are taking a look at the videos. You're most welcome for the videos & new features! 🙏🏽

I agree that terminal width is important to know, typically in raw mode, when you control all the "pixels" that are displayed, and you have some state containing what is supposed to have already been painted, then you can apply a strategy of clearing the display or affected lines and then repainting them. In r3bl_tui, thats what I do with the OffscreenBuffer. You might take a look at it to get some ideas. In your game, you might consider saving all the output that goes to SharedWriters to an intermediate buffer, so that you can repaint when you need.

from r3bl-open-core.

nazmulidris avatar nazmulidris commented on September 22, 2024

@Cthutu also we have a discord server, if you want to ask questions about the crate or other CLI / TUI topics: https://discord.gg/PhuF4qFpcA

from r3bl-open-core.

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.