-
Is This Possible?
Probably newbie question:
Is it possible for a RR plugin to switch screens (or pop-up or overlay the current screen) programmatically (as opposed to the user pressing a button)?
For example, suppose you were driving along and your navigation screen was active. A cellular phone plugin might automatically switch to (or pop up) a screen with information about an incoming call (Caller*ID, a photograph of the caller, etc.), overriding your navigation screen. If the call is not answered, the plugin would switch back to your original navigation screen automatically.
Is this sort of functionality supported in RideRunner?
-
yes.
All skin functions are available to plugins.
-
In that case I must be doing something wrong.
In my sandbox C# plugin I execute the following code snippet every 5 seconds in response to a timer event:
Code:
bool ind; // NOTE: this variable is a member of the class and gets initialized to false in the constructor
// ...
ind = !ind;
if (ind)
{
SDK.Execute("LOAD;IGO.skin");
}
else
{
SDK.Execute("LASTSCR");
}
I thought that this would alternate between the IGO skin and whatever screen I was last looking at (in this case the main menu screen menu.skin), but according to the debug log, the LASTSCR command is failing, apparently because the command is invalid:
Code:
4/11/2011 8:38:47 PM: Que Exec: True, menu.skin, "LOAD;IGO.skin", False
4/11/2011 8:38:47 PM: Executing: LOAD;IGO.skin
4/11/2011 8:38:48 PM: Que Exec: True, igo.skin, "ONSCREENCHANGE", False
4/11/2011 8:38:48 PM: Leave Exec: False, igo.skin, ONSCREENCHANGE, False
4/11/2011 8:38:52 PM: Enter Exec: False, igo.skin, , False
4/11/2011 8:38:52 PM: Que Exec: True, igo.skin, "LASTSCR", False
4/11/2011 8:38:52 PM: Executing: LASTSCR
4/11/2011 8:38:52 PM: Command not executed: main
4/11/2011 8:38:52 PM: Que Exec: True, igo.skin, "ONCOMMANDINVALID", False
4/11/2011 8:38:52 PM: Executing: ONCOMMANDINVALID
4/11/2011 8:38:52 PM: Leave Exec: False, igo.skin, ONCOMMANDINVALID, False
4/11/2011 8:38:57 PM: Enter Exec: False, igo.skin, , False
LASTSCR is listed in the Skin Commands in the documentation folder, so it should be valid, right?
What am I doing wrong? :confused:
-
Well the command has sort of worked.
It's been changed to 'main' but for some reason the 'main' (which should take RR back to the menu) command has not been executed.
-
Turns out the proper command is "exit," not "lastscr."