Change some drone column stuff

This commit is contained in:
cncfanatics
2010-09-04 21:11:54 +02:00
parent fe016a881e
commit 635e904a58
3 changed files with 40 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
__all__ = ["moduleState", "moduleNameOrSlot", "attributeDisplay", "maxRange", "name", "droneDps"]
__all__ = ["moduleState", "moduleNameOrSlot", "attributeDisplay", "maxRange",
"name", "droneDps", "droneNameAmount"]
columns = {}
def registerColumn(column):

View File

@@ -0,0 +1,37 @@
#===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pyfa is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
#===============================================================================
from gui import builtinViewColumns
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from eos.types import Slot
class DroneNameAmount(ViewColumn):
name = "Drone Name/Amount"
def __init__(self, fittingView, params):
ViewColumn.__init__(self, fittingView)
self.columnText = "Name"
def getText(self, drone):
return "%dX %s (%d Active)" % (drone.amount, stuff.item.name, drone.amountActive)
def getImageId(self, mod):
return -1
builtinViewColumns.registerColumn(DroneNameAmount)

View File

@@ -24,7 +24,7 @@ import gui.fittingView as fv
import gui.builtinViewColumns.display as d
class DroneView(d.Display):
DEFAULT_COLS = ["Name",
DEFAULT_COLS = ["Drone Name/Amount",
"Drone DPS",
"Max range",
"attr:trackingSpeed",