Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old March 15, 2012, 12:17   #1
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,965
Donated: $60
Nick will become famous soon enough
UTF8 and the visual menu

I've been looking at how to make the visuals menu (in the knowledge menus) play nicely with UTF8, and I think I know technically what to do. However, it seems to me that that's the wrong thing to do.

The visuals menu was all fine when you were dealing with 128 (or with xchars, 256) possible glyphs for a monster/object/feature, but with UTF8 there are thousands to choose from. So it seems to me that once all the front ends have moved to UTF8, the visual menu will really be kind of useless - except maybe for changing colours. A shame, but there it is.

Opinions?
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old March 15, 2012, 16:37   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,002
Derakon is on a distinguished road
Seems like you should be able to know which symbols are actually used by the game and only display those. Perhaps put a hook into the file loaders to add all 'G' lines to a structure that tracks used characters. Deciding on the size of that structure would be tricky; optimally there'd be an entry for every possible character but there's over a million of those and 99+% would go unused. I guess you could add it to limits.txt.
Derakon is offline   Reply With Quote
Old March 15, 2012, 16:56   #3
ekolis
Knight
 
ekolis's Avatar
 
Join Date: Apr 2007
Location: Cincinnati, OH, USA
Age: 36
Posts: 911
ekolis is on a distinguished road
Send a message via AIM to ekolis Send a message via MSN to ekolis Send a message via Yahoo to ekolis
But isn't the point of the menu to CHANGE the symbols? Why would you want to limit it to only those that are already being used?

I think another possibility might be to let the user type in the Unicode hex code for the symbol he wants to use; he can always look it up in an external location such as charmap.exe on Windows, or the Unicode spec online...
__________________
You read the scroll labeled NOBIMUS UPSCOTI...
You are surrounded by a stasis field!
The tengu tries to teleport, but fails!
ekolis is offline   Reply With Quote
Old March 15, 2012, 17:20   #4
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,002
Derakon is on a distinguished road
I was thinking specifically about the use case where you want to find a glyph that is currently in use. I agree that letting the user write in the hex value for the glyph they want would be a good idea as far as selecting new glyphs is concerned. Writing our own glyph browser seems excessive when there are plenty of resources online to accomplish the same goal with a much less limited UI.
Derakon is offline   Reply With Quote
Old March 15, 2012, 20:35   #5
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Quote:
Originally Posted by Nick View Post
I've been looking at how to make the visuals menu (in the knowledge menus) play nicely with UTF8, and I think I know technically what to do. However, it seems to me that that's the wrong thing to do.

The visuals menu was all fine when you were dealing with 128 (or with xchars, 256) possible glyphs for a monster/object/feature, but with UTF8 there are thousands to choose from. So it seems to me that once all the front ends have moved to UTF8, the visual menu will really be kind of useless - except maybe for changing colours. A shame, but there it is.

Opinions?
For the symbol, instead of displaying all of the possible characters and let them scroll, just ask them to enter the new character as a prompt?
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old March 17, 2012, 10:14   #6
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,965
Donated: $60
Nick will become famous soon enough
Thanks to everyone for the replies (here and #angband-dev). Plan is:
  1. For ascii utf8, you can choose colour from displayed options, and enter unicode symbols as U+xxxx, where the x's are hex digits (this is the format unicode is most commonly shown in if you look up a table)
  2. For tiles, the existing visual tile picker
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Studio 2010 Express, help for the newbie? Chud Development 12 June 14, 2013 23:40
NPP crash bug under Visual C++ debug compile Antoine Development 13 February 19, 2011 23:18
Native depth visual spoiler fph Vanilla 9 August 4, 2010 19:34
Question: Angband magic visual effects? Darksshades Vanilla 7 May 11, 2010 04:35
Getting Visual C++ 2008 Express Edition to compile Angband 3.0.9 Orillian Vanilla 5 February 10, 2008 10:23


All times are GMT +1. The time now is 21:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.