示例#1
0
 def EventsDisplay(self, thumbnails, events):
     file = KelpPlugin.html_view("event", "Events")
     self.ScriptEventsDisplay(thumbnails, events, file)
     self.ThumbnailDisplay(thumbnails['screen'], file)
     file.write('</body>')
     file.write('</html>')
     file.close()
示例#2
0
 def EventsDisplay(self, thumbnails, events):
     file = KelpPlugin.html_view("event", "Events")
     self.ScriptEventsDisplay(thumbnails, events, file)
     self.ThumbnailDisplay(thumbnails['screen'], file)
     file.write('</body>')
     file.write('</html>')
     file.close()
示例#3
0
    def BroadcastDisplay(self, brod, thumbnails):
        file = KelpPlugin.html_view("broadcast", "Broadcast Receive")
        file.write('<body>')
        file.write('<h2 style="text-align:center;">Broadcast / Receive</h2>')

        #call to create HTML table
        self.broadcastHTML(brod, thumbnails, file)
        file.close()
        return 0
        '''HTML '''
    def initializationDisplay(self, changes, events):
        file = KelpPlugin.html_view("Initialization", "Initialization")
        file.write('<body>')

        events.ScriptEventsDisplay(events.thumbnails, events.types, fil)
        isEmpty = True
        for sprite in changes.keys():
            for attr in changes[sprite].keys():
                if changes[sprite][attr]:
                    isEmpty = False
                    break
        if not isEmpty:
            self.InitScriptsDisplay(events.thumbnails, changes, file)

        file.write('</body>')
        file.write('</html>')
        file.close()
示例#5
0
    def CostumeDisplay(self, cost):
        file = KelpPlugin.html_view("costume", "Costumes")
        file.write('<body>')

        # Displays sprite names and costumes
        file.write('<p>COSTUMES</p>')
        file.write('<table>')
        file.write('  <tr>')
        for sprite, value in cost.items():
            #if sprite != 'Stage':
            file.write('    <th>{0}</th>'.format(sprite))
        file.write('  </tr>')
        file.write('  <tr>')
        for sprite, values in cost.items():
            file.write('<td>')
            for value in values:
                #if sprite != 'Stage':
                file.write('    <p><img src="{0}" height="100" width="100"></p>'.format(value))
                #file.write('<p><img src="{0}"></p>'.format(value))
            file.write('</td>')
        file.write('  </tr>')
        file.write('</table>')

        self.Broadcast.broadcastHTML(self.Broadcast.help, KelpPlugin.thumbnails, file)
        isEmpty = True
        for sprite in self.Init.changes.keys():
                for attr in self.Init.changes[sprite].keys():
                        if self.Init.changes[sprite][attr]:
                                isEmpty = False
                                break
        self.Init.InitScriptsDisplay(KelpPlugin.thumbnails, self.Init.changes, file)

        file.write('</body>')
        file.write('</html>')

        file.close()
        return 0