Prayer Form¶
A TLazForm utility to aid in prayer selection settings.
This will setup a TLazButton which opens a TLazForm that mimics the prayer tab and allows a user to select prayers to be used.
EPrayer.GetInterfering¶
function EPrayer.GetInterfering(): TPrayerSet;
The prayers that can’t be active at the same time as this one, including itself. Activating a prayer in game turns all of these off.
Example:
WriteLn EPrayer.PIETY.GetInterfering();
TPrayerLayout¶
Type that represents a named set of prayers, as saved by ScriptForm.CreatePrayerTab.
TPrayerLayout.ToJSON¶
function TPrayerLayout.ToJSON(): TJSONItem;
Convert the TPrayerLayout into a TJSONItem.
Prayers are saved by name so the saved layouts don’t depend on the order of EPrayer.
TPrayerLayoutFormHelper¶
The TPrayerLayoutFormHelper type is, as it’s name implies a helper type for the
prayer layouts tab made by ScriptForm.CreatePrayerTab.
It has a lot of methods and callbacks that are hidden by default and won’t be mentioned on this page because they are internal methods you shouldn’t touch.
PrayerLayoutForm.CreatePrayerCombobox¶
function TPrayerLayoutFormHelper.CreatePrayerCombobox(owner: Pointer; caption: String = 'Prayer Layout:'; left, top: Integer = 0): TLazComboBox;
This will create a combobox for you whose contents auto-update with changes made
on the prayer layouts tab. The combobox ItemIndex is the index of the layout in PrayerLayoutForm.Layouts.
PrayerLayoutForm variable¶
Global TPrayerLayoutFormHelper variable.
ScriptForm.CreatePrayerTab¶
function TScriptForm.CreatePrayerTab(): TLazTabSheet;
Sets up a TLazTabSheet on your TScriptForm to configure prayer layouts, named sets of prayers
your script can activate with Prayer.Activate.
Example:
{$I WaspLib/main.simba}
var
form: TScriptForm;
begin
form.Setup();
form.CreatePrayerTab();
form.Run();
end.
For a more complete example check out the file Simba/Includes/WaspLib/examples/prayer_form.simba.