
oaklandgit
Hands-on Rust: ".with_dimensions()" vs. ".with_simple_console" (page 97)
Hi,
Fantastic book! Question:
On page 97, when building a BTerm, why is it necessary to specify the terminal’s dimensions in two ways: first, here:
.with_dimensions(DISPLAY_WIDTH, DISPLAY_HEIGHT)
and then again here
.with_simply_console(DISPLAY_WIDTH, DISPLAY_HEIGHT, etc.
Mostly just curious. And is there an API reference for bracket-lib anywhere? I couldn’t find one here: (bracket-lib/bracket-terminal at master · amethyst/bracket-lib · GitHub)
Thank you,
Lazza
Most Liked

herbert
There’s the beginning of a guide here: https://bfnightly.bracketproductions.com/bracket-lib/
I’ve had a heck of a month, hopefully I’ll get it finished soon. The resolution is specified on the console to force it to scale appropriately to the character size on the font. You can usually skip it, I tend to put it in there for safety (occasionally programs run into some ODD display settings!)

oaklandgit
Thank you Herbert!
Popular Prag Prog topics










Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /zig
- /scala
- /html
- /debian
- /nixos
- /lisp
- /agda
- /textmate
- /sublime-text
- /react-native
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /manjaro
- /django
- /spring
- /diversity
- /nodejs
- /lua
- /julia
- /slackware
- /c
- /neovim