scripting docs
This commit is contained in:
18
scripts/examples/observe-property-and-draw-text.cs
Normal file
18
scripts/examples/observe-property-and-draw-text.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
// This script observes the fullscreen property and
|
||||
// draws text on screen when the property changes.
|
||||
|
||||
using mpvnet;
|
||||
|
||||
class Script
|
||||
{
|
||||
public Script()
|
||||
{
|
||||
mp.observe_property_bool("fullscreen", FullscreenChange);
|
||||
}
|
||||
|
||||
void FullscreenChange(bool value)
|
||||
{
|
||||
mp.commandv("show-text", "fullscreen: " + value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user