mirror of
https://git.checksum.fail/alec/saphir.git
synced 2026-05-01 18:09:42 +03:00
Refactor everything
We now hijack existing system functions to integrate with `WinMgr`, instead of `Spawn`ing our own `SaphirTask`. Also, you can now use `Saphir(Bool)` to toggle enable/disable the features. There is a global var `saphir` which values are set by `Defaults.HC` for colors and other behaviors; these values can be changed at any time.
This commit is contained in:
16
Saphir/Main.HC
Normal file
16
Saphir/Main.HC
Normal file
@@ -0,0 +1,16 @@
|
||||
I64 Saphir(Bool enable = TRUE)
|
||||
{
|
||||
if (enable == saphir.enabled) {
|
||||
return enable;
|
||||
}
|
||||
fn_patch(&Blink, &saphir_Blink, enable);
|
||||
fn_patch(&DocBorder, &saphir_DocBorder, enable);
|
||||
// fn_patch(&DocBorderLstDraw, &saphir_DocBorderLstDraw, enable);
|
||||
fn_patch(&DrvTextAttrGet, &saphir_DrvTextAttrGet, enable);
|
||||
saphir_cursor(enable);
|
||||
saphir_keydev(enable);
|
||||
if (!enable) {
|
||||
DCFill;
|
||||
}
|
||||
saphir.enabled = enable;
|
||||
}
|
||||
Reference in New Issue
Block a user