openDS-oss
openDS-oss copied to clipboard
Experiment - Display info about controls, goals, etc
In our Distraction experiment
display an "info screen" with controls (arrows, goals -eg. "collect the colored ball according to the instruction", "you can drive anywhere in the city" etc)
I probably forgot to upload the function to show this. will be there tonight.
Probably this could be just:
- settings "Show instructions on start" (default on) in Task menu #36
- use the "on-screen overlay"/textbox (as you already do in some distractor) to show the text on start.
- or I event think other experiments have that: that a text/info is shown on start. So just copy that
What i have implemented is very similar, There is that "instructions" button. After a click appears a big text window with the instructions. First i will upload it and after your approval i will make this to be default options by adding a checkbox to the original task selection which will tell if the screen will be shown by default or not.
..That sounds good. Btw, are you using "your own" text window, or the OpenDS text-overlay? (might be interesting to investigate the use of the ods' version)
What they do is write lot of labels on a panel and create text like that (lot of xml editing). What i do is make listBox element and fill it with text automatically from a file.
like that (lot of xml editing). What i do is make listBox element and fill it with text automatically from a file.
Ok, yours is better! :+1: Then I'd suggest refactoring what we have in TextDistractionController
and make it useful also for #23 :
package cz.cvut.utils;
enum EXIT_STATEGY = {CONFIRM, TIMEOUT, TEXT_INPUT} // will add handler& show for OK button/ timeout in milli sec/ text-form
class OnScreenWindow(int width, height, exitStrategy, buttonText="OK", timeoutMs=2000, answerString=null);
void show(); //will guess optimal values
void show(int posX, posY);
class TextShow(String message) : OnScreenWindow; //takes text to display in constructor, computes optimal sizes w&h
class FileShow(String pathToFile): TextShow //reads content from TXT file
class ImageShow(String pathToImage): OnScreenWindow //shows image
(later we'll implement playSound and rewards are almost done! ;) )
@JohnnyMarek The instructions still don;t show up, the button seems to do nothing, game compiles and runs. No new err message..
I forgot to send updated GUI xml... sorry :( Pushed in now
@JohnnyMarek now it somewhat works.
- the info screen with buttons shows up OK
- there is no text shown in the text box
- the default button no longer works!
- it seems you add/and mix
eu.opends.niftyGui.DistractionTaskController
but we already have and should usecz.cvut.cognitive.override.DistractionTaskController
, please review the difference and apply your changes to the one inoverride
, remove the file inniftyGui
, modify XML accordingly...