Skip to content
This repository has been archived by the owner on Oct 8, 2022. It is now read-only.

Replace sconeSetup #70

Open
vladdeSV opened this issue Jan 31, 2021 · 0 comments
Open

Replace sconeSetup #70

vladdeSV opened this issue Jan 31, 2021 · 0 comments

Comments

@vladdeSV
Copy link
Owner

sconeSetup is an overrideable delegate which is run on local thread start only once.

By default it sets up up a default frame and input, but requires the user to write the code themselves.

This could be replaced with and enum instead.

enum SconeModule {
  none = 0,
  frame = 1,
  input = 2,
  // todo audio = 4,
}

I would also like to safeguard these setting by putting them in a container which errors if the settings are modified after initialization. I am thinking of something like this (unsure of implementation):

// modifying in other place than 'shared static this' will error
shared static this()
{
  scone.modules = SconeModule.frame | SconeModule.audio;
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant