Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create UI for loading stages from web URLs #42

Open
TheRealCatherine opened this issue Jan 31, 2018 · 0 comments
Open

Create UI for loading stages from web URLs #42

TheRealCatherine opened this issue Jan 31, 2018 · 0 comments

Comments

@TheRealCatherine
Copy link
Owner

TheRealCatherine commented Jan 31, 2018

We already support loading stage data from remote URL's but there is no UI for inputting these. Eventually we will probably have a special server that hosts user-made content, but for now simply inputting a remote URL string is sufficient.

Probably we could add a button right under the other load button on the main menu for doing a remote load - or even better would be adding like a globe icon to the file browser that will switch it to url mode (but of course our file browser is 3rd party but we have already deviated from the source slightly with it anyway)

In InputManager right now there are lines like the following:

else if(Input.GetKeyDown(KeyCode.Keypad1) && ctrlDown)
{
            Serializer.LoadFileUsingHTTP(new Uri("http://raw.githubusercontent.com/TheRealCatherine/StageMechanic/master/StageMechanic/Stages/Testing/Cathy1/Easy/1-1.json"));
}

These load various Cathy1 levels from the git repository for easy testing purposes. The same formula can be applied to user-inputted URL's. As of right now there is no way to determine if the operation was successful (other than perhaps checking if BlockManager has any blocks) but most likely Serializer.LoadFileUsingHTTP will either return a bool or Serializer will have some flag that can be checked (or perhaps there may be some option for callbacks or something)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant