
 Re: Custom Pie Menu Options
It's really simple. Just look at the coalition grenade launcher or one of the many other things that uses pie buttons and follow along.
That said, here's a brief runthrough:
To the ini, add (with correct tabbing):
Code:
   AddPieSlice = Slice
      Description = *Name of Pie Slice*
      Direction = 1
      Icon = Icon
         PresetName = *Name of Pie Slice Icon (probably unimportant)*
         FrameCount = *# Of Frames*
         BitmapFile = ContentFile
            FilePath = *Filepath here*
      ScriptPath = *Scriptpath here*
      FunctionName = *Name_of_Lua_Function_to_Call*
And then you make a lua script with the specified filepath and do things from there. Generally people use the pie button to change the sharpness and have a main script on whatever's being affected that does different things based on sharpness. E.g. for a button that'll toggle back and forth between two modes:
Code:
function Name_of_Lua_Function_to_Call(self)
   if self.Sharpness == 0 then
      self.Sharpness = 1;
   elseif self.Sharpness == 1 then
      self.Sparness = 0;
   end
end
--The main script for the object is below
function Create(self)
...
end
function Update(self)
   if self.Sharpness == 0 then
      ...
   elseif self.Sharpness == 1 then
      ...
   end
end