Skip to content

Create UI for loading stages from web URLs #42

@TheRealCatherine

Description

@TheRealCatherine

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)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions