Skip to content

Commit

Permalink
rebuild malady record window due to deprecated templates
Browse files Browse the repository at this point in the history
  • Loading branch information
bmos committed Feb 24, 2024
1 parent 28873a2 commit 14ce516
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 61 deletions.
63 changes: 7 additions & 56 deletions campaign/record_madness.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,73 +3,24 @@
<!-- Please see the LICENSE.md file included with this distribution for attribution and copyright information. -->

<root>
<windowclass name="referencemadness">
<frame>recordsheet</frame>
<windowclass name="referencemadness" copy="record_window">
<placement>
<size width="400" height="600" />
<size width="500" height="475" />
</placement>
<sizelimits>
<minimum width="400" height="400" />
<minimum width="475" height="450" />
<dynamic />
</sizelimits>
<tooltip field="name" />
<nodelete />
<playercontrol />
<sharable />
<script>
function onLockChanged()
if header.subwindow then
header.subwindow.update()
end
if content.subwindow then
content.subwindow.update()
end
function onDrop(x, y, draginfo)
UtilityManagerADND.onDropStory(x, y, draginfo,getDatabaseNode());
end
</script>
<sheetdata>
<sub_record_header name="header">
<class>ref_madness_header</class>
</sub_record_header>

<frame_record_content />
<subwindow_record name="content">
<class>ref_madness_stats</class>
<activate />
</subwindow_record>
<scrollbar_content />

<resize_recordsheet />
<close_recordsheet />
</sheetdata>
</windowclass>

<windowclass name="ref_madness_header">
<margins control="0,0,0,7" />
<script>
function onInit()
update()
end
function update()
local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode())
name.setReadOnly(bReadOnly)
end
</script>
<sheetdata>
<link_record_header>
<class>referencemadness</class>
</link_record_header>

<anchor_record_header_right />
<icon_record_locked />
<button_record_locked />
<windowclass name="referencemadness_header" copy="record_header" />

<string_record_name name="name">
<empty textres="library_recordtype_empty_madness" />
</string_record_name>
</sheetdata>
</windowclass>

<windowclass name="ref_madness_stats">
<windowclass name="referencemadness_main">
<script file="campaign/scripts/ref_madness_stats.lua" />
<sheetdata>
<anchor_column name="columnanchor" />
Expand Down
13 changes: 10 additions & 3 deletions campaign/scripts/ref_madness_stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
-- Please see the LICENSE.md file included with this distribution for attribution and copyright information.
--
-- luacheck: globals update save_string subtype
function onInit()
update()
end

function update()
if super and super.update then
super.update()
end
local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode())

if bReadOnly then
Expand Down Expand Up @@ -62,3 +62,10 @@ function update()
dormancy.update(bReadOnly)
description.update(bReadOnly)
end

function onInit()
if super and super.onInit then
super.onInit()
end
update()
end
4 changes: 2 additions & 2 deletions extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<root version='3.3' release='3'>
<properties>
<name>Feature: Sanity Tracker</name>
<version>1.11</version>
<version>1.12</version>
<author>bmos (Wil Thieme)</author>
<description>This FantasyGrounds extension helps track sanity effects as described in Paizo's Horror Adventures rulebook.</description>
<loadorder>50</loadorder>
Expand All @@ -17,7 +17,7 @@
</ruleset>
</properties>

<announcement text="https://github.com/bmos/PFRPG-Sanity-Tracker\rPFRPG Sanity Tracker v1.11:\rThis extension helps calculate and track sanity and madnesses." icon="SanityLogo" font="emotefont" />
<announcement text="https://github.com/bmos/PFRPG-Sanity-Tracker\rPFRPG Sanity Tracker v1.12:\rThis extension helps calculate and track sanity and madnesses." icon="SanityLogo" font="emotefont" />

<base>
<!-- Graphics -->
Expand Down

0 comments on commit 14ce516

Please sign in to comment.