This repository has been archived by the owner on Oct 8, 2022. It is now read-only.
Replies: 1 comment 2 replies
-
The version(Windows)
struct KeyboardEvent
{
auto hasControlKey(SCK ck)
{
return controlKey.hasFlag(ck);
}
public SK key;
public SCK controlKey;
public bool pressed;
}
version(Posix)
struct KeyboardEvent
{
auto hasControlKey(SCK ck)
{
return controlKey.hasFlag(ck);
}
public SK key;
public SCK controlKey;
} This means anyone relying on |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Should scone detect if certain features are available to use?
For instance
/shrug
). Must be detected at runtime.For instance, it is completely legal to write the following
if(input.pressed == false) { /+ ... +/ }
, but on any POSIX system this will never be true.input.pressed
will undenieably, without a doubt, always betrue
on any POSIX system.Furthermore,
frame.write(0,0, Color.rgb(10,20,30), "test");
on an unsupported POSIX terminal will result in garbage being printed (I think). Is it up to scone to detect this, or up to the user to ensure the program is run on supported software?Beta Was this translation helpful? Give feedback.
All reactions