Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Add Script IO Window

(1/1)

BlueHazzard:
Hi,
i'm planing to add a IO window for scripting purpose. The layout will be a simple wxTextCtrl, but editable from the squirrel code, so you can delete the content, or print a coloured text. Also i plan to add a Input handling, so you can call in squirrel a function like

--- Code: ---iowindow.GetString()
--- End code ---
and the window will wait for a user input in the TextCtrl, like the normal cmd... This would allow to make easily interactive scripts with menus etc.

The questions are:
* Is there a interest to add such a feature to c::b?
if yes:
* I think the source of this window should be placed in scripts/binding or?
* Should it be a modal dialogue, or a (what i would prefer) window to dock it somewhere like the script-console?
* Should the script console be modified to satisfy this requirements (but i think the script-console has complete separate tasks)

greetings

oBFusCATed:
Have you tried the global function wxGetTextFromUser?
As far as I know it does the same thing.

LETARTARE:
http://wiki.codeblocks.org/index.php?title=Scripting_commands#Global_functions

BlueHazzard:

--- Quote from: oBFusCATed on September 25, 2013, 07:18:51 pm ---Have you tried the global function wxGetTextFromUser?
As far as I know it does the same thing.

--- End quote ---
no, it asks the user for a input, with a dialog, but you can't make interactive menus (or at least not as neat as with a cmd window)

a quick and ditry example:

--- Code: ---1) Set Frequency
2) Set Fusebit
3) Set Programmer
Enter Menu Number: |

--- End code ---
and also progress-bars like in wget etc...
it is a easy and quick way to make scripts more user-friendly and interactive.

greetings

oBFusCATed:

--- Quote from: BlueHazzard on September 25, 2013, 08:44:34 pm ---a quick and ditry example:

--- End quote ---
This would have been a good user interface in a console program, but not in a GUI one.
So, I don't think I like the idea of putting such function in the core...
A better option is to provide a way to make scriptable wx XRC dialogs.
Or start porting some parts of wx to squirrel.

Navigation

[0] Message Index

Go to full version