openDS-oss icon indicating copy to clipboard operation
openDS-oss copied to clipboard

Experiment - Display info about controls, goals, etc

Open breznak opened this issue 8 years ago • 9 comments

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)

breznak avatar Jun 08 '16 12:06 breznak

I probably forgot to upload the function to show this. will be there tonight.

JohnnyMarek avatar Oct 13 '16 09:10 JohnnyMarek

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

breznak avatar Oct 13 '16 10:10 breznak

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.

JohnnyMarek avatar Oct 13 '16 10:10 JohnnyMarek

..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)

breznak avatar Oct 13 '16 11:10 breznak

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.

JohnnyMarek avatar Oct 13 '16 11:10 JohnnyMarek

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! ;) )

breznak avatar Oct 13 '16 12:10 breznak

@JohnnyMarek The instructions still don;t show up, the button seems to do nothing, game compiles and runs. No new err message..

breznak avatar Oct 18 '16 23:10 breznak

I forgot to send updated GUI xml... sorry :( Pushed in now

JohnnyMarek avatar Oct 19 '16 00:10 JohnnyMarek

@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 use cz.cvut.cognitive.override.DistractionTaskController, please review the difference and apply your changes to the one in override, remove the file in niftyGui, modify XML accordingly...

breznak avatar Oct 19 '16 00:10 breznak