Обновление диапазонов секторов
This commit is contained in:
32
fs.gd
32
fs.gd
@@ -5,13 +5,13 @@ const btn_txr1: Texture2D = preload('res://grey.png')
|
||||
const btn_txr2: Texture2D = preload('res://blue.png')
|
||||
const btn_txr3: Texture2D = preload('res://red.png')
|
||||
|
||||
const BANDS: Array = [[400, 1200],
|
||||
[1200, 2000],
|
||||
[2000, 2800],
|
||||
[2800, 3600],
|
||||
[3600, 4400],
|
||||
[4400, 5200],
|
||||
[5200, 6000]
|
||||
const BANDS: Array = [[370, 800],
|
||||
[800, 1065],
|
||||
[1065, 1180],
|
||||
[1180, 1450],
|
||||
[1450, 2000],
|
||||
[2000, 3500],
|
||||
[3500, 6000]
|
||||
]
|
||||
const SECTORS: Array = [[314.5, 44.5],
|
||||
[44.5, 134.5],
|
||||
@@ -98,13 +98,13 @@ class Fs:
|
||||
var sector: int
|
||||
var litera: int
|
||||
var interfer = null
|
||||
|
||||
|
||||
func _init(sec, lit, id):
|
||||
nmfs = id
|
||||
litera = lit
|
||||
sector = sec
|
||||
isg = 1
|
||||
|
||||
|
||||
func fs_off():
|
||||
freq = ''
|
||||
pow = ''
|
||||
@@ -116,34 +116,34 @@ class Fs:
|
||||
btn.set_texture_normal(btn_txr0)
|
||||
elif isg == 2:
|
||||
btn.set_texture_normal(btn_txr1)
|
||||
|
||||
|
||||
|
||||
|
||||
func init_lbls(tab, x0, y0):
|
||||
for i in range(len(LBLS_SEC)):
|
||||
var lbl_sec = Label.new()
|
||||
tab.add_child(lbl_sec)
|
||||
lbl_sec.position = Vector2(x0 - 100, y0 - 5 + i * 50)
|
||||
lbl_sec.text = LBLS_SEC[i]
|
||||
|
||||
|
||||
for i in range(len(LBLS_LIT)):
|
||||
var lbl_lit = Label.new()
|
||||
tab.add_child(lbl_lit)
|
||||
lbl_lit.position = Vector2(x0 -5 + i * 50, y0 - 25)
|
||||
lbl_lit.text = LBLS_LIT[i]
|
||||
|
||||
|
||||
for i in range(len(LBLS_PARAM)):
|
||||
var lbl_param = Label.new()
|
||||
tab.add_child(lbl_param)
|
||||
lbl_param.position = Vector2(x0 + 350, y0 - 25 + i * 25)
|
||||
lbl_param.text = LBLS_PARAM[i]
|
||||
|
||||
|
||||
for i in range(len(LBLS_PARAM) - 1):
|
||||
var lbl_param_val = Label.new()
|
||||
tab.add_child(lbl_param_val)
|
||||
lbls_param_val.append(lbl_param_val)
|
||||
lbl_param_val.position = Vector2(x0 + 600, y0 - 25 + i * 25)
|
||||
lbl_param_val.text = ''
|
||||
|
||||
|
||||
tab.add_child(g_opt_btn)
|
||||
g_opt_btn.position = Vector2(x0 + 550, y0 - 5 + 150)
|
||||
for opt in OPT_BTN_TEXT:
|
||||
@@ -228,7 +228,7 @@ func set_fs(interfer: Interfers.Interfer):
|
||||
for i in range(len(BANDS)):
|
||||
if (float(freq) >= BANDS[i][0]) and (float(freq) <= BANDS[i][1]):
|
||||
lit = i+1
|
||||
|
||||
|
||||
if (float(interfer.options['kni']) < 0) or (float(interfer.options['kni'] > 360)):
|
||||
fs_of_old(interfer)
|
||||
return 2
|
||||
|
||||
Reference in New Issue
Block a user