gelic-idealab / impress

Education Research domain module for the Komodo platform
3 stars 2 forks source link

Enable capture button #5

Open parseccentric opened 2 years ago

parseccentric commented 2 years ago

New Feature Description

Create or enable a capture button in the menu so that you can start and stop captures.

How to Test

Action:

Click the capture button when not recording.

Expected results:

Action:

Click the capture button when recording.

Expected result:

parseccentric commented 2 years ago

(Dev notes)

The relevant function is in socket-funcs.jslib:

    ToggleCapture: function (operation, session_id) {
        if (window.sync == null) {
            return 1;
        }

        if (operation == 0) {
            window.sync.emit("start_recording", session_id);

            return 0;
        }

        window.sync.emit("end_recording", session_id);

        return 0;
    },
parseccentric commented 2 years ago

(Dev notes)

From the final call backwards to the button

Legacy Version

socket-funcs.jslib

RecordEvent.cs

Some Unity UI Event

Refactored Version

socket-funcs.jslib

SocketIOJSLib.cs

SocketIOAdapter

CaptureManager (renamed from RecordEvent)