Comments (1)
No problem, I'm always looking for any kind of feedback with the project.
python-tdl's printStr method isn't nearly as flexible as in native libtcod. You're mostly supposed to use Python's native string functions to format strings and draw them that way.
The setColors method has no affect on draw* operations and you also need to use the move method to place the virtual cursor before calling printStr, this is why the text was only placed in the upper left corner in your example. And because they don't change the defaults of draw* methods those drawRect calls were drawing empty white on black rectangles.
It might be confusing actually, draw* calls always default to white on black without any exceptions. I could try changing it but because they're so frequently called that any added behaviors often have major impacts on the speed of the library.
I fixed the render_bar issues in the project you gave me, I basically commented out setColors and printStr and replaced them with only draw* calls and Python string formatting, you should see a pull request for it on GitHub somewhere soon.
If you have any other issues I'll be willing to help with them.
Kyle Stewart - [email protected]
from python-tcod.
Related Issues (20)
- Since version 1.16.0 context.present with integer_scaling = True is ignored HOT 9
- Not installing from git on python 3.9 anaconda HOT 1
- Can't build wheels from source on MacOS.
- No module named 'tcod._libtcod' when importing tcod HOT 9
- tcod 12.7.2 fails to install on arch linux HOT 5
- Add support to release linux aarch64 wheels
- win stop responding when there is no `tcod.event.get()` HOT 4
- Issue with libtcod importing NDArray from numpy.typing when it should just be importing ndarray from numpy. HOT 3
- Odd behavior when changing cell background color from (x,z,z) to (y,z,z) HOT 4
- TCOD throws a deprecation warning HOT 1
- No event on scrolling with mouse wheel HOT 4
- Request: Support for SDL2's game controller / joystick API HOT 2
- Request: Add access to the Atlas and Tileset used by SDLConsoleRender HOT 4
- Unable to print ascii 127 (del) HOT 2
- Investigate building Python-tcod on Pyodide.
- Refactoring event attributes.
- Add 'order' argument to tcod.noise.grid HOT 3
- TypeError: '_AudioCallbackUserdata' object is not callable HOT 3
- SDL_DestroyTexture called with invalid textures
- SDL failed to get a vertex buffer for this Direct3D 9 rendering batch! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-tcod.