Page 1 of 1

Custom GUI

Posted: Wed Oct 02, 2013 4:14 pm
by Nirahiel
Hi,
i'm not sure if it's possible to do so, so I post it in interface request, please move to help if it's already possible.

I'd like to create an entity that does nothing, but have a custom right click GUI that can let an user type something in a box, and then press OK.
I need to be able to specify the length of the text typed in, either total length, or total length per line, and amount of lines.

Also I want that when the user places his cursor on this entity, the custom text is displayed in the tooltip (right of the screen).

Thanks !

Re: Custom GUI

Posted: Wed Oct 02, 2013 7:13 pm
by ficolas
Creating GUIs is possible, creating GUIs when clicking an entity is not (I have alredy asked for it tho :3) What I have done for my mod, is opening a GUI when placing a placeable-off-grid entity with no colision on an entity.
I hope this comes soon :3 but I dont think it will (soon)

Re: Custom GUI

Posted: Wed Oct 02, 2013 7:18 pm
by Nirahiel
Can I make it open a custom GUI when the entity is placed then ?
And then update the entity afterwards ?

Re: Custom GUI

Posted: Wed Oct 02, 2013 10:19 pm
by n9103
The first part seems entirely feasible, since the first lab you place in a game triggers the research GUI.
Couldn't really tell you either way about the 2nd part, as I'm not that familiar with the lab-research interactions, however, it seems that that method could apply to the 2nd part, as the labs have *some* interaction with the research GUI. I'm just not sure how, or if it's even a direct or indirect interaction.