@@ -460,7 +460,7 @@ function CraftSim.CRAFTQ.UI:Init()
460
460
})
461
461
462
462
local craftQueueButtonsOffsetY = - 5
463
-
463
+ local fixedButtonWidth = 180
464
464
--- @type GGUI.Button
465
465
queueTab .content .importRecipeScanButton = GGUI .Button ({
466
466
parent = queueTab .content ,
@@ -469,7 +469,7 @@ function CraftSim.CRAFTQ.UI:Init()
469
469
anchorB = " BOTTOMLEFT" ,
470
470
offsetY = craftQueueButtonsOffsetY ,
471
471
offsetX = 0 ,
472
- adjustWidth = true ,
472
+ sizeX = fixedButtonWidth ,
473
473
label = L (CraftSim .CONST .TEXT .CRAFT_QUEUE_IMPORT_RECIPE_SCAN_BUTTON_LABEL ),
474
474
initialStatusID = " Ready" ,
475
475
clickCallback = function ()
@@ -481,21 +481,34 @@ function CraftSim.CRAFTQ.UI:Init()
481
481
{
482
482
statusID = " Ready" ,
483
483
enabled = true ,
484
- adjustWidth = true ,
485
- sizeX = 15 ,
484
+ sizeX = fixedButtonWidth ,
486
485
label = L (CraftSim .CONST .TEXT .CRAFT_QUEUE_IMPORT_RECIPE_SCAN_BUTTON_LABEL ),
487
486
},
488
487
}
489
488
490
- queueTab .content .importAllProfessionsCB = GGUI .Checkbox {
491
- parent = queueTab .content , anchorParent = queueTab .content .importRecipeScanButton .frame ,
492
- label = L (CraftSim .CONST .TEXT .RECIPE_SCAN_IMPORT_ALL_PROFESSIONS_CHECKBOX_LABEL ),
493
- offsetX = 5 , anchorA = " LEFT" , anchorB = " RIGHT" ,
494
- initialValue = CraftSim .DB .OPTIONS :Get (" RECIPESCAN_IMPORT_ALL_PROFESSIONS" ),
495
- clickCallback = function (_ , checked )
496
- CraftSim .DB .OPTIONS :Save (" RECIPESCAN_IMPORT_ALL_PROFESSIONS" , checked )
497
- end ,
498
- tooltip = L (CraftSim .CONST .TEXT .RECIPE_SCAN_IMPORT_ALL_PROFESSIONS_CHECKBOX_TOOLTIP )
489
+ queueTab .content .importRecipeScanOptionsButton = GGUI .Button {
490
+ parent = queueTab .content ,
491
+ anchorPoints = { { anchorParent = queueTab .content .importRecipeScanButton .frame , anchorA = " LEFT" , anchorB = " RIGHT" , offsetX = 5 } },
492
+ cleanTemplate = true ,
493
+ buttonTextureOptions = CraftSim .CONST .BUTTON_TEXTURE_OPTIONS .OPTIONS ,
494
+ sizeX = 20 , sizeY = 20 ,
495
+ clickCallback = function (_ , _ )
496
+ MenuUtil .CreateContextMenu (UIParent , function (ownerRegion , rootDescription )
497
+ local concentrationCB = rootDescription :CreateCheckbox (
498
+ L (" RECIPE_SCAN_IMPORT_ALL_PROFESSIONS_CHECKBOX_LABEL" ),
499
+ function ()
500
+ return CraftSim .DB .OPTIONS :Get (" RECIPESCAN_IMPORT_ALL_PROFESSIONS" )
501
+ end , function ()
502
+ local value = CraftSim .DB .OPTIONS :Get (" RECIPESCAN_IMPORT_ALL_PROFESSIONS" )
503
+ CraftSim .DB .OPTIONS :Save (" RECIPESCAN_IMPORT_ALL_PROFESSIONS" , not value )
504
+ end )
505
+
506
+ concentrationCB :SetTooltip (function (tooltip , elementDescription )
507
+ GameTooltip_AddInstructionLine (tooltip ,
508
+ L (" RECIPE_SCAN_IMPORT_ALL_PROFESSIONS_CHECKBOX_TOOLTIP" ));
509
+ end );
510
+ end )
511
+ end
499
512
}
500
513
501
514
queueTab .content .addAllFirstCraftsButton = GGUI .Button ({
@@ -504,47 +517,119 @@ function CraftSim.CRAFTQ.UI:Init()
504
517
anchorA = " TOPLEFT" ,
505
518
anchorB = " BOTTOMLEFT" ,
506
519
offsetY = 0 ,
507
- adjustWidth = true ,
520
+ sizeX = fixedButtonWidth ,
508
521
label = L (CraftSim .CONST .TEXT .CRAFT_QUEUE_ADD_FIRST_CRAFTS_BUTTON_LABEL ),
509
522
clickCallback = function ()
510
523
CraftSim .CRAFTQ :AddFirstCrafts ()
511
524
end
512
525
})
513
526
527
+ queueTab .content .addAllFirstCraftsOptions = GGUI .Button {
528
+ parent = queueTab .content ,
529
+ anchorPoints = { { anchorParent = queueTab .content .addAllFirstCraftsButton .frame , anchorA = " LEFT" , anchorB = " RIGHT" , offsetX = 5 } },
530
+ cleanTemplate = true ,
531
+ buttonTextureOptions = CraftSim .CONST .BUTTON_TEXTURE_OPTIONS .OPTIONS ,
532
+ sizeX = 20 , sizeY = 20 ,
533
+ clickCallback = function (_ , _ )
534
+ MenuUtil .CreateContextMenu (UIParent , function (ownerRegion , rootDescription )
535
+ local acuityCB = rootDescription :CreateCheckbox (
536
+ L (CraftSim .CONST .TEXT .CRAFT_QUEUE_IGNORE_ACUITY_RECIPES_CHECKBOX_LABEL ),
537
+ function ()
538
+ return CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_FIRST_CRAFTS_IGNORE_ACUITY_RECIPES" )
539
+ end , function ()
540
+ local value = CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_FIRST_CRAFTS_IGNORE_ACUITY_RECIPES" )
541
+ CraftSim .DB .OPTIONS :Save (" CRAFTQUEUE_FIRST_CRAFTS_IGNORE_ACUITY_RECIPES" , not value )
542
+ end )
543
+
544
+ acuityCB :SetTooltip (function (tooltip , elementDescription )
545
+ -- GameTooltip_SetTitle(tooltip, MenuUtil.GetElementText(elementDescription));
546
+ GameTooltip_AddInstructionLine (tooltip ,
547
+ L (" CRAFT_QUEUE_IGNORE_ACUITY_RECIPES_CHECKBOX_TOOLTIP" ));
548
+ -- GameTooltip_AddNormalLine(tooltip, "Test Tooltip Normal Line");
549
+ -- GameTooltip_AddErrorLine(tooltip, "Test Tooltip Colored Line");
550
+ end );
551
+
552
+ local sparksCB = rootDescription :CreateCheckbox (
553
+ " Ignore " .. f .e (" Spark" ) .. " Recipes" ,
554
+ function ()
555
+ return CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_FIRST_CRAFTS_IGNORE_SPARK_RECIPES" )
556
+ end , function ()
557
+ local value = CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_FIRST_CRAFTS_IGNORE_SPARK_RECIPES" )
558
+ CraftSim .DB .OPTIONS :Save (" CRAFTQUEUE_FIRST_CRAFTS_IGNORE_SPARK_RECIPES" , not value )
559
+ end )
560
+
561
+ sparksCB :SetTooltip (function (tooltip , elementDescription )
562
+ GameTooltip_AddInstructionLine (tooltip ,
563
+ " Ignore recipes that require a spark reagent" );
564
+ end );
565
+ end )
566
+ end
567
+ }
568
+
514
569
queueTab .content .addPatronOrdersButton = GGUI .Button ({
515
570
parent = queueTab .content ,
516
571
anchorParent = queueTab .content .addAllFirstCraftsButton .frame ,
517
572
anchorA = " TOPLEFT" ,
518
573
anchorB = " BOTTOMLEFT" ,
519
574
offsetY = 0 ,
520
- adjustWidth = true ,
575
+ sizeX = fixedButtonWidth ,
521
576
label = L (CraftSim .CONST .TEXT .CRAFT_QUEUE_ADD_PATRON_ORDERS_BUTTON_LABEL ),
522
577
clickCallback = function ()
523
578
CraftSim .CRAFTQ :AddPatronOrders ()
524
579
end
525
580
})
526
581
527
- queueTab .content .allowConcentrationForPatronQueuingCB = GGUI .Checkbox {
582
+ queueTab .content .addPatronOrdersOptions = GGUI .Button {
528
583
parent = queueTab .content ,
529
- anchorParent = queueTab .content .addPatronOrdersButton .frame ,
530
- scale = 0.9 , anchorA = " LEFT" , anchorB = " RIGHT" , labelOptions = { text = L (CraftSim .CONST .TEXT .CRAFT_QUEUE_ADD_PATRON_ORDERS_ALLOW_CONCENTRATION_CHECKBOX ) },
531
- initialValue = CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_PATRON_ORDERS_ALLOW_CONCENTRATION" ),
532
- clickCallback = function (_ , checked )
533
- CraftSim .DB .OPTIONS :Save (" CRAFTQUEUE_PATRON_ORDERS_ALLOW_CONCENTRATION" , checked )
534
- end ,
535
- tooltip = L (CraftSim .CONST .TEXT .CRAFT_QUEUE_ADD_PATRON_ORDERS_ALLOW_CONCENTRATION_TOOLTIP ),
536
- offsetX = 5 ,
537
- }
538
-
539
- queueTab .content .ignoreAcuityRecipesCB = GGUI .Checkbox {
540
- parent = queueTab .content , anchorParent = queueTab .content .addAllFirstCraftsButton .frame ,
541
- scale = 0.9 , anchorA = " LEFT" , anchorB = " RIGHT" , labelOptions = { text = L (CraftSim .CONST .TEXT .CRAFT_QUEUE_IGNORE_ACUITY_RECIPES_CHECKBOX_LABEL ) },
542
- offsetX = 5 ,
543
- initialValue = CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_FIRST_CRAFTS_IGNORE_ACUITY_RECIPES" ),
544
- clickCallback = function (_ , checked )
545
- CraftSim .DB .OPTIONS :Save (" CRAFTQUEUE_FIRST_CRAFTS_IGNORE_ACUITY_RECIPES" , checked )
546
- end ,
547
- tooltip = L (CraftSim .CONST .TEXT .CRAFT_QUEUE_IGNORE_ACUITY_RECIPES_CHECKBOX_TOOLTIP ),
584
+ anchorPoints = { { anchorParent = queueTab .content .addPatronOrdersButton .frame , anchorA = " LEFT" , anchorB = " RIGHT" , offsetX = 5 } },
585
+ cleanTemplate = true ,
586
+ buttonTextureOptions = CraftSim .CONST .BUTTON_TEXTURE_OPTIONS .OPTIONS ,
587
+ sizeX = 20 , sizeY = 20 ,
588
+ clickCallback = function (_ , _ )
589
+ MenuUtil .CreateContextMenu (UIParent , function (ownerRegion , rootDescription )
590
+ local concentrationCB = rootDescription :CreateCheckbox (" Allow " .. f .gold (" Concentration" ),
591
+ function ()
592
+ return CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_PATRON_ORDERS_ALLOW_CONCENTRATION" )
593
+ end , function ()
594
+ local value = CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_PATRON_ORDERS_ALLOW_CONCENTRATION" )
595
+ CraftSim .DB .OPTIONS :Save (" CRAFTQUEUE_PATRON_ORDERS_ALLOW_CONCENTRATION" , not value )
596
+ end )
597
+
598
+ concentrationCB :SetTooltip (function (tooltip , elementDescription )
599
+ -- GameTooltip_SetTitle(tooltip, MenuUtil.GetElementText(elementDescription));
600
+ GameTooltip_AddInstructionLine (tooltip ,
601
+ L (" CRAFT_QUEUE_ADD_PATRON_ORDERS_ALLOW_CONCENTRATION_TOOLTIP" ));
602
+ -- GameTooltip_AddNormalLine(tooltip, "Test Tooltip Normal Line");
603
+ -- GameTooltip_AddErrorLine(tooltip, "Test Tooltip Colored Line");
604
+ end );
605
+
606
+ local sparkCB = rootDescription :CreateCheckbox (" Ignore " .. f .e (" Spark" ) .. " Recipes" ,
607
+ function ()
608
+ return CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_PATRON_ORDERS_IGNORE_SPARK_RECIPES" )
609
+ end , function ()
610
+ local value = CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_PATRON_ORDERS_IGNORE_SPARK_RECIPES" )
611
+ CraftSim .DB .OPTIONS :Save (" CRAFTQUEUE_PATRON_ORDERS_IGNORE_SPARK_RECIPES" , not value )
612
+ end )
613
+
614
+ sparkCB :SetTooltip (function (tooltip , elementDescription )
615
+ GameTooltip_AddInstructionLine (tooltip ,
616
+ " Ignore recipes that require a spark reagent" );
617
+ end );
618
+
619
+ local knowledgeCB = rootDescription :CreateCheckbox (f .bb (" Knowledge Points" ) .. " only" ,
620
+ function ()
621
+ return CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_PATRON_ORDERS_KNOWLEDGE_POINTS_ONLY" )
622
+ end , function ()
623
+ local value = CraftSim .DB .OPTIONS :Get (" CRAFTQUEUE_PATRON_ORDERS_KNOWLEDGE_POINTS_ONLY" )
624
+ CraftSim .DB .OPTIONS :Save (" CRAFTQUEUE_PATRON_ORDERS_KNOWLEDGE_POINTS_ONLY" , not value )
625
+ end )
626
+
627
+ knowledgeCB :SetTooltip (function (tooltip , elementDescription )
628
+ GameTooltip_AddInstructionLine (tooltip ,
629
+ " Only try to queue patron orders rewarding knowledge points" );
630
+ end );
631
+ end )
632
+ end
548
633
}
549
634
550
635
--- @type GGUI.Button
@@ -554,8 +639,8 @@ function CraftSim.CRAFTQ.UI:Init()
554
639
anchorA = " TOPLEFT" ,
555
640
anchorB = " BOTTOMLEFT" ,
556
641
offsetY = 0 ,
557
- adjustWidth = true ,
558
- label = L (CraftSim .CONST .TEXT .CRAFT_QUEUE_CLEAR_ALL_BUTTON_LABEL ),
642
+ sizeX = fixedButtonWidth ,
643
+ label = f . l ( L (CraftSim .CONST .TEXT .CRAFT_QUEUE_CLEAR_ALL_BUTTON_LABEL ) ),
559
644
clickCallback = function ()
560
645
CraftSim .CRAFTQ :ClearAll ()
561
646
end
@@ -1876,8 +1961,6 @@ function CraftSim.CRAFTQ.UI:UpdateCraftQueueRowByCraftQueueItem(row, craftQueueI
1876
1961
1877
1962
-- if we got npcOrderRewards than we need to delay the tooltip display data
1878
1963
1879
-
1880
-
1881
1964
if recipeData .orderData and recipeData .orderData .npcOrderRewards then
1882
1965
craftOrderInfoText = craftOrderInfoText .. L (CraftSim .CONST .TEXT .CRAFT_QUEUE_ORDER_REWARDS )
1883
1966
local craftOrderWarning = L (CraftSim .CONST .TEXT .CRAFT_QUEUE_ORDER_INFO_REAGENTS_IN_YOUR_INVENTORY )
0 commit comments