After settling on AutoIt to do the user interface for the GUI dll, and getting everything running smoothly, I hit the age old problem of lost focus. When any dialog other that 3D Rad has focus, the game pauses until it gets mouse focus again. I thought I could live with this, but found it such a pain in the �you-know-what�, and that all the effort seemed a total waste of time.
I left the problem to work itself out somewhere in the recesses of my mind, and carried on with other more important things... While putting together some screen assets for my current game, I got to thinking about the silly focus problem again.. and decided to rather use Rad itself as an interface, and put together a plugin for the job.
So here we have it at last.. A plugin that uses 20 sliders that can simply be merged into any project, and give instant feedback. It uses the RadScriptGlobals dll which now works after ironing out all the bugs.
How it works
Merge the plugin project into the test project that you wish to use sliders with
Use the Slider test script as a template in order to set up the slider values in your own scripts
You call setupSlider(int index, float min, float max, float value, string label) function which passes the required info to the RadScriptGlobals dll. The dll is monitored by the plugin controller script, and then displays the sliders you requested.
There are 20 sliders in all, and you refer to them by index (0 to 19).
Only the sliders that you request will be displayed, and will give immediate feedback to your script via the dll
In the test script, the following is used to set up 3 sliders
setupSlider(0,0,30,15,"Frequency"); //Particles Fequency
setupSlider(1,0,5,1,"Lifetime" ); //Particles Life-Time
setupSlider(3,0,1, 0.5,"Opacity"); //TextPrint Opacity
The dll is monitored by your script, to pick up the changed values, and pass them onto whatever item it is you wish to control.. The test script use the results in the following manner.
OUT_0 = getSliderValue(0); //particles frequency
OUT_1 = getSliderValue(1); //particles lifetime
OUT_44 = getSliderValue(3); //text opacity
You can either rename the test script and modify it for your own needs, or you can delete the test script after using it's code for a reference.
Happy sliding
I left the problem to work itself out somewhere in the recesses of my mind, and carried on with other more important things... While putting together some screen assets for my current game, I got to thinking about the silly focus problem again.. and decided to rather use Rad itself as an interface, and put together a plugin for the job.
So here we have it at last.. A plugin that uses 20 sliders that can simply be merged into any project, and give instant feedback. It uses the RadScriptGlobals dll which now works after ironing out all the bugs.
How it works
Merge the plugin project into the test project that you wish to use sliders with
Use the Slider test script as a template in order to set up the slider values in your own scripts
You call setupSlider(int index, float min, float max, float value, string label) function which passes the required info to the RadScriptGlobals dll. The dll is monitored by the plugin controller script, and then displays the sliders you requested.
There are 20 sliders in all, and you refer to them by index (0 to 19).
Only the sliders that you request will be displayed, and will give immediate feedback to your script via the dll
In the test script, the following is used to set up 3 sliders
setupSlider(0,0,30,15,"Frequency"); //Particles Fequency
setupSlider(1,0,5,1,"Lifetime" ); //Particles Life-Time
setupSlider(3,0,1, 0.5,"Opacity"); //TextPrint Opacity
The dll is monitored by your script, to pick up the changed values, and pass them onto whatever item it is you wish to control.. The test script use the results in the following manner.
OUT_0 = getSliderValue(0); //particles frequency
OUT_1 = getSliderValue(1); //particles lifetime
OUT_44 = getSliderValue(3); //text opacity
You can either rename the test script and modify it for your own needs, or you can delete the test script after using it's code for a reference.
Happy sliding