procedure TfrmLog.UpdateWindow;
var EnabledFlag: boolean;
begin
- if Pref.ColorScript then begin
+ if true then begin // ColorScript
if lvwLog.Color <> Pref.BgColor then lvwLog.Color := Pref.BgColor;
if lvwLog.Font.Color <> Pref.TalkColorH then lvwLog.Font.Color := Pref.TalkColorH;
end else begin
begin
if Script <> FLastScript then begin
if Pref.LogWindowPreviewStyle = psConversation then begin
- if Pref.ColorScript then begin
+ if true then begin {TODO: ColorScript}
UpdateScriptConversationColor(Script);
end else begin
UpdateScriptConversationNoColor(Script);
UnyuTalking, InSynchronized: boolean;
i: integer;
begin
- if Pref.ColorScript then begin
+ if true then begin // {TODO: ColorScrpt}
edtScript.Color := Pref.BgColor;
end else begin
edtScript.Color := clWindow;
UnyuTalking := false;
InSynchronized := false;
for i := 0 to SsParser.Count-1 do begin
- if Pref.ColorScript then begin
+ if true then begin // {TODO: ColorScript}
case SsParser.MarkUpType[i] of
mtStr: begin
if InSynchronized then
Caret.Style = csDefault
Caret.TabIndent = False
Caret.TabSpaceCount = 8
+ Fountain = SakuraScriptFountain
Font.Charset = SHIFTJIS_CHARSET
Font.Color = clBlack
Font.Height = -12
WrapOption.PunctuationStr = #12289#12290#65292#65294',.'#65377#65380
WrapOption.WordBreak = False
WrapOption.WrapByte = 80
+ OnChange = memScriptChange
+ OnKeyDown = memScriptKeyDown
+ OnKeyPress = memScriptKeyPress
end
end
object pnlPanel: TPanel
object mnEdit: TMenuItem
Caption = #32232#38598'(&E)'
object mnCut: TMenuItem
- Action = actEditCut
+ Action = actCut
end
object mnCopy: TMenuItem
- Action = actEditCopy
+ Action = actCopy
end
object mnCopyAll: TMenuItem
Action = actCopyAll
Action = actCopyAllNoReturn
end
object mnPaste: TMenuItem
- Action = actEditPaste
+ Action = actPaste
end
object mnSelectAll: TMenuItem
- Action = actEditSelectAll
+ Action = actSelectAll
end
end
object mnRegister: TMenuItem
Images = imgIcon
Left = 200
Top = 72
- object actEditCopy: TEditCopy
- Category = #32232#38598
- Caption = #12467#12500#12540'(&C)'
- Hint = #12467#12500#12540
- ImageIndex = 2
- ShortCut = 16451
- end
- object actEditCut: TEditCut
- Category = #32232#38598
- Caption = #20999#12426#21462#12426'(&T)'
- Hint = #20999#12426#21462#12426
- ImageIndex = 4
- ShortCut = 16472
- end
- object actEditPaste: TEditPaste
- Category = #32232#38598
- Caption = #36028#12426#20184#12369'(&P)'
- Hint = #36028#12426#20184#12369
- ImageIndex = 3
- ShortCut = 16470
- end
- object actEditSelectAll: TEditSelectAll
- Category = #32232#38598
- Caption = #12377#12409#12390#12434#36984#25246'(&A)'
- Hint = #12377#12409#12390#12434#36984#25246
- ShortCut = 16449
- end
object actStart: TAction
Caption = #12481#12515#12531#12493#12523#21442#21152'(&S)'
Hint = #12481#12515#12531#12493#12523#21442#21152'|SSTP Bottle'#12469#12540#12496#12395#25509#32154#12375#12289#12481#12515#12531#12493#12523#12395#21442#21152
ImageIndex = 39
OnExecute = actInsertCueExecute
end
+ object actCopy: TAction
+ Caption = #12467#12500#12540'(&C)'
+ ImageIndex = 2
+ ShortCut = 16451
+ OnExecute = actCopyExecute
+ end
+ object actPaste: TAction
+ Caption = #36028#12426#20184#12369'(&P)'
+ ImageIndex = 3
+ ShortCut = 16470
+ OnExecute = actPasteExecute
+ end
+ object actCut: TAction
+ Caption = #20999#12426#21462#12426'(&T)'
+ ImageIndex = 4
+ ShortCut = 16472
+ OnExecute = actCutExecute
+ end
+ object actSelectAll: TAction
+ Caption = #12377#12409#12390#12434#36984#25246'(&A)'
+ ShortCut = 16449
+ OnExecute = actSelectAllExecute
+ end
end
object mnPopUp: TPopupMenu
Images = imgIcon
end
object mnPopCut: TMenuItem
Tag = -1
- Action = actEditCut
+ Action = actCut
end
object mnPopCopy: TMenuItem
Tag = -1
- Action = actEditCopy
+ Action = actCopy
end
object mnPopCopyAll: TMenuItem
Action = actCopyAll
end
object mnPopPaste: TMenuItem
Tag = -1
- Action = actEditPaste
+ Action = actPaste
end
object mnPopSelectAll: TMenuItem
Tag = -1
- Action = actEditSelectAll
+ Action = actSelectAll
end
end
object TaskTray: TTaskTray
Reserve.Color = clNone
Reserve.Style = []
Scope0Color.BkColor = clNone
- Scope0Color.Color = clNone
+ Scope0Color.Color = clBlack
Scope0Color.Style = []
Scope1Color.BkColor = clNone
- Scope1Color.Color = clNone
+ Scope1Color.Color = clMaroon
Scope1Color.Style = []
TagColor.BkColor = clNone
- TagColor.Color = clNone
+ TagColor.Color = clGreen
TagColor.Style = []
TagErrorColor.BkColor = clNone
- TagErrorColor.Color = clNone
+ TagErrorColor.Color = clRed
TagErrorColor.Style = []
MetaWordColor.BkColor = clNone
- MetaWordColor.Color = clNone
+ MetaWordColor.Color = clBlue
MetaWordColor.Style = []
SynchronizedColor.BkColor = clNone
- SynchronizedColor.Color = clNone
+ SynchronizedColor.Color = clFuchsia
SynchronizedColor.Style = []
SakuraScriptParser = SsParser
Left = 112
mnAbout: TMenuItem;
mnEditConst: TMenuItem;
ActionList: TActionList;
- actEditCopy: TEditCopy;
- actEditCut: TEditCut;
- actEditPaste: TEditPaste;
- actEditSelectAll: TEditSelectAll;
mnPopUp: TPopupMenu;
mnPopPaste: TMenuItem;
mnPopCut: TMenuItem;
actInsertCue: TAction;
SakuraScriptFountain: TSakuraScriptFountain;
memScript: TEditor;
+ actCopy: TAction;
+ actPaste: TAction;
+ actCut: TAction;
+ actSelectAll: TAction;
procedure actConfirmExecute(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure actFMOExplorerExecute(Sender: TObject);
procedure actInsertCueExecute(Sender: TObject);
procedure FormResize(Sender: TObject);
+ procedure actCopyExecute(Sender: TObject);
+ procedure actPasteExecute(Sender: TObject);
+ procedure actCutExecute(Sender: TObject);
+ procedure actSelectAllExecute(Sender: TObject);
private
FSleeping: boolean;
FStatusText: String;
FormStyle := fsNormal;
mnStayOnTop.Checked := false;
end;
- mnColorScript.Checked := Pref.ColorScript;
mnGoToHP.Hint := Pref.HomePage;
mnGotoGlog.Hint := Pref.GLogPage;
procedure TfrmSender.actClearExecute(Sender: TObject);
var TmpScript: String;
- Pos: Integer;
+ Position: Integer;
begin
TmpScript := Pref.DefaultScript;
- if RegExp.Match('m/^((.|\s)*)\|/', TmpScript) then begin
- Pos := length(RegExp[1]);
- end else Pos := 0;
- RegExp.Subst('s/\|//', TmpScript);
-
+ Position := Pos('|', TmpScript);
+ if Position < 1 then Position := 1;
+ TmpScript := StringReplace(TmpScript, '|', '', []);
memScript.Lines.Text := TmpScript;
+ memScript.SelStart := Position-1;
if Visible then memScript.SetFocus;
FScriptModified := false;
procedure TfrmSender.UpdateLayout;
begin
+ with SakuraScriptFountain do begin
+ TagColor.Color := Pref.MarkUpColor;
+ TagErrorColor.Color := Pref.MarkErrorColor;
+ Scope0Color.Color := Pref.TalkColorH;
+ Scope1Color.Color := Pref.TalkColorU;
+ SynchronizedColor.Color := Pref.TalkColorS;
+ end;
+ memScript.Color := Pref.BgColor;
+
ToolBar.Visible := Pref.ShowToolBar;
ConstMenuBar.Visible := Pref.ShowConstBar;
ToolBar.Top := 0;
memScript.WrapOption.WrapByte := (memScript.Width - 20) div 6;
end;
+procedure TfrmSender.actCopyExecute(Sender: TObject);
+begin
+ memScript.CopyToClipboard;
+end;
+
+procedure TfrmSender.actPasteExecute(Sender: TObject);
+begin
+ memScript.PasteFromClipboard;
+end;
+
+procedure TfrmSender.actCutExecute(Sender: TObject);
+begin
+ memScript.CutToClipboard;
+end;
+
+procedure TfrmSender.actSelectAllExecute(Sender: TObject);
+begin
+ memScript.SelectAll;
+end;
+
end.
Top = 8
Width = 379
Height = 306
- ActivePage = tstReceive
+ ActivePage = tstColor
Anchors = [akLeft, akTop, akRight, akBottom]
TabOrder = 0
object tstGeneral: TTabSheet
Caption = #33394#20998#12369#12473#12500#12540#12489'('#36895#12377#12366#12427#12392#12461#12540#12508#12540#12489#12398#21453#24540#12364#37389#12426#12414#12377')(&D)'
FocusControl = trkColorSpeed
end
- object cbxColorScript: TCheckBox
- Left = 8
- Top = 8
- Width = 201
- Height = 17
- Hint = #12481#12455#12483#12463#12434#35299#38500#12377#12427#12392#36895#24230#12399#36895#24230#12399#36895#12367#12394#12427#12364#35211#12389#12425#12356
- Caption = #12473#12463#12522#12503#12488#33394#20998#12369#12434#34892#12358'(&E)'
- TabOrder = 0
- end
object trkColorTimeLag: TTrackBar
Left = 16
Top = 200
PageSize = 100
Frequency = 100
Position = 500
- TabOrder = 2
+ TabOrder = 1
ThumbLength = 15
end
object trkColorSpeed: TTrackBar
Max = 25
Min = 5
Position = 10
- TabOrder = 3
+ TabOrder = 2
ThumbLength = 15
end
object gbxColor: TGroupBox
Left = 8
- Top = 24
+ Top = 16
Width = 353
Height = 153
Caption = #33394'(&O)'
- TabOrder = 1
+ TabOrder = 0
inline frmColorSetting: TfrmColorSetting
Left = 16
Top = 18
memDefaultScript: TMemo;
lblDefaultScript: TLabel;
grpLocalConfirm: TGroupBox;
- cbxColorScript: TCheckBox;
trkColorTimeLag: TTrackBar;
trkColorSpeed: TTrackBar;
cbxIgnoreTimeCritical: TCheckBox;
cbxNoSendGhostList.Checked := Pref.NoSendGhostList;
cbxConfirmOnExit.Checked := Pref.ConfirmOnExit;
//
- cbxColorScript.Checked := Pref.ColorScript;
with frmColorSetting do begin
Color['H'] := Pref.TalkColorH;
Color['U'] := Pref.TalkColorU;
Pref.NoSendGhostList := cbxNoSendGhostList.Checked;
Pref.ConfirmOnExit := cbxConfirmOnExit.Checked;
//
- Pref.ColorScript := cbxColorScript.Checked;
with frmColorSetting do begin
Pref.TalkColorH := Color['H'];
Pref.TalkColorU := Color['U'];