Mod Tool/Scripting: Difference between revisions

m
how to add a button on a PPG
m (loading objects on OnStartup seems buggy)
m (how to add a button on a PPG)
Line 1,106: Line 1,106:


===PPG content===
===PPG content===
====Button====
If you need quote signs in the Logic section you write two signs: "" (Not shown in example.)
oPPGLayout.AddButton("btnFuncName", "click here to trigger afunction").setAttribute siUICX, 200
oPPGLayout.Logic = " sub btnFuncName_OnClicked" & vbCrlf & _
" btnFuncNameReal" & vbCrlf & _
" end sub"
function btnFuncNameReal
logmessage "hello world"
end function
New lines in Logic need
& vbCrlf & _
on the earlier line.
====Text input====
====Text input====
  oPSet.AddParameter3 "ParamName", siString
  oPSet.AddParameter3 "ParamName", siString
8,452

edits