[Suggest] Script settings in GUI

1 reply [Last post]
Spacey
User offline. Last seen 8 years 35 weeks ago. Offline
Joined: 2012-03-14
Posts: 2

Hi folks,

I would suggest to add a function to the LUA API which can be used to expose variables to the GUI.

For example if mikade added something like the following commands to his script WxW:

exposeGUI(wTouched, [0, 2] ,"Walls required")
exposeGUI(requireSurfer, [true, false], "Surf before crate")
exposeGUI(AFR, [true, false], "Attack from rope")
exposeGUI(allowCrazyWeps, [true, false], "Super weapons")

The resulting GUI looked like this:

Instead of the old hackish way:

Feel free to share your own thoughts.

Peace

~Spacey

PS: These preferences could also be shared with the new "Script Parameter" option in development build to enable users to save their choice in a scheme.

Vatten
Vatten's picture
User offline. Last seen 1 year 33 weeks ago. Offline
Joined: 2009-09-02
Posts: 48

Me likes, thumbs up!

If the parameters are added to the .cfg file like->

parameter "set bounce" 0-999
parameter "other parameter" string
parameter "boolean example" 0-1

then the params set in the gui will modify the script parameters.

This is just an idea on how to implement this.

Vattenania, my beloved motherland, my beloved homeland! You are always with me in my thoughts and in my heart!

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]