amethyst / amethyst/bracket-lib
Alignment of text vs hollow_box
- Ngôn ngữ chính
- Rust
- Star
- 1.7k
- Fork
- 126
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Hello,
Firstly: thank you so much for this library and for your book! I'm having a really fun time learning Rust whilst hacking on a little game idea :)
I've noticed that when drawing text compared to drawing a hollow box using `ctx.draw_hollow_box`, the two do not align up and seem to use different grids - or one is offset on the grid.
In the screenshot below, I've drawn a "T" at (x, y) using `ctx.print(x, y, "T")`. I've then got code that draws a hollow box around the mouse's position:
```
self.map.render(ctx);
let mouse_pos = INPUT.lock().mouse_tile(0);
ctx.set_active_console(2); // separate tile for mouse highlights
ctx.draw_hollow_box(mouse_pos.x, mouse_pos.y, 1, 1, YELLOW, BLACK);
```
I would (perhaps naively) expect here that I could hover over a "T" that's been drawn, and see a yellow box drawn around it, but instead it seems like the boxes are at a different offset:

I think this is probably due to how the cursor is translated into an (x, y) on the grid, but I'm not sure how to resolve or if this is even possible - am I thinking about this in the wrong way?
Thanks again!
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.