--- oup/current/Main.pas 2007/04/08 23:52:14 172 +++ oup/current/Main.pas 2007/06/04 22:07:29 209 @@ -6,10 +6,7 @@ uses MPHexEditor, ToolWin, ImgList, Tabs, MDITab, TB2Item, TB2Dock, TB2Toolbar, TB2MDI, OneInst, Data, TypeDefs, ConnectionManager, -// Functions, Exporters, DataStructures, - Functions, - Settings, {Helper_LevelDB, } - Template, + Functions, Settings, Template, RawEdit, BinEdit, Extractor, Preview, TxmpReplace; type @@ -138,7 +135,7 @@ var implementation uses - LevelDB; + LevelDB, MetaEditor; {$R *.dfm} @@ -257,6 +254,10 @@ begin end else begin + ShowMessage('Warning!' + #13#10 + + 'It seems like this is the first time you OUP.' + #13#10 + + 'I do not take any responsibility for messed up data files' + #13+#10 + + 'Do not forget to make backup copies of your *.dat/*.raw/*.sep files!'); AppSettings.DatPath := ExtractFilepath(Application.EXEname); AppSettings.ExtractPath := ExtractFilepath(Application.EXEname) + '\extract'; AppSettings.CharSet := DEFAULT_CHARSET; @@ -413,6 +414,7 @@ begin tb_rawedit.Enabled := active; tb_txmpreplacer.Enabled := active; tb_extractor.Enabled := active; + tb_meta.Enabled := active; // tb_compare.Enabled := active; // tb_structure.Enabled := active; end; @@ -603,8 +605,33 @@ begin end; procedure TForm_Main.menu_metaClick(Sender: TObject); -begin - ShowMessage('TBD'); +var + toolform: TForm_Meta; + i: Integer; + tag: Integer; + iconindex: Integer; +begin + tag := 1; + if MDIChildCount > 0 then + for i := 0 to MDIChildCount - 1 do + if MDIChildren[i].Tag >= tag then + tag := MDIChildren[i].Tag + 1; + + iconindex := -1; + + toolform := nil; + + toolform := TForm_Meta.Create(Self); + toolform.Caption := 'MetaEditor' + ' ' + IntToStr(tag) + ' '; + iconindex := 11; + + if Assigned(toolform) then + begin + toolform.Name := 'meta' + IntToStr(tag); + toolform.Tag := tag; + MDITab.AddTab(TForm(toolform), iconindex); + toolform.Caption := AnsiReplaceStr(toolform.Caption, ' ', ''); + end; end; procedure TForm_Main.menu_filecompareClick(Sender: TObject);