Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Displaying text  (Read 394 times)

Silverionmox

  • Bay Watcher
    • View Profile
Displaying text
« on: June 20, 2010, 05:15:48 am »

AFA the interface goes, it might be a better strategy to implement a better way to display text than graphics tiles, so it can be avoided afterwards. Specifically, there could be a text field that displays ordinary text (with size, fonts, etc.) for the menus, trade screen, descriptions etc. That way, more menu options can be added, functional text can be added as needed as the game progresses without space problems or without having to do an intensive cramming exercise (for example the new military screens are particularly bad in that regard) for every new feature.

Logged
Dwarf Fortress cured my savescumming.

robolee

  • Bay Watcher
    • View Profile
Re: Displaying text
« Reply #1 on: June 20, 2010, 08:39:51 am »

basically what you mean is variable width fonts which has been discussed in this thread: http://www.bay12forums.com/smf/index.php?topic=34949.msg1325705#msg1325705. Unless what you mean is something like this: http://genodeen.net/files/dfterm2/screenshots/dfterm2_remmon_screenshot.png (which I believe is avaliable in mac/linux, as "PRINT_MODE:TEXT" but not windows :( -why? ).

I think it will be pretty essential for an interface overhaul, but there will need to be some way to integrate it into the grid system (making the font height that of the tile height, maintain text within the menu boundries etc.).
« Last Edit: June 20, 2010, 04:01:48 pm by robolee »
Logged

Wyrm

  • Bay Watcher
    • View Profile
Re: Displaying text
« Reply #2 on: June 20, 2010, 02:25:44 pm »

This can be done with OOP: you have one class of object able to display variable-width text for ordinary text, and you have another class that displays fixed-width for graphical views. The rest of the program doesn't need to care (and in proper OOP, should not care) in the slightest how the information given to each kind of object is presented to the user — all it needs to know is that the information will be correctly presented. You can replace the fixed-width text display objects with true graphics display objects and the program will not know or care because the interface is identical.
Logged