Space Engineers

Space Engineers

445 ratings
TouchScreenAPI
17
7
7
2
4
2
5
4
2
3
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Block, Script, Other
File Size
Posted
Updated
835.361 KB
29 Nov, 2021 @ 9:33pm
21 Jan @ 12:15pm
22 Change Notes ( view )

Subscribe to download
TouchScreenAPI

In 1 collection by Adriano
Adriano's Space Engineers Mods
6 items
Description


TouchScreenAPI
This mod adds Touch Screen feature and UI Elements to Space Engineers. It is a framework for other mods and programmable block scripts.

It allows modders to add interaction with in game LCD screens like a mouse cursor or touch screen. By itself this mod adds nothing to the game. See a list of Touch Apps by the end of this description.

If you are a player and liked this mod. Feel free to give your feedback and ideas.
But please remember, this mod has no features with the game blocks besides drawing to screens. Any interaction with blocks are handled by mods using this.

How to use it
If you want to develop a mod or script using this, feel free to send me a message on Github[github.com], Steam or Discord (@adrianolima).
For details about using it, see the project readme files on Github[github.com].

The API is ready for use, but feedback is always welcome. Also, communicate with me if you're using it, if I need to make an important change I can let you know you in advance.

Mouse clicks and Joystick
It now accepts Left click as primary action button, some apps may have separated funcionalities for Right click and Middle click as well.
On joysticks use RB for primary and LB to reproduce right click action. For middle click action press both RB and LB.

Ui Kit - Elements
The Ui Kit is a decent library of common UI elements, there are more elements planned.
It is completely optional, the Touch features can be imported and used separated from the UI elements if the mod only needs the cursor feature.
  • TouchApp - It is the main element, control draw loops, updates and dispose.
  • Button - A simple button with a text label. There is an empty version of it that can have icons as children.
  • Chart - Line charts on a grid, can have multiple lines.
  • Checkbox - Simple checkbox.
  • Label - Text Label, one of the simplest elements.
  • ProgressBar - Progress bar, have a vertical option, also optional label.
  • Selector - Multi options selector.
  • Slider - A slider witha draggable thumb.
  • SliderRange - Another slide, but for a range value, has two thumbs.
  • Switch - A multi options switcher, can be used like tabs for a panel.
  • TextField - Text input field, editable with keyboard. One of the most complex elements.
  • View - The major container, has properties like margin, padding, border, alignmet, etc.
  • ScrollView - Like a view, but with scroll, automatically hide children out of bounds.
  • WindowBar - Useful for app names and buttons for options at the top of a window.
  • EmptyElement - Useful for adding custom MySprites to the App's hierarchy.

Ui Kit - Styling
Every component have some properties to change their visuals, they're inspired and works like html+css elements. May looks pretty straight forward if you're familiar with website development.
The most importants are these, for a complete list and documentation see the project github page:
  • Enabled - If false, the element will not be drawn.
  • Absolute - If true, the element will not align and anchor with the parent.
  • Flex - The ratio of the parent that this element should fill.
  • Pixels - Fixed size in pixels, not related to parent.
  • Margin - Margin value for spacing elements on the four sides.
  • Padding - Padding value for inner spacing of an element on the four sides.
  • Border - Border value for an element. It is colored by BorderColor property.
  • Anchor - Position of the children on the same axis of the Direction. Like start, center, end, etc.
  • Alignment - The aligment of children on the crossed axis of the Direction
  • Direction - The direction the elements will line, like Column and Row. Can be reversed.
  • Gap - Adds a spacing between children. Better than adding margin to each child.
  • BgColor - Background color.

LCD Screens
It automatically works for all current screens in vanilla game and DLCs, including cockpits and both large grid and small grid. But it also works for custom modded LCD blocks with a quick setup using Screen Calibration TSS.
There is also an API for adding and removing screen coordinates with code, see github page for details.

Touch Apps



- "If I have seen further it is by standing on the shoulders of Giants."

Thanks for all the support at Keen's Discord #modding-programming channel, this community is amazing! ❤️ Digi, Malware, enenra, Draygo, Klime, Gwindalmir and many others.
Popular Discussions View All (1)
20
4 Jul, 2023 @ 3:57am
PINNED: Share your ideas of Touch Apps
Adriano
97 Comments
Adriano  [author] 19 Feb @ 3:06am 
@zeroGhost hey, unfortunately the TSSs need some server side logic to run, so it is not possible using the plugin loader that just insert mods locally. I tried that when I first release them.
Thanks for the kind words.
zeroGhost 19 Feb @ 2:09am 
hey Adriano, this is genius work your doing here .. i wish SE was bigger community to be more properly appreciated .. at this point servers are not even willing to run mods that really make the game function ..like this one.. i am forced to use SE plugin Loader to sideload mods ...were my question comes from .. is this and its DAPPS possible to be tweaked to work client side in the SE plugin loader
Adriano  [author] 18 Feb @ 2:20pm 
@Rastlore30 Hey, thanks <3 About disabling subgrids, that is not possible currently but it may be something I can add in the future. Good idea! I added to my notes and will try to include it on next round of updates :steamthumbsup:
Rastlore30 18 Feb @ 2:03pm 
Hiya Adriano! Just wanted to drop a line and say thank you for fixing the Button Pad API to work with blueprints and for your hard work in keeping us all happy despite our flood of requests and operator level bug reports :steamhappy:

That said I do have a question or perhaps a feature request. Is there a way to disable the Electric Network from reading subgrids? And if there is not could that be something that could be worked in at some point in the future?
EthicalObligation 24 Nov, 2023 @ 3:44am 
Would love to see more of this!!
Brycey92 2 Oct, 2023 @ 4:08pm 
I think this causes all text displays to display blackness or turn off. I removed the mod and they started working again.
Adriano  [author] 11 Jul, 2023 @ 7:34pm 
@Anitram @CommanderChet Sorry for the dela, I was on vacation until last weekend. I updated the examples repo with latest api. Ping me on Discord for more details if needed.
CommanderChet 11 Jul, 2023 @ 5:48pm 
I ran into the same issue as Anitram.
The error itself is "The type or namespace name 'FancyCursor' could not be found" originating from TouchSampleTSS.cs
Adriano  [author] 20 Jun, 2023 @ 1:07pm 
@Anitram Hey, nice to see that you are interested. I will take some time to take a look on the examples.. but feel free to ping me on Discord for more info.
My new tag there is @adrianolima.
Anitram 20 Jun, 2023 @ 1:51am 
I forgot, when I put the example you have on github it gives me errors and I don't know how to solve them