1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-22 09:12:19 -05:00

Fixed lil' bugs in tabs, & changed the way Writeln works @ windows.

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@195 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Raymond 2009-11-05 17:03:44 +00:00
parent 6901684b03
commit cf8e0f18f8
5 changed files with 2673 additions and 2749 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
object Form1: TForm1 object Form1: TForm1
Left = 274 Left = 223
Height = 557 Height = 557
Top = 233 Top = 272
Width = 731 Width = 731
ActiveControl = ScriptPanel ActiveControl = ScriptPanel
Caption = 'Action1' Caption = 'Action1'
ClientHeight = 532 ClientHeight = 537
ClientWidth = 731 ClientWidth = 731
Menu = MainMenu1 Menu = MainMenu1
OnClose = FormClose OnClose = FormClose
@ -165,8 +165,8 @@ object Form1: TForm1
end end
object StatusBar: TStatusBar object StatusBar: TStatusBar
Left = 0 Left = 0
Height = 21 Height = 23
Top = 511 Top = 514
Width = 731 Width = 731
Panels = < Panels = <
item item
@ -183,17 +183,17 @@ object Form1: TForm1
end end
object PanelMemo: TPanel object PanelMemo: TPanel
Left = 0 Left = 0
Height = 151 Height = 154
Top = 360 Top = 360
Width = 731 Width = 731
Align = alBottom Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
ClientHeight = 151 ClientHeight = 154
ClientWidth = 731 ClientWidth = 731
TabOrder = 2 TabOrder = 2
object Memo1: TMemo object Memo1: TMemo
Left = 1 Left = 1
Height = 149 Height = 152
Top = 1 Top = 1
Width = 729 Width = 729
Align = alClient Align = alClient
@ -250,7 +250,7 @@ object Form1: TForm1
Visible = False Visible = False
object LabeledEditSearch: TLabeledEdit object LabeledEditSearch: TLabeledEdit
Left = 104 Left = 104
Height = 27 Height = 21
Top = 6 Top = 6
Width = 174 Width = 174
AutoSelect = False AutoSelect = False
@ -259,10 +259,10 @@ object Form1: TForm1
EditLabel.AnchorSideTop.Side = asrCenter EditLabel.AnchorSideTop.Side = asrCenter
EditLabel.AnchorSideRight.Control = LabeledEditSearch EditLabel.AnchorSideRight.Control = LabeledEditSearch
EditLabel.AnchorSideBottom.Control = LabeledEditSearch EditLabel.AnchorSideBottom.Control = LabeledEditSearch
EditLabel.Left = 67 EditLabel.Left = 73
EditLabel.Height = 18 EditLabel.Height = 14
EditLabel.Top = 10 EditLabel.Top = 9
EditLabel.Width = 34 EditLabel.Width = 28
EditLabel.Caption = 'Find: ' EditLabel.Caption = 'Find: '
EditLabel.ParentColor = False EditLabel.ParentColor = False
LabelPosition = lpLeft LabelPosition = lpLeft

View File

