summaryrefslogtreecommitdiff
path: root/plugins/Watrack/status/i_opt_status.inc
blob: 09e0c208cef4776354ef1fabc813c1a1a32d9bf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{}
const
  opt_ModStatus  :PAnsiChar = 'module/statuses';

  opt_UseStatus  :PAnsiChar = 'usestatus';
  opt_UseExtStat :PAnsiChar = 'useextstat';
  opt_UseMsgs    :PAnsiChar = 'usemsgs';
  opt_XStatusSet :PAnsiChar = 'xstatusset';
  opt_KeepStatus :PAnsiChar = 'keepstatus';
  opt_Independed :PAnsiChar = 'independed';
  opt_ClearXStat :PAnsiChar = 'clearxstat';
  opt_SimplMode  :PAnsiChar = 'simplemode';
  opt_ListeningTo:PAnsiChar = 'listeningto';

function GetModStatus:integer;
begin
  result:=DBReadByte(0,PluginShort,opt_ModStatus,1);
end;

procedure SetModStatus(stat:integer);
begin
  DBWriteByte(0,PluginShort,opt_ModStatus,stat);
end;

procedure LoadOpt;
begin
  SimpleMode    :=DBReadByte(0,PluginShort,opt_SimplMode  ,BST_CHECKED);
  UseStatus     :=DBReadByte(0,PluginShort,opt_UseStatus  ,BST_CHECKED);
  UseExtStatus  :=DBReadByte(0,PluginShort,opt_UseExtStat ,BST_CHECKED);
  UseMessages   :=DBReadByte(0,PluginShort,opt_UseMsgs    ,BST_CHECKED);
  KeepStatus    :=DBReadByte(0,PluginShort,opt_KeepStatus ,BST_UNCHECKED);
  XIndepended   :=DBReadByte(0,PluginShort,opt_Independed ,BST_CHECKED);
  ClearXStat    :=DBReadByte(0,PluginShort,opt_ClearXStat ,BST_UNCHECKED);
  UseListeningTo:=DBReadByte(0,PluginShort,opt_ListeningTo,BST_UNCHECKED);
  XStatusSet    :=DBReadByte(0,PluginShort,opt_XStatusSet ,1);
end;

procedure SaveOpt;
begin
  DBWriteByte(0,PluginShort,opt_SimplMode  ,SimpleMode);
  DBWriteByte(0,PluginShort,opt_UseStatus  ,UseStatus);
  DBWriteByte(0,PluginShort,opt_UseExtStat ,UseExtStatus);
  DBWriteByte(0,PluginShort,opt_UseMsgs    ,UseMessages);
  DBWriteByte(0,PluginShort,opt_KeepStatus ,KeepStatus);
  DBWriteByte(0,PluginShort,opt_Independed ,XIndepended);
  DBWriteByte(0,PluginShort,opt_ClearXStat ,ClearXStat);
  DBWriteByte(0,PluginShort,opt_ListeningTo,UseListeningTo);
  DBWriteByte(0,PluginShort,opt_XStatusSet ,XStatusSet);
end;