I want to make my GUI for the item spawner list into a window and dragable like lick hack, but I cannot get it working It would be great if you could help, then I can release my menu!
The source I need to make dragable window into:
Code:
this.scrollPosition = GUI.BeginScrollView(new Rect((this.scrWidth / 2f) - (0f), 100f, 206f, 170f), this.scrollPosition, new Rect(0f, 0f, 206f, 10000f));
int num = 1;
foreach (int num2 in this.itemIdList)
{
this.itemSpawnButton(num2, num * 30);
num++;
}
Code:
void itemSpawnButton(int itemid, int y)
{
if (GUI.Button(new Rect(0f, (float)y, 180f, 30f), ItemName.getName(itemid)))
{
SpawnItems.spawnItem(itemid, 1, Camera.main.transform.position);
}
}
Im not asking for you to do it for me as I know thats just spoon feeding, All I need is to be pointed in the right direction. Im pretty sure the code needs to be changed a bit for it to work but im not experienced at all with C#