I have been really impressed with what the SkyUI team and others have manager to do with the UI. I have a project that requires a much more simple custom menu to function, however I have little to no experience with the development tools they are using (Adobe Flash and Scaleform).
So, I figured I would explain in detail exactly what I am trying to do, and pray to the gaming gods someone with greater knowledge could help me set it up. I can handle all the scripting/CK implementation.
OK, so to start off with, this would basically be a custom gift menu that could be called to pop in the middle of the screen via script by calling ShowGiftMenu() on an actor with a certain name.
This gift menu would contain a centered, scrollable list of scripted "items" that the player could click on. Instead of adding the clicked item to the player's inventory however, clicking would immediately close the gift menu and run whatever script was on that item. This would be accomplished with a BlockActivation() in an OnInit() event in the script for each item, followed by an OnActivate() event that would handle executing the script.
I have put together a generic example of what I would like the menu to look like:
http://www.iparadigm.org/wp-content/gallery/testing/menuopt.jpg
As you can see, I want to keep it as simple as possible.
- No category browser: The list should default to showing all item types.
- Sortable by name only.
- No icons since the menu is type independent.
- Scrollable if the list is long enough to require it.
The size of the list could be a bit larger/smaller, however this is the general idea. It is basically intended as a fully scriptable menu alternative.
How it would work in the CK:
Users would create a hidden Actor, and a set of items with all the names of the menu options they would like to see when activating this custom menu script. They would then add these items to their custom actor in the CK. Alternately, it would be possible to dynamically add/remove items from the list using AddItem() and RemoveItem() on this hidden actor via script.
As outlined, clicking an item ignores normal activation, so the item is not removed nor added to the player's inventory. Instead, this custom menu immediately closes and runs whatever is in the OnActivate() event for that item.
EDIT: I would also like a "Cancel" option to appear on the lower right that would close the custom menu. Users could detect this in their script using an if IsInMenuMode() -> return type function upon calling the custom menu, then proceeding with an exit routine once the menu was closed.
This loop could also check for the status of a variable, to detect whether the menu was exited by clicking cancel or by clicking an item. So, the user would set this global/property variable to 1 in the OnActivate() script run on each of their menu items, so clicking cancel would leave it at 0, allowing the user's script to differentiate and take different paths based on that detection.
EDIT EDIT: Updated the sample screen to show the cancel button. I realize it's rough; I couldn't find a font that really matched the SkyUI's default! XD
EDIT EDIT EDIT: Perhaps it would be best to leave "name" off the sorter, since people might use the menu for things that would not seem appropriate to that designation... Just having the icon there would probably be enough. Or what would be REALLY epic is if there were some way to pass a string to the custom menu through text replacement, though I'm not sure how that would work since there's only certain things that accept stored data from a quest alias.
My knowledge is limited however, as I said. Perhaps having an alias to a persistent hidden reference with whatever name a user wanted to appear on the top would be enough, and the code could call a fake menu or something to grab it? That's getting a little fancy though.