mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge pull request #107 from Caraxi/search-from-command
Allow xlitem searching from command
This commit is contained in:
commit
a086ad47ac
2 changed files with 3 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue