Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old September 16, 2016, 11:54   #11
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,817
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by t4nk View Post
Hm, so, for example, one "tag" (non-interactive):
https://postimg.org/image/9fnkvuzxz/
I might go with it... what do you think?
Here's the variant with COLOUR_SHADE:
https://postimg.org/image/6zt0ytish/
Yeah that's lovely! Mm-mm.
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old September 16, 2016, 12:46   #12
t4nk
Adept
 
Join Date: May 2016
Posts: 246
t4nk is on a distinguished road
So, what needs to be done:
1) Some changes to the frontend code, to display several "tabs" and listen to mouse actions on them
2) New field in term_hints (.tabs = true), so that frontend could add a bit of space for the tabs
2) Term_add_tab(int index, const char *label, bool highlight) function (if it's called several times, tabs are added one after the other, left to right)
3) Some changes to Term_mousepress() and struct mouseclick
5) Menu code should handle that in menu_handle_mouse()
6) And then the ui will be able to add highlighted (currently selected) and not highlighted tabs and handle clicks on them.

Sounds like a plan. As for keyboard controls, I think current controls for EVT_SWITCH should suffice.

Hmm, what to do with term sizes, though? Should they be resized when switching, say, between inventory and equpment? (the width of an item menu depends on the length of the longest object description, and height depends on the number of entries). Maybe they all should just have standard width? (80 chars).

edit: still not clickable:
https://postimg.org/image/52j40uk01/
edit: I completely forgot that I already have TERM_POSITION_EXACT
https://postimg.org/image/4pemowjqz/
edit: Decided to do it this way; COLOUR_SHADE is still too bright (it looks brighter in the game than in the screenshots, probably because the game is very dark, with black being by far the most used color).
https://postimg.org/image/45z5hyl7n/
If someone has more ideas (including what to do with other menus), go ahead!

Last edited by t4nk; September 16, 2016 at 16:14.
t4nk is offline   Reply With Quote
Old September 16, 2016, 19:54   #13
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,817
Donated: $40
takkaria is on a distinguished road
Quote:
Hmm, what to do with term sizes, though? Should they be resized when switching, say, between inventory and equpment? (the width of an item menu depends on the length of the longest object description, and height depends on the number of entries). Maybe they all should just have standard width? (80 chars).
I think they should resize. As long as the tabs don't move I it should feel fine.
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old September 16, 2016, 23:28   #14
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,449
Donated: $60
Nick is on a distinguished road
This thread is truly awesome. I have zero instinct when it comes to UI design, so please just keep going.

Quote:
Originally Posted by takkaria View Post
Some thoughts on spells... I think it would make sense to move away from book-centric casting, so 'm' just brings up a list of all available spells. They could be given fixed letters, removing the need to inscribe spellbooks at all. The problem is that there are too many spells to fit on the screen at once. This is one of those annoying cases where UI design and game design are really the same thing, so it's hard to imagine this working well without a reduction in the number of spells (which Nick might have on the cards?)

I guess spellcasting could be a two-pane affair, with the left list being the spellbooks and the right list being the spells in that book.
I have plans for a big reduction in spell numbers, but possibly not big enough - my first stab at it still had classes with around 30 spells.
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old September 17, 2016, 11:41   #15
t4nk
Adept
 
Join Date: May 2016
Posts: 246
t4nk is on a distinguished road
So, I remembered that there is EVT_BUTTON, which isn't used in current Angband, and is pretty much equivalent to EVT_KBRD. So it seems the easiest way to make tabs clickable is to make them act like keyboard (and not mouse) events. For example, clicking on tab "Equipment" is the same as pressing the '/' key, etc. I think that's how EVT_BUTTON is supposed to be used? Anyway, tabs do look like buttons to me...

edit: Haha, wow, that was easy. Now item menu tabs are clickable.

Last edited by t4nk; September 17, 2016 at 12:20.
t4nk is offline   Reply With Quote
Old September 17, 2016, 11:45   #16
Zireael
Adept
 