@ -1,9 +1,9 @@
{ This is an automatically generated lazarus resource file } { This is an automatically generated lazarus resource file }
LazarusResources.Add('TForm1','FORMDATA',[ LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#18#1#6'Height'#3'-'#2#3'Top'#3#233#0#5'Wi' 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#223#0#6'Height'#3'-'#2#3'Top'#3#16#1#5'Wi'
+'dth'#3#219#2#13'ActiveControl'#7#11'ScriptPanel'#7'Caption'#6#7'Action1'#12 +'dth'#3#219#2#13'ActiveControl'#7#11'ScriptPanel'#7'Caption'#6#7'Action1'#12
+'ClientHeight'#3#20#2#11'ClientWidth'#3#219#2#4'Menu'#7#9'MainMenu1'#7'OnClo' +'ClientHeight'#3#25#2#11'ClientWidth'#3#219#2#4'Menu'#7#9'MainMenu1'#7'OnClo'
+'se'#7#9'FormClose'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestr' +'se'#7#9'FormClose'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestr'
+'oy'#10'OnShortCut'#7#13'FormShortCuts'#8'Position'#7#14'poScreenCenter'#10 +'oy'#10'OnShortCut'#7#13'FormShortCuts'#8'Position'#7#14'poScreenCenter'#10
+'LCLVersion'#6#6'0.9.29'#7'Visible'#9#0#8'TToolBar'#8'ToolBar1'#4'Left'#2#0#6 +'LCLVersion'#6#6'0.9.29'#7'Visible'#9#0#8'TToolBar'#8'ToolBar1'#4'Left'#2#0#6
@ -44,12 +44,12 @@ LazarusResources.Add('TForm1','FORMDATA',[
+'Save'#3'Top'#2#2#6'Action'#7#16'ActionSaveScript'#0#0#11'TToolButton'#10'TB' +'Save'#3'Top'#2#2#6'Action'#7#16'ActionSaveScript'#0#0#11'TToolButton'#10'TB'
+'_SaveAll'#4'Left'#2'F'#4'Hint'#6#8'Save all'#3'Top'#2#2#6'Action'#7#13'Acti' +'_SaveAll'#4'Left'#2'F'#4'Hint'#6#8'Save all'#3'Top'#2#2#6'Action'#7#13'Acti'
+'onSaveAll'#7'Enabled'#8#0#0#0#10'TStatusBar'#9'StatusBar'#4'Left'#2#0#6'Hei' +'onSaveAll'#7'Enabled'#8#0#0#0#10'TStatusBar'#9'StatusBar'#4'Left'#2#0#6'Hei'
+'ght'#2#21#3'Top'#3#255#1#5'Width'#3#219#2#6'Panels'#14#1#5'Width'#2'<'#0#1#4 +'ght'#2#23#3'Top'#3#2#2#5'Width'#3#219#2#6'Panels'#14#1#5'Width'#2'<'#0#1#4
+'Text'#6#8'Untitled'#5'Width'#3#150#0#0#1#5'Width'#2'2'#0#0#11'SimplePanel'#8 +'Text'#6#8'Untitled'#5'Width'#3#150#0#0#1#5'Width'#2'2'#0#0#11'SimplePanel'#8
+#0#0#6'TPanel'#9'PanelMemo'#4'Left'#2#0#6'Height'#3#151#0#3'Top'#3'h'#1#5'Wi' +#0#0#6'TPanel'#9'PanelMemo'#4'Left'#2#0#6'Height'#3#154#0#3'Top'#3'h'#1#5'Wi'
+'dth'#3#219#2#5'Align'#7#8'alBottom'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRi' +'dth'#3#219#2#5'Align'#7#8'alBottom'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRi'
+'ght'#8'akBottom'#0#12'ClientHeight'#3#151#0#11'ClientWidth'#3#219#2#8'TabOr' +'ght'#8'akBottom'#0#12'ClientHeight'#3#154#0#11'ClientWidth'#3#219#2#8'TabOr'
+'der'#2#2#0#5'TMemo'#5'Memo1'#4'Left'#2#1#6'Height'#3#149#0#3'Top'#2#1#5'Wid' +'der'#2#2#0#5'TMemo'#5'Memo1'#4'Left'#2#1#6'Height'#3#152#0#3'Top'#2#1#5'Wid'
+'th'#3#217#2#5'Align'#7#8'alClient'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akB' +'th'#3#217#2#5'Align'#7#8'alClient'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akB'
+'ottom'#0#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#0#0#0#9'TSplitter' +'ottom'#0#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#0#0#0#9'TSplitter'
+#19'SplitterMemoSynedit'#6'Cursor'#7#8'crVSplit'#4'Left'#2#0#6'Height'#2#5#3 +#19'SplitterMemoSynedit'#6'Cursor'#7#8'crVSplit'#4'Left'#2#0#6'Height'#2#5#3
@ -66,12 +66,12 @@ LazarusResources.Add('TForm1','FORMDATA',[
+'Left'#2#0#6'Height'#2'#'#3'Top'#3'('#1#5'Width'#3#219#2#5'Align'#7#8'alBott' +'Left'#2#0#6'Height'#2'#'#3'Top'#3'('#1#5'Width'#3#219#2#5'Align'#7#8'alBott'
+'om'#10'BevelOuter'#7#7'bvSpace'#12'ClientHeight'#2'#'#11'ClientWidth'#3#219 +'om'#10'BevelOuter'#7#7'bvSpace'#12'ClientHeight'#2'#'#11'ClientWidth'#3#219
,#2#8'TabOrder'#2#1#7'Visible'#8#0#12'TLabeledEdit'#17'LabeledEditSearch'#4'L' ,#2#8'TabOrder'#2#1#7'Visible'#8#0#12'TLabeledEdit'#17'LabeledEditSearch'#4'L'
+'eft'#2'h'#6'Height'#2#27#3'Top'#2#6#5'Width'#3#174#0#10'AutoSelect'#8' Edit' +'eft'#2'h'#6'Height'#2#21#3'Top'#2#6#5'Width'#3#174#0#10'AutoSelect'#8' Edit'
+'Label.AnchorSideLeft.Control'#7#17'LabeledEditSearch'#31'EditLabel.AnchorSi' +'Label.AnchorSideLeft.Control'#7#17'LabeledEditSearch'#31'EditLabel.AnchorSi'
+'deTop.Control'#7#17'LabeledEditSearch'#28'EditLabel.AnchorSideTop.Side'#7#9 +'deTop.Control'#7#17'LabeledEditSearch'#28'EditLabel.AnchorSideTop.Side'#7#9
+'asrCenter!EditLabel.AnchorSideRight.Control'#7#17'LabeledEditSearch"EditLab' +'asrCenter!EditLabel.AnchorSideRight.Control'#7#17'LabeledEditSearch"EditLab'
+'el.AnchorSideBottom.Control'#7#17'LabeledEditSearch'#14'EditLabel.Left'#2'C' +'el.AnchorSideBottom.Control'#7#17'LabeledEditSearch'#14'EditLabel.Left'#2'I'
+#16'EditLabel.Height'#2#18#13'EditLabel.Top'#2#10#15'EditLabel.Width'#2'"'#17 +#16'EditLabel.Height'#2#14#13'EditLabel.Top'#2#9#15'EditLabel.Width'#2#28#17
+'EditLabel.Caption'#6#6'Find: '#21'EditLabel.ParentColor'#8#13'LabelPosition' +'EditLabel.Caption'#6#6'Find: '#21'EditLabel.ParentColor'#8#13'LabelPosition'
+#7#6'lpLeft'#8'TabOrder'#2#0#8'OnChange'#7#16'EditSearchChange'#7'OnEnter'#7 +#7#6'lpLeft'#8'TabOrder'#2#0#8'OnChange'#7#16'EditSearchChange'#7'OnEnter'#7
+#22'LabeledEditSearchEnter'#6'OnExit'#7#21'LabeledEditSearchExit'#9'OnKeyDow' +#22'LabeledEditSearchEnter'#6'OnExit'#7#21'LabeledEditSearchExit'#9'OnKeyDow'

View File

@ -271,10 +271,15 @@ end;
procedure formWriteln( S : String); procedure formWriteln( S : String);
begin begin
s := s + #10;
DebugCriticalSection.Enter; DebugCriticalSection.Enter;
try try
{$ifdef MSWindows}
//Ha, we cán acces the debugmemo
Form1.Memo1.Lines.Add(s);
{$else}
s := s + MEOL;
Form1.DebugStream:= Form1.DebugStream + s; Form1.DebugStream:= Form1.DebugStream + s;
{$endif}
finally finally
DebugCriticalSection.Leave; DebugCriticalSection.Leave;
end; end;
@ -438,6 +443,7 @@ begin
TB_SaveAll.Enabled:= false; TB_SaveAll.Enabled:= false;
MenuItemSaveAll.Enabled:= false; MenuItemSaveAll.Enabled:= false;
end; end;
RefreshTab;
end; end;
procedure TForm1.ClearTab(TabIndex: integer); procedure TForm1.ClearTab(TabIndex: integer);
@ -514,6 +520,11 @@ var
Script : TScriptFrame; Script : TScriptFrame;
NewTab : integer; NewTab : integer;
begin begin
if tabs.Count < 1 then
begin;
Writeln('Cannot refresh tab, since there are no tabs.');
exit;
end;
NewTab := PageControl1.TabIndex; NewTab := PageControl1.TabIndex;
Tab := TMufasaTab(Tabs[Newtab]); Tab := TMufasaTab(Tabs[Newtab]);
Script := Tab.ScriptFrame; Script := Tab.ScriptFrame;
@ -682,6 +693,9 @@ begin
{ For writeln } { For writeln }
SetLength(DebugStream, 0); SetLength(DebugStream, 0);
DebugCriticalSection := syncobjs.TCriticalSection.Create; DebugCriticalSection := syncobjs.TCriticalSection.Create;
{$ifdef mswindows}
DebugTimer.Enabled:= false;
{$endif}
end; end;
procedure TForm1.FormDestroy(Sender: TObject); procedure TForm1.FormDestroy(Sender: TObject);
@ -733,6 +747,7 @@ begin
begin begin
ActionFindstartExecute(Sender); ActionFindstartExecute(Sender);
CurrScript.SynEdit.SetFocus; CurrScript.SynEdit.SetFocus;
key := 0;
end; end;
end; end;
@ -741,6 +756,7 @@ begin
if key = #13 then if key = #13 then
begin; begin;
DoSearch(true); DoSearch(true);
key := #0;
// LabeledEditSearch.SelStart:= Length(LabeledEditSearch.Text); // LabeledEditSearch.SelStart:= Length(LabeledEditSearch.Text);
end; end;
end; end;
@ -1072,6 +1088,7 @@ begin
ScriptFrame := TScriptFrame.Create(Tabsheet); ScriptFrame := TScriptFrame.Create(Tabsheet);
ScriptFrame.Parent := Tabsheet; ScriptFrame.Parent := Tabsheet;
ScriptFrame.Align:= alClient; ScriptFrame.Align:= alClient;
end; end;
constructor TMufasaTab.Create(Page: TPageControl); constructor TMufasaTab.Create(Page: TPageControl);

View File

@ -32,6 +32,7 @@ uses
Classes, SysUtils,plugins; Classes, SysUtils,plugins;
const const
DS = DirectorySeparator; DS = DirectorySeparator;
MEOL = {$ifdef MSWINDOWS}#13+{$endif}#10;
type type
TRGB32 = packed record TRGB32 = packed record