@@ -5,11 +5,35 @@ CustomFieldHotspot.CATEGORY = 200
55CustomFieldHotspot .SLICE_ID = " gui.ingameMap_other"
66CustomFieldHotspot .NAME = " CP_customFieldManager_hotspotName"
77CustomFieldHotspot .COLOR = {0.61049 , 0.56471 , 0.00303 , 1 }
8- local CustomFieldHotspot_mt = Class (CustomFieldHotspot , FarmlandHotspot )
8+ local CustomFieldHotspot_mt = Class (CustomFieldHotspot , MapHotspot )
99
1010function CustomFieldHotspot .new (customMt )
11- local self = FarmlandHotspot .new (customMt or CustomFieldHotspot_mt )
11+ local self = MapHotspot .new (customMt or CustomFieldHotspot_mt )
12+ self .width , self .height = getNormalizedScreenValues (60 , 60 )
13+ self .icon = g_overlayManager :createOverlay (" mapHotspots.miniMapField" , 0 , 0 , self .width , self .height )
14+ self .icon :setColor (unpack (HUD .COLOR .BACKGROUND_DARK ))
15+ self .clickArea = MapHotspot .getClickCircle (0.667 )
1216 self .lastName = " "
17+ local _
18+ _ , self .textSize = getNormalizedScreenValues (0 , 16 )
19+ self .textColor = { 1 , 1 , 1 }
20+ self .textColorDisabled = {
21+ 0.89627 ,
22+ 0.92158 ,
23+ 0.81485 ,
24+ 0.5
25+ }
26+ _ , self .textOffsetY = getNormalizedScreenValues (0 , 2 )
27+ self .disabled = false
28+ self .isFirstRendering = true
29+ self .name = " "
30+
31+ self .setFarmland = FarmlandHotspot .setFarmland
32+ self .getFarmland = FarmlandHotspot .getFarmland
33+ self .setOwnerFarmId = FarmlandHotspot .setOwnerFarmId
34+ self .setDisabled = FarmlandHotspot .setDisabled
35+ self .updateColors = FarmlandHotspot .updateColors
36+
1337 return self
1438end
1539
@@ -22,7 +46,7 @@ function CustomFieldHotspot:render(x, y, rotation, small)
2246 self .icon :setDimension (width + self .width )
2347 end
2448 self .lastName = name
25- CustomFieldHotspot : superClass () .render (self , x , y , rotation , small )
49+ FarmlandHotspot .render (self , x , y , rotation , small )
2650end
2751
2852function CustomFieldHotspot :setScale (scale )
@@ -33,6 +57,10 @@ function CustomFieldHotspot:getCategory()
3357 return CustomFieldHotspot .CATEGORY
3458end
3559
60+ function CustomFieldHotspot :getSortingValue ()
61+ return math.huge
62+ end
63+
3664--- @param field CustomField
3765function CustomFieldHotspot :setField (field )
3866 self .field = field
0 commit comments