FANDOM


A KON file is an XML file with the ".KON" file extension that is used to define a Widget. Every Widget must have exactly one KON file. Most publicly released Widgets "hide" their KON files inside a Widget file.

SyntaxEdit

XML syntax is pretty simple to learn, especially if you are familiar with another markup language, such as HTML. It's probably simplest to learn by example.


ExamplesEdit

The first two examples below do exactly the same thing, using rather different styles of XML.

Atribute-centric exampleEdit

Attribute-centric means that the XML is written with a preference for using XML "attributes" instead of "elements," where possible.

<widget debug="on">
  <window name="main" width="320" height="240">
    <image name="background" src="Resources/background.png"
           opacity="127"
           hOffset="0" vOffset="0" width="320" height="240"
           onMouseEnter="background.opacity = 255;"
           onMouseExit="background.opacity = 127;" />
  </window>
</widget>

Element-centric exampleEdit

Element-centric means that the XML is written with a preference for using XML "elements" instead of "attributes," where possible.

<widget>
  <debug>on</debug>
  <window>
    <name>main</name>
    <width>320</width>
    <height>240</height>
    
    <image>
      <name>background</name>
      <src>Resources/background.png</src>
      <opacity>127</opacity>
      <hOffset>0</hOffset>
      <vOffset>0</vOffset>
      <width>320</width>
      <height>240</height>
      <onMouseEnter>background.opacity = 255;</onMouseEnter>
      <onMouseExit>background.opacity = 127;</onMouseExit>
    </image>
    
  </window>
</widget>

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.