New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip Descriptions #14453

Closed
MustaphaTR opened this Issue Nov 29, 2017 · 10 comments

Comments

Projects
None yet
7 participants
@MustaphaTR
Member

MustaphaTR commented Nov 29, 2017

In Generals when hovered over, tech buildings show what they do too, after their name. IMO it would be cool for our mods too.

resim
This is how they look on Generals (i guess it is a part of the name), but i think it would be better if we had a sepeare Description: field, that works similar to one in Production Menu, but for units in the field.

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Nov 29, 2017

Member

We have an IProvideTooltipInfo interface that lets traits add extra info to a tooltip. It should be easy to make a new trait for this purpose.

Member

pchote commented Nov 29, 2017

We have an IProvideTooltipInfo interface that lets traits add extra info to a tooltip. It should be easy to make a new trait for this purpose.

@penev92 penev92 added the Easy label Nov 29, 2017

@xecollons

This comment has been minimized.

Show comment
Hide comment
@xecollons

xecollons Mar 1, 2018

Contributor

Is this issue still ongoing?

I have been following the project for certain time, and after diving into the code, I think this is a good issue to try to contribute a bit for the first time.

Contributor

xecollons commented Mar 1, 2018

Is this issue still ongoing?

I have been following the project for certain time, and after diving into the code, I think this is a good issue to try to contribute a bit for the first time.

@abcdefg30

This comment has been minimized.

Show comment
Hide comment
@abcdefg30

abcdefg30 Mar 2, 2018

Member

