Updated Windows front-end to create version 3 cel URLs. Added detailed comment explaining the different cel URL time sources in url.h.
parent
6078948aa6
commit
d716facf80
|
@ -28,12 +28,22 @@ class CelestiaState;
|
|||
class Url
|
||||
{
|
||||
public:
|
||||
enum UrlType {
|
||||
enum UrlType
|
||||
{
|
||||
Absolute = 0,
|
||||
Relative = 1,
|
||||
Settings = 2,
|
||||
};
|
||||
|
||||
|
||||
/*! The TimeSource specifies what the time will be set to when the user
|
||||
* activates the URL.
|
||||
* - UseUrlTime indicates that the simulation time should be set to whatever
|
||||
* value was stored in the URL.
|
||||
* - UseSimulationTime means that the simulation time at activation is not
|
||||
* changed.
|
||||
* - UseSystemTime means that the simulation time will be set to whatever the
|
||||
* current system time is when the URL is activated.
|
||||
*/
|
||||
enum TimeSource
|
||||
{
|
||||
UseUrlTime = 0,
|
||||
|
|
|
@ -453,7 +453,10 @@ static bool CopyStateURLToClipboard()
|
|||
if (!b)
|
||||
return false;
|
||||
|
||||
Url url(appCore);
|
||||
CelestiaState appState;
|
||||
appState.captureState(appCore);
|
||||
|
||||
Url url(appState, Url::CurrentVersion);
|
||||
string urlString = url.getAsString();
|
||||
|
||||
char* s = const_cast<char*>(urlString.c_str());
|
||||
|
@ -3898,7 +3901,7 @@ LRESULT CALLBACK MainWindowProc(HWND hWnd,
|
|||
if (!urlString.substr(0,4).compare("cel:"))
|
||||
{
|
||||
appCore->flash(_("Loading URL"));
|
||||
appCore->goToUrl(urlString);
|
||||
appCore->goToUrl(urlString);
|
||||
}
|
||||
else if (DetermineFileType(urlString) == Content_CelestiaScript)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue