GrimmSpector
March 10th, 2016, 23:04
Doing this:
<framedcalculatednumber name="runevade">
<anchored to="run_label" position="below" offset="0,0" />
</framedcalculatednumber>
With this template defined in the common teomplates:
<template name="framedcalculatednumber">
<simplenumber>
<frame>
<name>fieldlight</name>
<offset>5,4,5,4</offset>
</frame>
<readonly />
<script>
function onInit()
emptymodifierWidget = addBitmapWidget("tempmod");
emptymodifierWidget.setPosition("topright", 0, 0);
super.onInit();
end
</script>
</simplenumber>
</template>
So it should have a frame and a widget image...but it doesn't, it looks just like I did this:
<simplenumber name="runevade">
<anchored to="run_label" position="below" offset="0,0" />
<readonly />
</simplenumber>
And I don't know why, meanwhile if do this elsewhere:
<simplenumber name="score">
<anchored to="label" position="rightlow" offset="10,0" width="30" />
<font>sheetnumber</font>
<frame>
<name>fieldlight</name>
<offset>5,4,5,4</offset>
</frame>
<script>
function onInit()
emptymodifierWidget = addBitmapWidget("tempmod");
emptymodifierWidget.setPosition("topright", 0, 0);
super.onInit();
end
</script>
</simplenumber>
I get precisely what I expect, a frame behind the number with the widget image...
Anyone know what I'm doing wrong here?
<framedcalculatednumber name="runevade">
<anchored to="run_label" position="below" offset="0,0" />
</framedcalculatednumber>
With this template defined in the common teomplates:
<template name="framedcalculatednumber">
<simplenumber>
<frame>
<name>fieldlight</name>
<offset>5,4,5,4</offset>
</frame>
<readonly />
<script>
function onInit()
emptymodifierWidget = addBitmapWidget("tempmod");
emptymodifierWidget.setPosition("topright", 0, 0);
super.onInit();
end
</script>
</simplenumber>
</template>
So it should have a frame and a widget image...but it doesn't, it looks just like I did this:
<simplenumber name="runevade">
<anchored to="run_label" position="below" offset="0,0" />
<readonly />
</simplenumber>
And I don't know why, meanwhile if do this elsewhere:
<simplenumber name="score">
<anchored to="label" position="rightlow" offset="10,0" width="30" />
<font>sheetnumber</font>
<frame>
<name>fieldlight</name>
<offset>5,4,5,4</offset>
</frame>
<script>
function onInit()
emptymodifierWidget = addBitmapWidget("tempmod");
emptymodifierWidget.setPosition("topright", 0, 0);
super.onInit();
end
</script>
</simplenumber>
I get precisely what I expect, a frame behind the number with the widget image...
Anyone know what I'm doing wrong here?