This object is in archive! 

Clickable LCD Areas

Gage Meawasige shared this feedback 21 months ago
Not Enough Votes

I was thinking recently that a good addition to LCD and ingame scripts would be to have a way for the engineer interact with them directly. It's fine and all to setup a hotbar with arguments that you can't see and have to remember which programmable block icon does what or set up a panel of buttons to run set arguments, but I wondered if it could be possible to have the engineer interact with the script through the LCD. Just like a touchscreen on most modern devices, a script should have some way of dynamically setting areas of the screen that the engineer can click with the cross hair. If this were to be implemented I think we'd see a lot more cooler scripts and much more immersion. If I were to implement this I'd imagine there would be a field "Intractable" in IMyTextPanel, when this is set to false the old functionality of the LCD remains (interaction box around whole block) this is for backwards compatibility. When it is true, the interaction box is disabled and would allow custom interaction areas. IMyTextSurface should have a List of "Interaction boxes" which the script could create and destroy dynamically. The "Interaction box" structure would only need to really be {Vector4 pos, bool MouseOver, bool Clicked} with a few methods. When it's clicked it could function 2 ways; 1: Run the programmable block with pre-set command (maybe another field in the interaction box structure defined by the script) or 2: Leave it up to the script to check if the area has been clicked by routine polling. Maybe another field "bool Active", so the script doesn't have to delete and re-create them (think switching menus, or a 1 time operation). I'm not sure how feasible this is, but I know that you can already have multiple interaction areas per block (button panel, shop, vending machine). I am sure that this would give scripters another great tool for creation. This might give the "keyboard" section of the programmable block an actual use. A simpler alternative would be to just allow scripts to see if and where the engineer has their cross hair in screen coords. This should probably be done through the IMyTextSurface class as well because it would be the most intuitive.

Leave a Comment
 
Attach a file