| 7 |
|
Dialogs, StdCtrls, StrUtils, Clipbrd, ExtCtrls, ComCtrls, Menus, Grids, |
| 8 |
|
MPHexEditor, ToolWin, ImgList, Tabs, |
| 9 |
|
MDITab, TB2Item, TB2Dock, TB2Toolbar, TB2MDI, |
| 10 |
< |
Code_Functions, Data, Code_DataStructures, Code_OniDataClass, |
| 11 |
< |
Helper_LevelDB, Code_Exporters, Settings, Tool_Template, |
| 12 |
< |
Tool_BinEdit, Tool_Extractor, Tool_Preview, Tool_RawEdit, Tool_TxmpReplace; |
| 10 |
> |
Data, Functions, DataStructures, OniDataClass, Exporters, |
| 11 |
> |
Helper_LevelDB, Settings, Template, |
| 12 |
> |
BinEdit, Extractor, Preview, RawEdit, TxmpReplace; |
| 13 |
|
|
| 14 |
|
type |
| 15 |
|
TForm_Main = class(TForm) |
| 65 |
|
tb_txmpreplacer: TTBItem; |
| 66 |
|
tb_rawedit: TTBItem; |
| 67 |
|
tb_datedit: TTBItem; |
| 68 |
+ |
menu_windows_tilevert: TTBItem; |
| 69 |
|
function TryCloseAll: Boolean; |
| 70 |
|
procedure menu_AboutClick(Sender: TObject); |
| 71 |
|
procedure menu_settingsClick(Sender: TObject); |
| 77 |
|
procedure menu_windows_previousClick(Sender: TObject); |
| 78 |
|
procedure menu_windows_nextClick(Sender: TObject); |
| 79 |
|
procedure menu_windows_tileClick(Sender: TObject); |
| 80 |
< |
function open_child(window_context: String; fileid: Integer): Boolean; |
| 80 |
> |
function open_child(window_context: String; fileid: Integer): TForm_ToolTemplate; |
| 81 |
|
procedure menu_windows_closeallClick(Sender: TObject); |
| 82 |
|
procedure menu_windows_cascadeClick(Sender: TObject); |
| 83 |
|
procedure menu_bineditClick(Sender: TObject); |
| 97 |
|
procedure ActivateTools(active: Boolean); |
| 98 |
|
procedure MDITabMouseUp(Sender: TObject; Button: TMouseButton; |
| 99 |
|
Shift: TShiftState; X, Y: Integer); |
| 100 |
+ |
procedure menu_windows_tilevertClick(Sender: TObject); |
| 101 |
|
private |
| 102 |
|
public |
| 103 |
|
end; |
| 476 |
|
Self.Tile; |
| 477 |
|
end; |
| 478 |
|
|
| 479 |
+ |
procedure TForm_Main.menu_windows_tilevertClick(Sender: TObject); |
| 480 |
+ |
begin |
| 481 |
+ |
Self.TileMode := tbVertical; |
| 482 |
+ |
Self.Tile; |
| 483 |
+ |
end; |
| 484 |
|
|
| 485 |
|
|
| 486 |
|
procedure TForm_Main.menu_windows_closeallClick(Sender: TObject); |
| 523 |
|
|
| 524 |
|
|
| 525 |
|
|
| 526 |
< |
function TForm_Main.open_child(window_context: String; fileid: Integer): Boolean; |
| 526 |
> |
function TForm_Main.open_child(window_context: String; fileid: Integer): TForm_ToolTemplate; |
| 527 |
|
var |
| 528 |
|
toolform: TForm_ToolTemplate; |
| 529 |
|
i: Integer; |
| 530 |
|
tag: Integer; |
| 531 |
|
iconindex: Integer; |
| 532 |
|
begin |
| 533 |
< |
Result := True; |
| 533 |
> |
Result := nil; |
| 534 |
|
|
| 535 |
|
tag := 1; |
| 536 |
|
if MDIChildCount > 0 then |
| 544 |
|
begin |
| 545 |
|
toolform := TForm_BinEdit.Create(Self); |
| 546 |
|
toolform.Caption := 'Binary .dat-Editor ' + IntToStr(tag); |
| 547 |
< |
iconindex := 0; |
| 547 |
> |
iconindex := 4; |
| 548 |
|
end; |
| 549 |
|
if window_context = 'extractor' then |
| 550 |
|
begin |
| 551 |
|
toolform := TForm_Extractor.Create(Self); |
| 552 |
|
toolform.Caption := 'Extractor ' + IntToStr(tag); |
| 553 |
+ |
iconindex := 7; |
| 554 |
|
end; |
| 555 |
|
if window_context = 'preview' then |
| 556 |
|
begin |
| 557 |
|
toolform := TForm_Preview.Create(Self); |
| 558 |
|
toolform.Caption := 'Preview-Window ' + IntToStr(tag); |
| 559 |
+ |
iconindex := 3; |
| 560 |
|
end; |
| 561 |
|
if window_context = 'rawedit' then |
| 562 |
|
begin |
| 563 |
|
toolform := TForm_RawEdit.Create(Self); |
| 564 |
|
toolform.Caption := 'Binary .raw-Editor ' + IntToStr(tag); |
| 565 |
+ |
iconindex := 5; |
| 566 |
|
end; |
| 567 |
|
if window_context = 'txmpreplace' then |
| 568 |
|
begin |
| 569 |
|
toolform := TForm_TxmpReplace.Create(Application); |
| 570 |
|
toolform.Caption := 'TXMP Replacer ' + IntToStr(tag); |
| 571 |
+ |
iconindex := 6; |
| 572 |
|
end; |
| 573 |
|
|
| 574 |
|
if Assigned(toolform) then |
| 578 |
|
MDITab.AddTab(TForm(toolform), iconindex); |
| 579 |
|
if fileid > -1 then |
| 580 |
|
toolform.SelectFileID(fileid); |
| 581 |
+ |
Result := toolform; |
| 582 |
|
end; |
| 583 |
|
end; |
| 584 |
|
|