Merge pull request #107 from Caraxi/search-from-command

Allow xlitem searching from command
This commit is contained in:
goaaats 2020-05-03 16:35:56 +02:00 committed by GitHub
commit a086ad47ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -559,7 +559,7 @@ namespace Dalamud {
private bool isImguiDrawItemSearchWindow;
private void OnItemLinkCommand(string command, string arguments) {
this.itemSearchCommandWindow = new ItemSearchWindow(this.Data, new UiBuilder(this.InterfaceManager, "ItemSearcher"), false);
this.itemSearchCommandWindow = new ItemSearchWindow(this.Data, new UiBuilder(this.InterfaceManager, "ItemSearcher"), false, arguments);
this.itemSearchCommandWindow.OnItemChosen += (sender, item) => {
var hexData = new byte[] {
0x02, 0x13, 0x06, 0xFE, 0xFF, 0xF3, 0xF3, 0xF3, 0x03, 0x02, 0x27, 0x07, 0x03, 0xF2, 0x3A, 0x2F,

View file

@ -41,10 +41,11 @@ namespace Dalamud.Interface
public event EventHandler<Item> OnItemChosen;
public ItemSearchWindow(DataManager data, UiBuilder builder, bool closeOnChoose = true) {
public ItemSearchWindow(DataManager data, UiBuilder builder, bool closeOnChoose = true, string searchText = "") {
this.data = data;
this.builder = builder;
this.closeOnChoose = closeOnChoose;
this.searchText = searchText;
while (!data.IsDataReady)
Thread.Sleep(1);