Foreign Advisor Info Screen

Because I am making the engine do almost all the layout work, spacing changes based on how many panels are added.

Ah yes, I hadn't considered that. Fine then, because different spacing with empty rows and tall rows with only known players shown both look goofy to me. I prefer the red question marks.

That being said, how about using "Art/Leaderheads/randomleader.dds" which is defined in GlobalDefines.xml (why here? I dunno). You should be able to get the path using gc.getDefineSTRING("LEADERHEAD_RANDOM").
 
Ooh. I had forgotten about the random leader graphic. Silly of me since that was my original question mark placeholder.

This would be Option 3 with random leader graphic instead:
 
Ooh. I had forgotten about the random leader graphic. Silly of me since that was my original question mark placeholder.

I originally typed "but I can't remember where I saw it." Guess now I know. :lol:
 
More fun stuff to discuss following the initial commit.

@Dresden - The screen looks great and very clean. :goodjob: Could you do one final cleanup and set the hit test to all the text labels (headings and data) so that they don't highlight? This makes them look like they are active buttons like the tabs at the bottom of the screen.

Code:
screen.setText(name, ...)
screen.setHitTest(name, HitTestTypes.HITTEST_NOHIT)

Hmm, I wonder what the other hit test types do?

  • ON (default?)
  • SOLID
  • CHILDREN
Also, I'd love to see some icons in the trade column detailing why you have no trade (not zero, but cannot trade) with a rival: crossed swords for war, anchor if you cannot trade over sea (dunno if you can tell that), open borders as last resort as it must be a civ between you that you cannot trade through. Can't think of an icon for Mercantilism, though.

Are there any other things that stop trade?

Regarding HitTest, sure. I always thought it was weird that they would hilight; nice to see there's a way to turn that off.

As for the trade situation, here are the reasons I can think of for no trade:
  • War
  • No open borders
  • No route
    • physical limitation (e.g. you need some roads)
    • tech limitation (e.g. you need astronomy)
    • Blocked by someone else (e.g. barb city in the way)
  • Civics
    • You run mercantilism
    • They run mercantilism

War is easy to detect and put an icon for. Civics are easy to detect but aside from the actual Merc icon, I can't think of anything to use. The various No route reasons, though, I'm not sure if we can detect them.

So, what kinds of icons could we use?

War is easy enough -- the scoreboard crossed swords.
OB -- perhaps simply use the open borders icon or a modified version where it's crossed through.
Civics -- small version of merc icon? how small can we get it and have it still be identifiable?
No route -- uhh..... :dunno:
 
Yes, let's move the discussion . . . okay, done. :p

I don't think you need OB with a civ in order to have trade routes with them. Yes, war and civic are easy, and I agree it might be hard to get merc icon visible at that size.

All the various no route reasons could be displayed using the trade network icon itself, so it's showing you what you need to take care of to trade: a network, the war, the civic. Dunno that it's really necessary at this point though, I just love icons. :D

I'd say try to see how small you can make the civic icon and still see it. If that looks good there, then maybe add the other things.

Oh, it's moot actually. Say you're at war and running merc. You can't put an image and a text label in the same "cell" using that layout method, so forget this whole thing unless we can come up with a small font glyph to use for merc. That would allow you to build a single string containing icons for all the reasons for no trade.
 
Alrighty then. icon discussion tabled, let's go back to hit testing. :D

HITTEST_NOHIT seems to disable widgets as well so I'm thinking it should only be added for the headings and the trade income. The rest of the actual text I have in the body of the table is attitude-related and I've got those set to WIDGET_LEADERHEAD so they give you the diplo hover which I think works well; they also don't seem to show visible highlighting because of either the widget type or the fact that they're already colored.
 
Could the column for "Attitude" be a bit wider? Maybe 10 pixels? Because "Leader" and "Attitude" are getting very close when German is selected as language.
And: Could the titles for the civics get somehow centered over their columns? That way the abbreviations could be made slightly longer.
Would be great if this would be possible. :D
 
Because of the way that screen is setup, I have almost no control over the widths. :( I thought the titles were basically centered though; at least they appeared that way under English. I'll take a look and see if there's anything I can tweak.
 
Suggestion: Show your total domestic trade on your row for comparison to the foreign trade totals. There's probably not enough room, but you could also show the percentage of the total for each. This latter piece is should probably be on the Finance Advisor (F2) with an expanded trade section.
 
I just committed a small tweak to do the above: show your domestic trade on your info line. Also, I fixed the foreign code to also check both players for Mercantilism using isNoForeignTrade().

Spoiler Screenshot :


I considered adding the number of trade routes with each person after the value, for example "17 [6]" but figured that would be confusing. I would love to have # out of total "17 (6/18)", but there's probably not enough room for that. So I ended up adding the :commerce: symbol instead. :)
 
I considered adding the number of trade routes with each person after the value, for example "17 [6]" but figured that would be confusing. I would love to have # out of total "17 (6/18)", but there's probably not enough room for that. So I ended up adding the :commerce: symbol instead. :)

What about 2 trade columns? The first with the heading of just the arrows for the number of routes and then the second with the arrows followed by :commerce: would give the commerce amount? I think that even with five civics showing for potential favorites we can fit another column on the screen.
 
Here's what two trade columns (1 for routes, and 1 for commerce) looks like:

Spoiler :


EDIT: Actually, that does make it too wide to show 5 possible fav civics @ 1024x768. But the trade info should be much more useful more often so maybe the civic-guesser can limit itself to only 4 icons (or just deal with one of them being half-shown)

Spoiler :
 
does this mean you get 86 commerce from 13 trade routes with asoka? I like these additions.

edit: no this means that asoka gets 86 commerce by his trade routes with other players, right?
 
How about just a single Trade Network icon centered above both columns?

As for four vs. five favorite civic icons, I say leave it at five since the fifth one is visible enough to be useful. Note that I never play with Random Personalities, but I think I will for my next game just to enjoy this feature. :)

does this mean you get 86 commerce from 13 trade routes with asoka? I like these additions.

Yes, that's correct.

edit: no this means that asoka gets 86 commerce by his trade routes with other players, right?

No, that information is not normally accessible in the game unless you can investigate all of Asoka's cities.
 
How about just a single Trade Network icon centered above both columns?
If you mean this:
Code:
    ICON
COL_1  COL_2
I don't know how to (or even if we can) do that with the lazy-man layout which we're using here. But, I've committed the change so you can play with it if you like. :p
 
I thought you were manually laying out the headings. No worries, as you posted it is fine, thanks.
 
Here's what two trade columns (1 for routes, and 1 for commerce) looks like:

What about changing the second column to show only the number without gold coin (and maybe only the gold coin icon in the header)? I think it's clear enough, and it will provide a bit more space for the fifth possible fav civic
 
What about changing the second column to show only the number without gold coin (and maybe only the gold coin icon in the header)? I think it's clear enough, and it will provide a bit more space for the fifth possible fav civic

My understanding from Dresden's description of the auto-layout feature we're using is that each "column" is a fixed width (64 pixels?) as long as the item you add to it doesn't go past that. Adding the :commerce: icon didn't increase the width of the column.

I added the icon to match the rest of the civ interface: always show the units for every number.
 
Top Bottom