Yes, feel free to work on this. If you have any further questions be sure to contact us here or on IRC (#openra). :)

Member

abcdefg30 commented Mar 2, 2018

Yes, feel free to work on this. If you have any further questions be sure to contact us here or on IRC (#openra). :)

@xecollons

This comment has been minimized.

Show comment
Hide comment
@xecollons

xecollons Mar 3, 2018

Contributor

In fact, I do have some questions, if you don't mind:
-I had thought about two approaches to implement this. The one suggested in this thread, approach that I have already implemented and it's working fine, it's quite trivial using the IProvideTooltipInfo interface:
openra_fieldtooltip
Or adding the "FieldDescription" as a new property for the Tooltip class directly. I prefer the first approach since is less intrusive(and also I don't want to change any -more or less- basic class in my first commit), but the second can more intuitive("ok, I have a tooltip that have a Name and can have a FieldDescription), and could be useful when using the DisguiseTooltip. What do you think?

-Also, since I didn't play Generals, I don't know exactly which logic this tooltip have. Do enemies see this support tooltip? Do allies also see it? Because a "Capture this building" message, for example, doesn't have sense for the owner of the building or his allies.
So, now my structure for this in a yaml is like:
FieldDescriptionTooltip:
-Description: Capture these barracks to KILL

And I'm thinking of changing it to something like:
FieldDescriptionTooltip:
-AllyDescription: You love the barracks
-EnemyDescription: Capture these barracks to KILL

Being AllyDescription and EnemyDescription nullable, of course.
Am I over-engineering? It's my first commit, so I want it to be OK 😋

Contributor

xecollons commented Mar 3, 2018

In fact, I do have some questions, if you don't mind:
-I had thought about two approaches to implement this. The one suggested in this thread, approach that I have already implemented and it's working fine, it's quite trivial using the IProvideTooltipInfo interface:
openra_fieldtooltip
Or adding the "FieldDescription" as a new property for the Tooltip class directly. I prefer the first approach since is less intrusive(and also I don't want to change any -more or less- basic class in my first commit), but the second can more intuitive("ok, I have a tooltip that have a Name and can have a FieldDescription), and could be useful when using the DisguiseTooltip. What do you think?

-Also, since I didn't play Generals, I don't know exactly which logic this tooltip have. Do enemies see this support tooltip? Do allies also see it? Because a "Capture this building" message, for example, doesn't have sense for the owner of the building or his allies.
So, now my structure for this in a yaml is like:
FieldDescriptionTooltip:
-Description: Capture these barracks to KILL

And I'm thinking of changing it to something like:
FieldDescriptionTooltip:
-AllyDescription: You love the barracks
-EnemyDescription: Capture these barracks to KILL

Being AllyDescription and EnemyDescription nullable, of course.
Am I over-engineering? It's my first commit, so I want it to be OK 😋

@GraionDilach

This comment has been minimized.

Show comment
Hide comment
@GraionDilach

GraionDilach Mar 3, 2018

Contributor

The tooltip descriptions were stance-unaware in Generals. The point of tooltip descs over there was to describe tech buildings, since those have no visible description otherwise. Adding such to Barracks/whatnot sounds weird to me - unless they are mission-specific objective hints.

Contributor

GraionDilach commented Mar 3, 2018

The tooltip descriptions were stance-unaware in Generals. The point of tooltip descs over there was to describe tech buildings, since those have no visible description otherwise. Adding such to Barracks/whatnot sounds weird to me - unless they are mission-specific objective hints.

@xecollons

This comment has been minimized.

Show comment
Hide comment
@xecollons

xecollons Mar 3, 2018

Contributor

The barracks thing is just an example, a random building I chose just to try it.

Same as putting the FieldDescription to the barracks, you can use it to provide a description to any other building(or not). If you want to provide a fielddescription only in (certain) tech buildings, you can.

If you are implying that this shouldn't be generic for any type of unit or structure and should be specific for tech buildings, I can do that as well, that's no problem.

Contributor

xecollons commented Mar 3, 2018

The barracks thing is just an example, a random building I chose just to try it.

Same as putting the FieldDescription to the barracks, you can use it to provide a description to any other building(or not). If you want to provide a fielddescription only in (certain) tech buildings, you can.

If you are implying that this shouldn't be generic for any type of unit or structure and should be specific for tech buildings, I can do that as well, that's no problem.

@abcdefg30

This comment has been minimized.

Show comment
Hide comment
@abcdefg30

abcdefg30 Mar 5, 2018

Member

What do you think?

Using the IProvideTooltipInfo interface as you already did seems fine.

Do enemies see this support tooltip? Do allies also see it?

Having AllyDescription and EnemyDescription fields sound good to me. They won't hurt and open possibilities for missions, as already remarked.

Member

abcdefg30 commented Mar 5, 2018

What do you think?

Using the IProvideTooltipInfo interface as you already did seems fine.

Do enemies see this support tooltip? Do allies also see it?

Having AllyDescription and EnemyDescription fields sound good to me. They won't hurt and open possibilities for missions, as already remarked.

@GraionDilach

This comment has been minimized.

Show comment
Hide comment
@GraionDilach

GraionDilach Mar 6, 2018

Contributor

The problem would be with neutral stuff in that case tbh.

Contributor

GraionDilach commented Mar 6, 2018

The problem would be with neutral stuff in that case tbh.

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Mar 6, 2018

Member

A single description that is shown to everyone would be much simpler. I don't see any need to over-complicate this, especially when we don't have a use case for separating descriptions based on stance.

Member

pchote commented Mar 6, 2018

A single description that is shown to everyone would be much simpler. I don't see any need to over-complicate this, especially when we don't have a use case for separating descriptions based on stance.

@Smittytron

This comment has been minimized.

Show comment
Hide comment
@Smittytron

Smittytron Apr 9, 2018

Contributor

I thought about adding this to RA now that TooltipDescription is available. I'm not quite sure what would go well with the zombie/ant granting biological lab. Perhaps; 'Capture to gain access to biological weapons!'

What I'd put with other buildings:
Oil Derrick - Capture to receive steady trickle of funds
Hospital - Provides gradual healing to infantry of owner
Forward Command - Provides small construction radius to owner
Communitcations Center - Capture to reveal a large area around this structure

Contributor

Smittytron commented Apr 9, 2018

I thought about adding this to RA now that TooltipDescription is available. I'm not quite sure what would go well with the zombie/ant granting biological lab. Perhaps; 'Capture to gain access to biological weapons!'

What I'd put with other buildings:
Oil Derrick - Capture to receive steady trickle of funds
Hospital - Provides gradual healing to infantry of owner
Forward Command - Provides small construction radius to owner
Communitcations Center - Capture to reveal a large area around this structure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment