Skip to content
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

Expose unit pick dialog to Lua as a simple API call #8829

Open
CelticMinstrel opened this issue May 1, 2024 · 6 comments
Open

Expose unit pick dialog to Lua as a simple API call #8829

CelticMinstrel opened this issue May 1, 2024 · 6 comments
Labels
Campaign SotA The mainline Secrets of the Ancients campaign Enhancement Issues that are requests for new features or changes to existing ones. Lua API Issues with the Lua engine and API. UI User interface issues, including both back-end and front-end issues.

Comments

@CelticMinstrel
Copy link
Member

This refers to the recruit, recall, and debug unit create dialogs – I believe it would make sense to merge them into single dialog that supports various options to tweak it into being identical to any of the current dialogs. If it turns out I'm wrong, however, the main thing would be to expose the recruit dialog, so that SotA can handle its corpse recruits in a more reasonable manner (and automatically get all the features of the recruit dialog, like filtering).

@CelticMinstrel CelticMinstrel added Enhancement Issues that are requests for new features or changes to existing ones. UI User interface issues, including both back-end and front-end issues. Lua API Issues with the Lua engine and API. Campaign SotA The mainline Secrets of the Ancients campaign labels May 1, 2024
@babaissarkar
Copy link
Contributor

If we're consolidating those dialogs, I'd suggest the following two things :

  1. It should deal with streamlining recall/recruit of multiple units (GNA #5007) #1059
  2. Putting something as important as Recruit/Recall into a right click context menu doesn't feel good. One idea would be to show the recruit/recall when mouse hovers on top of a castle tile while the leader is in the keep. Haven't thought this in detail, but it'd atleast save a lot of clicks and make it obvious. (I've even thought of a design, might post that later.)

@CelticMinstrel
Copy link
Member Author

CelticMinstrel commented May 1, 2024

One idea would be to show the recruit/recall when mouse hovers on top of a castle tile while the leader is in the keep.

I'm not entirely sure what you mean by this, but I think it should be obvious that opening a modal dialog in response to a mouse hover is a very bad idea. Maybe that's not what you meant though.

Also, I'm not quite sure but it sounds like your point 2 is likely out of scope for this issue.

@gfgtdf
Copy link
Contributor

gfgtdf commented May 1, 2024

the main thing would be to expose the recruit dialog, so that SotA can handle its corpse recruits in a more reasonable manner

If thats what you want to do, you'd need to first add a way for lua to hook in before the original dialog is shown (to be replaced with your custom one), which is imo the more complicated part

@CelticMinstrel
Copy link
Member Author

which is imo the more complicated part

What's complicated about that, exactly…? Just find the place that currently calls the dialog and do something else instead, right?

Not entirely sure that's actually necessary though.

@babaissarkar
Copy link
Contributor

babaissarkar commented May 1, 2024

I'm not entirely sure what you mean by this, but I think it should be obvious that opening a modal dialog in response to a mouse hover is a very bad idea. Maybe that's not what you meant though.

That's right. Is it possible with a modeless dialog (assuming we can get it working)?

Also, I'm not quite sure but it sounds like your point 2 is likely out of scope for this issue.

Could be, perhaps there should be another issue on consolidating the three dialogs the you mentioned?

@CelticMinstrel
Copy link
Member Author

Is it possible with a modeless dialog (assuming we can get it working)?

Maybe, but that sounds like a strange way to do it…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Campaign SotA The mainline Secrets of the Ancients campaign Enhancement Issues that are requests for new features or changes to existing ones. Lua API Issues with the Lua engine and API. UI User interface issues, including both back-end and front-end issues.
Projects
None yet
Development

No branches or pull requests

3 participants