#1, by SubbThursday, 05. February 2015, 17:42 9 years ago
For some of our items in the inventory we'd like to have close-up views that pop up on the screen if you execute "look at" on the item, i.e. a close-up of a book page.
Because the close-up must be visible on every screen, they can't be added as scene objects (I assume there is no way to show a scene object of one scene in another) So my only idea was to implement the close-up as additional button directly in the inventory interface.
To make it more complex we also want to interact with the close-up, for example to read a specific text in the book or to get information about a specific property of the item. So I added more buttons above the "close-up button" with button type "action area".
You can imagine that the interface in the editor will become very confusing and complex with such a number of buttons. Moreover, I see some limitations: - The cursor is always in its active state (other color), as there is always a button underneath. But I want that the cursor is only active if you move over specific objects of the close-up (i.e. the pictures in the screenshot). - I find no way to include object names that appear next to the cursor when moving over action areas (similar to scene objects). - Hiding the close-up without closing the whole inventory is kind of tricky, but manageable.
Does anybody of you guys already thought about this functionality or has a more elegant idea to realize it? I also thought about creating one extra interface for each item, but that doesn't really solve the problem.
#2, by afrlmeThursday, 05. February 2015, 18:23 9 years ago
You can actually create more interfaces than what is available by default, so you could actually create a unique interface per close-up item.
Use the explorer tool to create new interface classes. Or at least use a different interface for all the item close-ups than you inventory interface & then use conditions to determine which objects / object areas should be active.
#5, by afrlmeThursday, 05. February 2015, 23:27 9 years ago
@ Akcay: Depends on what sort of style you are going for I guess. If you wanted to layer something over the current scene in say a polaroid shot style, then probably interface. If you just want to zoom in fully to a specific area then probably best to create a separate scene.
@ Subb: Interfaces should also allow for action text. It seems only names for command buttons can be set for interfaces; however with the registerHookFunction along with getActionText & a bit of Lua magic, I believe you could probably work around this.
My solution would probably be to write a function that lets me update a global Lua variable which would need to be updated manually in a mouse enter action part for each object of the interface. This in turn would be used in conjunction with the hook function to display the text at the side of the mouse.
I wonder why the name section is disabled when interface button is not a command. Surely it makes sense to allow the name for buttons set to action area too? I'll make a note of it on the dev team tracker.
#6, by SubbFriday, 06. February 2015, 00:18 9 years ago
Thanks for bringing it up. In the meantime I will try to find out how the HookFunction works.
@Akcay: It is like AFRLme says. I want to show the close-up as a layer in the current scene (meaning the current scene is still visible in the background). So I can't just use a seperate scene for the close-up.