breznak / openDS-oss

Mirror of the OpenDS.de car driving simulator
17 stars 12 forks source link

Experiment - Display info about controls, goals, etc #32

Open breznak opened 8 years ago

breznak commented 8 years ago

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)

JohnnyMarek commented 8 years ago

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

breznak commented 8 years ago

Probably this could be just:

JohnnyMarek commented 8 years ago

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.

breznak commented 8 years ago

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

JohnnyMarek commented 8 years ago

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.

breznak commented 8 years ago

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 commented 8 years ago

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

JohnnyMarek commented 8 years ago

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

breznak commented 8 years ago

@JohnnyMarek now it somewhat works.