Changeset 240 for oup/current/Tools/MetaEditor.pas
- Timestamp:
- Jul 15, 2007, 1:12:26 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Tools/MetaEditor.pas
r239 r240 138 138 139 139 140 140 141 procedure TForm_Meta.VSTFocusChanged(Sender: TBaseVirtualTree; 141 142 Node: PVirtualNode; Column: TColumnIndex); 142 143 var 143 144 data: PNodeData; 145 ffile: TFile; 146 //******************************************************************* 147 fs: TFileStream; 148 //******************************************************************* 144 149 begin 145 150 data := Sender.GetNodeData(Node); 151 ffile := nil; 146 152 if data.Field is TFile then 147 begin 148 TFile(data.Field).InitEditor; 149 if Assigned(TFile(data.Field).Editor) then 153 ffile := TFile(data.Field); 154 if data.Field is TDatLink then 155 if Assigned(TDatLink(data.Field).TargetFile) then 156 ffile := TFile(TDatLink(data.Field).TargetFile); 157 if Assigned(ffile) then 158 begin 159 if Assigned(ffile.Editor) then 150 160 begin 151 TFile(data.Field).Editor.Align := alClient; 152 tab_meta.InsertControl(TFile(data.Field).Editor); 153 TFile(data.Field).Opened := True; 154 end; 161 ffile.Editor.Align := alClient; 162 tab_meta.InsertControl(ffile.Editor); 163 ffile.Opened := True; 164 end; 165 //******************************************************************* 166 fs := TFileStream.Create('C:\Spiele\Oni\GameDataFolder\tests\'+IntToStr(ffile.FileInfo.ID)+'_recreated.hex', fmCreate); 167 ffile.ReCreateFile(fs); 168 fs.Free; 169 //******************************************************************* 155 170 end; 156 171 end; … … 167 182 if data.Field is TFile then 168 183 begin 169 TFile(data.Field).InitEditor;170 184 if Assigned(TFile(data.Field).Editor) then 171 185 Allowed := not TFile(data.Field).Opened
Note:
See TracChangeset
for help on using the changeset viewer.