Programmable Block UI Improvement

Mikhail Yevchenko shared this feedback 4 years ago
Submitted

Ingame scripts configuration done using programmable block editor to change script code constants isn't a user friendly way of using scripts. And storing ini in custom data too. Editing text configs is not just a geeky way of doing things, it's simply inconvenient. Especially when you have to copy block's CustomName to script source code five or more times. A simple solution to that problem is just letting ingame scripts define their own custom properties and actions, that will be visible like just any of the terminal block controls. Whether using C# visibility modifiers and properties, using attributes or any other means. This will allow using programmable blocks just like any other blocks that have their own actions and properties.


I'd like to be able to use script like that:


[Property("Output LCD")]

IMyTextSurface StatusDisplay;

Program() {

StatusDisplay = Me.GetSurface(0); // initialize default property value

}

[Action("Say Hello")]

void Hello() {

StatusDisplay.WriteText("Hello, World!");

}

[Action("Display Time")]

void DisplayTime() {

StatusDisplay.WriteText(DateTime.Now);

}


Where all property values will be set after object creation

Replies (1)

photo
1

In general, this would be a nice idea. But you can use the Custom Data field instead. Use your own parser or simply the INI-File parser.


The current user interface is not good enough to contain many controls. If you have too many of them, it will be difficult to find the configuration you are looking for. A nice example is the mod "Build and Repair". It's nice that you have all the parameters. But the UI is not able to display them well.

photo
2

I know about that. But using ini isn't much different. User should not be forced to edit either code or ini settings. That's a bad practice.

photo
Leave a Comment
 
Attach a file