Join Date: Jul 2011
Posts: 203
Zireael is on a distinguished road
Quote:
black being by far the most used color.
This is one more reason for the UI panels background not to be black, they shouldn't be hard to pick out from the game map.
Zireael is offline   Reply With Quote
Old September 17, 2016, 11:53   #17
t4nk
Adept
 
Join Date: May 2016
Posts: 246
t4nk is on a distinguished road
Quote:
Originally Posted by Zireael View Post
This is one more reason for the UI panels background not to be black, they shouldn't be hard to pick out from the game map.
OTOH, it can be argued that the ui shouldn't be brighter than the rest of the game, so that it woudn't attract too much attention to itself (for the example of really bright ui see NPPQT - I find it completely unplayable). And, come to think of it, there are also tiles (several sets), which all use different color schemes...
t4nk is offline   Reply With Quote
Old September 17, 2016, 12:30   #18
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,817
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by t4nk View Post
So, I remembered that there is EVT_BUTTON, which isn't used in current Angband, and is pretty much equivalent to EVT_KBRD. So it seems the easiest way to make tabs clickable is to make them act like keyboard (and not mouse) events. For example, clicking on tab "Equipment" is the same as pressing the '/' key, etc. I think that's how EVT_BUTTON is supposed to be used? Anyway, tabs do look like buttons to me...

edit: Haha, wow, that was easy. Now item menu tabs are clickable.
Yeah that makes sense! Nice work I'd probably just make it EVT_KBRD instead though? EVT_BUTTON doesn't really carry any extra info like you say so it might as well just be a keyboard event.
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old September 17, 2016, 12:39   #19
t4nk
Adept
 
Join Date: May 2016
Posts: 246
t4nk is on a distinguished road
OK, next question! Angband has a sidebar, and this sidebar can be now resized. The sidebar displays various things:
  1. Race - e.g., "Human"
  2. Title - e.g., "Commando"
  3. Class
  4. Level
  5. Experience
  6. Gold
  7. Equipment chars
  8. Strength
  9. Intellect
  10. Wisdom
  11. Dexterity
  12. Constitution
  13. (empty line)
  14. Armor class
  15. Hit points
  16. Spell points
  17. (empty line)
  18. Monster hit points
  19. (empty line)
  20. Speed
  21. Depth (dungeon level)
If the sidebar is made smaller (vertically) it displays less and less stuff. Each sidebar element has associated "priority", which indicates whether the element should be displayed, or skipped if there is not enough space for everything. For example, if sidebar has only one line, it will display only constitution, since it has the highest priority (I don't know why ).
So, can anyone sort this list by priority? For example, if the sidebar has only one line, it should probably display player's hp, if it has three lines, then it should be player's hp, sp, and monster's hp. Or something like that.
Here's an example of reduced sidebar:
https://postimg.org/image/ckw3nv65t/
Angband thinks that displaying stats is pretty important and they have very high priority. Are the really so important?
Or maybe you have some other ideas about sidebar?
t4nk is offline   Reply With Quote
Old September 17, 2016, 12:42   #20
t4nk
Adept
 
Join Date: May 2016
Posts: 246
t4nk is on a distinguished road
Quote:
Originally Posted by takkaria View Post
Yeah that makes sense! Nice work I'd probably just make it EVT_KBRD instead though? EVT_BUTTON doesn't really carry any extra info like you say so it might as well just be a keyboard event.
Right, I just call Term_keypress() if they're clicked, and that makes EVT_KBRD events.
t4nk 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
Reporter wanted pav Oook! 5 January 11, 2011 15:26
Programmer wanted... buzzkill Development 10 October 3, 2009 05:03
VC++ compiler help wanted. PaulBlay Development 6 April 24, 2009 16:29
tips wanted will_asher AAR 4 February 14, 2008 23:31
[Un] Reviewers wanted andrewdoull Variants 0 November 25, 2007 05:06


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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.