Skip to content

Commit

Permalink
Include option to randomize item boxes as double or single.
Browse files Browse the repository at this point in the history
  • Loading branch information
KillzXGaming committed May 9, 2022
1 parent cec23c7 commit b6c5838
Showing 1 changed file with 12 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,24 @@ public MapObjectToolMenu(ObjectEditor editor) {

public void Render()
{
/* var toolMenus = Editor.GetToolMenuItems();
var editMenus = Editor.GetEditMenuItems();
if (ImGui.Button("Randomize Double Item Boxes (Deluxe Only)"))
RandomizeDoubleItemBoxes();
}

var size = new System.Numerics.Vector2(150, 22);*/
private void RandomizeDoubleItemBoxes()
{
Random rnd = new Random();

/* if (toolMenus.Count > 0 && ImGui.CollapsingHeader("Tools", ImGuiTreeNodeFlags.DefaultOpen))
foreach (var obj in Editor.Root.Children)
{
foreach (var menu in toolMenus)
var objData = obj.Tag as Obj;
if (objData.ObjId == 1013)
{
if (ImGui.Button(menu.Header, size)) {
menu.Command.Execute(menu);
}
//Param 1 for double item boxes
//0 = single. 1 = double
objData.Params[0] = rnd.Next(0, 1);
}
}
if (editMenus.Count > 0 && ImGui.CollapsingHeader("Actions", ImGuiTreeNodeFlags.DefaultOpen))
{
foreach (var menu in editMenus)
{
if (ImGui.Button(menu.Header, size)) {
menu.Command.Execute(menu);
}
}
}*/
}
}
}

0 comments on commit b6c5838

Please sign in to comment.