System editor - bottom bar

Discussion in 'Support!' started by Raevn, September 6, 2013.

  1. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    In system_editor.html, there is repeated html where all the biome "build" icons are manually specified. The following snippet can replace all of this, re-using the biomes array to dynamically build the bottom bar.

    Code:
    <!-- ko foreach: biomes -->
    <div class="div_build_item" data-bind="click: function () { $parent.addPlanet($data) }, event: { mouseover: function () { $parent.buildBarHover($data.toUpperCase() + ' TEMPLATE') }}">
        <a href="#">
            <img data-bind="attr: { src: '../shared/img/' + $data + '.png'}" class="img_build_unit" />
        </a>
    </div>
    <!-- /ko -->
    
    Hope this is useful :)
    infuscoletum likes this.
  2. infuscoletum

    infuscoletum Active Member

    Messages:
    606
    Likes Received:
    37
    Aaaaaaaaaaand there's the 3rd piece of code that raevn contributes to official pa! :cool:

Share This Page