Creating user interface for ZORK style game in MATLAB - matlab

I'm trying to use MATLAB to create a stand-alone application for an interactive fiction game (where the player is presented with a text prompt and responds by entering text, e.g. "You are being choked by a creepy squid. >> " "Stab squid" "The squid dies, leaving behind an inky pile of gold. >>" etc.).
When I compile the game and install it, everything works smoothly, but there's nowhere for the game's prompts to appear, and nowhere for the user to type in responses.
Who has a good solution for this? Do I use a GUI with text boxes, or is there a way just to have a text scroll with user inputs like this? The latter would be preferable.
Thanks!

Related

Delaying speech and text between Scenes

I have both a speech and text Prompt in a Scene and in the Scene that is transitioned to. The separate speech prompts are spoken with just a brief break between them. The text prompts are displayed as sentences in the same paragraph. Ideally, I would like a pause between the speech prompts, and a new paragraph between the text prompts.
How might I do this?
Scenes represent logical separations - not necessarily discrete UX elements. Each scene can put one or more prompts into the prompt queues (there are multiple queues - more on that in a moment). They're taking out of each queue in the order they were put in, unless you clear the queue before you add another item. However - the system treats all of the prompts in the queue as building towards a single reply. So there is no automatic way to visually or audibly separate them.
However, there are a couple of tricks you can use, with caveats.
Audibly, you can add a brief pause using the SSML break tag. So you might set your On Entry "speech" prompt response to something like:
<break time="250ms"/> Welcome to another scene.
However, splitting the response visually is more difficult. There is no formatting allowed in the text response. There are a couple of tricks you may be able to try, however, but they're not guaranteed to work on all visual displays.
The easiest might be to send the first part of your response as a firstSimple prompt, and the second part in a lastSimple prompt. Typically you'd use the first to give results from what the user might have just done, and the last to prompt them for further action, but they may be rendered as separate "bubbles" on some platforms.
You could also consider a rich response card. You an format the contents of the card a little, but you can't use two separate scenes to fill the contents of a single card. On some platforms, you can only show one card.

C# flipping mainwindow

this is my very first entry here, may it not be the last....
I am having a bit of a struggle with some GUI stuff.
I really have an animation up front my eyes and it should look like the following: using c# with desktop application.
This Form looks like a login window with server address, username and pw textboxes and with a connect button as well, so nothing special. Size wise it can be small or at least same as size as the turned window. doesnt matter at the end.
once you entered your credentials and all turns out to be fine, connection is there and valid.
The main Form is suppost to flip then (doesnt matter horizontal or vertical),
and shows you your options you got then in this newly window. kind of an animated sign, that you are logged in and have now these options.
But the flip is suppost to stay on the same place. Like a card flip or a coin flip, but just the whole form and it ends then at the same place as before.
(sounds really wired to explain)
This can also be done with a new form poping up, just with a animated turn over, no problem with that.
And this is exactly where I am stuck.
I really cant find any information on how this would look like in code or even in animation.
I am using c# and the basic project started as a desktop application project, which it will be at the end.
Its been a while since my last coding, please be gentle.
i know there are plenty of entries in here also in google as well, but i didnt found anything which will do this for the main window as a total. images etc: yes, but for the whole form: no.
Any help out there?
May be tehr eis a trick i am not aware of? Its been a while since the last coding work, I need to admit that.#greyhairsarecomming
many thanks in advance! much appreciated
kind regards TG

How can I make an OS X application unfocusable while still receiving click events?

I'm developing an on screen keyboard application for OS X, similar to the one that's built in to the operating system (Keyboard Viewer). I seem to have hit a wall as I'm not sure how I can accept click events from buttons and not steal focus from the currently activated application. I know this is possible since there are apps that already do this, e.g. AssistiveWere's KeyStrokes.
So my question is this: How can I make my window receive mouse events and handle them without getting activated?
P.S. I'm not very experienced in OS X development and this is my first Swift project, so excuses if this is a trivial problem.
You need to make your window an instance of NSPanel (or a subclass), include NSNonactivatingPanelMask in its styleMask, and set becomesKeyOnlyIfNeeded to true. (The style mask can be controlled in IB.) You probably also want it to be floating so it's always above normal windows, so set floatingPanel to true, too.

Access Pop Up Form Background Garbled/Distorted When Opened via OpenForm Macro Action with Window Mode Normal

I have a database that I work on using Access 2013, though I must maintain compatibility with Access 2010; I am using Windows 7.
I have an input form that is set to Pop Up = Yes, and Modal = No. When opening this input form directly from the Navigation Pane, it functions perfectly normally.
I have a macro in a search form that calls up this input form with the specified record using the "OpenForm" action. When opening the input form with this macro, the form's background is totally garbled (it pulls the background image from whatever was behind it when called, as though it were transparent), and all labels are unreadable.
That said, if I run the macro again by trying to open a different record, the form then appears correctly until it is closed. Also, if I change the "Window Mode" in the "OpenForm" action to "Dialog" rather than "Normal," it appears correctly.
Neither of these are valid solutions, though -- it should work on the first time, and I do not want the form to be modal. All my code seems okay (insomuch as I am not receiving error messages), so I don't understand why it would be doing this... any guidance is very much appreciated.
I have discovered what is causing this problem, though I don't understand why.
The macro I am using came from a sample database, and has some commands I am not fully familiar with. One such command is "Requery."
I experimented with removing various parts of the macro with the window mode as "Normal" for the "OpenForm" command. As soon as I tried removing "Requery" (and nothing else) the window opened in "Normal" mode with no distortion whatsoever.
In short, having "Requery" in the macro was what was causing this error to occur. It seems like an innocuous enough action (all it does is refresh data, from what I understand, as described here: https://msdn.microsoft.com/en-us/library/bb177360(v=office.12).aspx), but since I don't see why its inclusion was necessary anyway (if anyone could shed some light on that, it would be appreciated), it looks like this is essentially solved.
I hope this may help someone else in the future!

Perl GUI script that should work with the application minimzed. How make it stay that way? Focus related problem

I'm trying to develop a Perl script that controls an application in a very simple manner(fills some boxes, presses some keys).
I've implemented everything using Win32::GuiTest.
The goal is to make it work with the app being minimized in tray, allowing me to use the PC at the same time.
I'm using functions like: WMSetText , SelComboItem , SendMessage, PushChildButton.
All of them work fine, except for PushChildButton. Whenever this function is called, I'm losing focus(even though the controlled app stays minimized) from whatever I'm doing.
Application that I'm using before calling PushChildButton: http: // i. imgur.com/7B5kj.png
Application that I'm using after calling PushChildButton: http: // i. imgur.com/VCskW.png
I've tried killing the focus like this, but it did not work:
my $msg_id=0x08;
SendMessage( #_[ 0 ], $msg_id, #_[ 1 ], undef );
#_[ 0 ] - handle to the application
#_[ 1 ] -handle to the "Edit Control" that I think* that takes the focus after pressing the button
*Let me elaborate this a bit. The application still stays minimized, but sometimes that "Edit Control" resource contains strings that are concatenated with the keys that I've pressed while losing the focus.
PS: I'm a beginner with Perl and WinAPI(in fact this is my first project), so I might
have explained things a bit unclear. Please ask me everything that you feel that I
should elaborate.
Most likely this is a windows problem, not perl.
People do this normally with a normal window moved outside
the visible desktop range, e.g. to the left, x=-600.
Use Win32::GUI instead. This will save you many more headaches.