B737-800X (ZIBO mod)のB737-800X_3_36_fullバージョンで作成した自作プラグインです。
左から、スピードブレーキ、逆噴射、パーキングブレーキ、ワイパー、NDモードセレクター、NDレンジセレクター、パネルブライト、オーバーヘッドパネルブライト、COM1、NAV1、BARO、トランスポンダ等、下段にはライトのスイッチをコントロールできます。
これはデフォルトのB737-800では表示されません。つまり使えないということです。
B737-800X_SW.lua
-- B737-800X Zibo専用、他ではlaminarのdataref関係でエラーになるので使用できない。
if PLANE_TAILNUMBER == "ZB738" then
require "graphics"
local origin = -1 --上と右が原点になるとマイナスになる。
local x1 = origin -1500 --枠の全体位置を移動(-を増やすと左へ)
local y1 = origin -30 --枠の全体位置を移動(-を増やすと下へ)
local x2 = origin -1500
local y2 = origin -30
local delay_time = os.clock()
dataref("SpeedBrake_SW", "laminar/B738/flt_ctrls/speedbrake_lever","writable")
dataref("RevThrust_SW", "laminar/B738/engine/prop_mode_sync")
dataref("ParkBrake_SW", "laminar/B738/parking_brake_pos")
dataref("Wiper_left_SW", "laminar/B738/switches/left_wiper_pos")
dataref("Wiper_right_SW", "laminar/B738/switches/right_wiper_pos")
dataref("Map_mode_SW", "laminar/B738/EFIS_control/capt/map_mode_pos")
dataref("Map_renge_SW", "laminar/B738/EFIS/capt/map_range")
dataref("Transponder_Knob", "laminar/B738/knob/transponder_pos")
dataref("Transponder_code", "sim/cockpit2/radios/actuators/transponder_code")
--dataref("Baro_Knob", "sim/cockpit2/gauges/actuators/barometer_setting_in_hg_pilot")
dataref("Baro_Knob", "laminar/B738/EFIS/baro_sel_in_hg_pilot","writable")
dataref("Com1_frequency_Mhz", "sim/cockpit2/radios/actuators/com1_frequency_Mhz")
dataref("Com1_frequency_khz", "sim/cockpit2/radios/actuators/com1_frequency_khz")
dataref("Com1_standby_frequency_Mhz", "sim/cockpit2/radios/actuators/com1_standby_frequency_Mhz")
dataref("Com1_standby_frequency_khz", "sim/cockpit2/radios/actuators/com1_standby_frequency_khz")
dataref("Nav1_frequency_Mhz", "sim/cockpit2/radios/actuators/nav1_frequency_Mhz")
dataref("Nav1_frequency_khz", "sim/cockpit2/radios/actuators/nav1_frequency_khz")
dataref("Nav1_standby_frequency_Mhz", "sim/cockpit2/radios/actuators/nav1_standby_frequency_Mhz")
dataref("Nav1_standby_frequency_khz", "sim/cockpit2/radios/actuators/nav1_standby_frequency_khz")
dataref("StrobeLight", "sim/cockpit2/switches/strobe_lights_on")
dataref("SteadyLight", "sim/cockpit2/switches/navigation_lights_on")
dataref("PositionLight", "laminar/B738/toggle_switch/position_light_pos")
dataref("AntiCollisionLight", "sim/cockpit2/switches/beacon_on")
local Brightness = dataref_table("laminar/B738/electric/panel_brightness") --配列、メインパネルブライト[0]、オーバーヘッドパネルブライト[2]
local Landing_SW = dataref_table("sim/cockpit2/switches/landing_lights_switch") --配列、[0]~[3]
local Generic_lights_SW = dataref_table("sim/cockpit2/switches/generic_lights_switch") --配列、多数使用
local Generic_lights_switch = dataref_table("sim/cockpit2/switches/generic_lights_switch") --配列[6][7]
local warning = load_WAV_file(SCRIPT_DIRECTORY .. "sounds/boarding music.wav")
local playing = false
--dataref("caution", "sim/cockpit2/switches/strobe_lights_on")
let_sound_loop(warning, false) --サウンドを繰り返す場合はこれをtrueにする、起動時も再生される。
function draw_quick_settings()
-- マウスが反応するスペース。この範囲でマウスを持っていくと描画画面が出てくる。
if MOUSE_X > (SCREEN_WIDTH + x1)+1000 or MOUSE_X < (SCREEN_WIDTH + x1) or MOUSE_Y > (SCREEN_HIGHT + y1) or MOUSE_Y < (SCREEN_HIGHT + y1)-130 then
return
end
-- グラフィックシステムを初期化する
XPLMSetGraphicsState(0,0,0,1,1,0,0)
-- 透明な背景を描く
graphics.set_color(0, 0, 0, 0.5) --長方形の色(きみどり)、透明度
--上と右を原点にするにはSCREEN_WIDTHとSCREEN_HIGHTを加えて、数値をマイナスで入れると良い。
--右の位置、下の位置、左の位置、上の位置
graphics.draw_rectangle((SCREEN_WIDTH+x1), (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x1)+1000, (SCREEN_HIGHT+y1)-130) --長方形を描く
-- 線を引きます
graphics.set_color(0, 1, 0, 0.5) --線の色
graphics.set_width(2) --線の太さ
--横ライン(X軸、+増で右へ移動)
graphics.draw_line((SCREEN_WIDTH+x1), (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+1000, (SCREEN_HIGHT+y2)) --一番上のライン
graphics.draw_line((SCREEN_WIDTH+x1), (SCREEN_HIGHT+y1)-100, (SCREEN_WIDTH+x2)+1000, (SCREEN_HIGHT+y2)-100) --2番目のライン
graphics.draw_line((SCREEN_WIDTH+x1), (SCREEN_HIGHT+y1)-130, (SCREEN_WIDTH+x2)+1000, (SCREEN_HIGHT+y2)-130) --一番下のライン
--縦ライン
graphics.draw_line((SCREEN_WIDTH+x1), (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2), (SCREEN_HIGHT+y2)-100) --左縦ライン
graphics.draw_line((SCREEN_WIDTH+x1)+100, (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+100, (SCREEN_HIGHT+y2)-100) --分離縦線
graphics.draw_line((SCREEN_WIDTH+x1)+200, (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+200, (SCREEN_HIGHT+y2)-100)
graphics.draw_line((SCREEN_WIDTH+x1)+300, (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+300, (SCREEN_HIGHT+y2)-100)
graphics.draw_line((SCREEN_WIDTH+x1)+400, (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+400, (SCREEN_HIGHT+y2)-100)
graphics.draw_line((SCREEN_WIDTH+x1)+500, (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+500, (SCREEN_HIGHT+y2)-100)
graphics.draw_line((SCREEN_WIDTH+x1)+600, (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+600, (SCREEN_HIGHT+y2)-100) --右縦ライン
graphics.draw_line((SCREEN_WIDTH+x1)+700, (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+700, (SCREEN_HIGHT+y2)-100)
graphics.draw_line((SCREEN_WIDTH+x1)+800, (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+800, (SCREEN_HIGHT+y2)-100)
graphics.draw_line((SCREEN_WIDTH+x1)+900, (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+900, (SCREEN_HIGHT+y2)-100)
graphics.draw_line((SCREEN_WIDTH+x1)+1000, (SCREEN_HIGHT+y1), (SCREEN_WIDTH+x2)+1000, (SCREEN_HIGHT+y2)-100)
-------------------------------------------------------------------------
--Speed Brake マウスが乗ったとき、スイッチがオンになったとき、ボタンの色の変化RevThrust_SW
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+4 and MOUSE_X < (SCREEN_WIDTH+x1)+96 and MOUSE_Y > (SCREEN_HIGHT+y1)-32 and MOUSE_Y < (SCREEN_HIGHT+y1)-4 then
graphics.set_color(0 , 1 , 0, 0.4)
else
graphics.set_color(0 , 1 , 0, 0.1)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+4, (SCREEN_HIGHT+y1)-4, (SCREEN_WIDTH+x1)+96, (SCREEN_HIGHT+y1)-32) --長方形を描く Speed Brake
if SpeedBrake_SW == 1 then
graphics.set_color(0 , 1 , 0, 0.4)
else
graphics.set_color(0 , 1 , 0, 0.1)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+4, (SCREEN_HIGHT+y1)-4, (SCREEN_WIDTH+x1)+96, (SCREEN_HIGHT+y1)-32) --長方形を描く Speed Brake
-------------------------------------------------------------------------
--ReverseThrust マウスが乗ったとき、スイッチがオンになったとき、ボタンの色の変化
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+4 and MOUSE_X < (SCREEN_WIDTH+x1)+96 and MOUSE_Y > (SCREEN_HIGHT+y1)-64 and MOUSE_Y < (SCREEN_HIGHT+y1)-36 then
graphics.set_color(0 , 1 , 0, 0.4)
else
graphics.set_color(0 , 1 , 0, 0.1)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+4, (SCREEN_HIGHT+y1)-36, (SCREEN_WIDTH+x1)+96, (SCREEN_HIGHT+y1)-64) --長方形を描く ReverseThrust
if RevThrust_SW == 1 then
graphics.set_color(0 , 1 , 0, 1)
else
graphics.set_color(0 , 1 , 0, 0.1)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+4, (SCREEN_HIGHT+y1)-36, (SCREEN_WIDTH+x1)+96, (SCREEN_HIGHT+y1)-64) --長方形を描く ReverseThrust
-------------------------------------------------------------------------
--Parking Brake マウスが乗ったとき、スイッチがオンになったとき、ボタンの色の変化
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+4 and MOUSE_X < (SCREEN_WIDTH+x1)+96 and MOUSE_Y > (SCREEN_HIGHT+y1)-96 and MOUSE_Y < (SCREEN_HIGHT+y1)-68 then
graphics.set_color(0 , 1 , 0, 0.4)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+4, (SCREEN_HIGHT+y1)-68, (SCREEN_WIDTH+x1)+96, (SCREEN_HIGHT+y1)-96) --長方形を描く ReverseThrust
if ParkBrake_SW == 1 then
graphics.set_color(1 , 0 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.1)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+4, (SCREEN_HIGHT+y1)-68, (SCREEN_WIDTH+x1)+96, (SCREEN_HIGHT+y1)-96) --長方形を描く ReverseThrust
draw_string((SCREEN_WIDTH+x1)+15, (SCREEN_HIGHT+y1)-21, "Speed Brake")
draw_string((SCREEN_WIDTH+x1)+9, (SCREEN_HIGHT+y1)-53, "ReverseThrust")
draw_string((SCREEN_WIDTH+x1)+11, (SCREEN_HIGHT+y1)-85, "Parking Brake")
graphics.set_color(1 , 1 , 1, 1)
draw_string_Helvetica_12((SCREEN_WIDTH+x1)+3, (SCREEN_HIGHT+y1)+5, "B737-800X Zibo")
-------------------------------------------------------------------------
--ワイパー ノブの描画
-------------------------------------------------------------------------
--クリックスぺースにマウスをもっていったときの色(左右分)
if MOUSE_X > (SCREEN_WIDTH+x1)+100 and MOUSE_X < (SCREEN_WIDTH+x1)+150 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+100, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+150, (SCREEN_HIGHT+y1)-100) --長方形を描く
if MOUSE_X > (SCREEN_WIDTH+x1)+150 and MOUSE_X < (SCREEN_WIDTH+x1)+200 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+150, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+200, (SCREEN_HIGHT+y1)-100) --長方形を描く
--ノブの指針をdataref値に合わせる
graphics.set_color(0.7961 ,0.8706 ,0.7882, 1)
if Wiper_left_SW == 0 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+135, (SCREEN_HIGHT+y1)-62, 0, 26, 8) --三角
elseif Wiper_left_SW == 1 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+135, (SCREEN_HIGHT+y1)-62, 45, 26, 8) --三角
elseif Wiper_left_SW == 2 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+135, (SCREEN_HIGHT+y1)-62, 90, 26, 8) --三角
else
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+135, (SCREEN_HIGHT+y1)-62, 135, 26, 8) --三角
end
--ノブの円描画
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+135, (SCREEN_HIGHT+y1)-62, 20) --円
graphics.set_color(0.7961 ,0.8706 ,0.7882, 1)
graphics.draw_circle((SCREEN_WIDTH+x1)+135, (SCREEN_HIGHT+y1)-62, 20, 2) --円
--ノブのテキスト
draw_string((SCREEN_WIDTH+x1)+123, (SCREEN_HIGHT+y1)-15, "-- WIPER --")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+120, (SCREEN_HIGHT+y1)-32, "PARK")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+157, (SCREEN_HIGHT+y1)-42, "INT")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+163, (SCREEN_HIGHT+y1)-64, "LOW")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+155, (SCREEN_HIGHT+y1)-87, "HIGH")
-------------------------------------------------------------------------
--CTR ノブの描画
-------------------------------------------------------------------------
--クリックスぺースにマウスをもっていったときの色(左右分)
if MOUSE_X > (SCREEN_WIDTH+x1)+200 and MOUSE_X < (SCREEN_WIDTH+x1)+250 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+200, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+250, (SCREEN_HIGHT+y1)-100) --長方形を描く
if MOUSE_X > (SCREEN_WIDTH+x1)+250 and MOUSE_X < (SCREEN_WIDTH+x1)+300 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+250, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+300, (SCREEN_HIGHT+y1)-100) --長方形を描く
--ノブの指針をdataref値に合わせる
graphics.set_color(0.7961 ,0.8706 ,0.7882, 1)
if Map_mode_SW == 0 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+250, (SCREEN_HIGHT+y1)-62, 315, 26, 8) --三角
elseif Map_mode_SW == 1 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+250, (SCREEN_HIGHT+y1)-62, 345, 26, 8) --三角
elseif Map_mode_SW == 2 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+250, (SCREEN_HIGHT+y1)-62, 15, 26, 8) --三角
else
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+250, (SCREEN_HIGHT+y1)-62, 45, 26, 8) --三角
end
--ノブの円描画
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+250, (SCREEN_HIGHT+y1)-62, 20) --円
graphics.set_color(0.7961 ,0.8706 ,0.7882, 1)
graphics.draw_circle((SCREEN_WIDTH+x1)+250, (SCREEN_HIGHT+y1)-62, 20, 2) --円
--ノブのテキスト
draw_string((SCREEN_WIDTH+x1)+227, (SCREEN_HIGHT+y1)-15, "-- CTR --")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+208, (SCREEN_HIGHT+y1)-45, "APP")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+223, (SCREEN_HIGHT+y1)-32, "VOR")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+256, (SCREEN_HIGHT+y1)-32, "MAP")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+272, (SCREEN_HIGHT+y1)-45, "PLN")
-------------------------------------------------------------------------
--TFC ノブの描画
-------------------------------------------------------------------------
--クリックスぺースにマウスをもっていったときの色(左右分)
if MOUSE_X > (SCREEN_WIDTH+x1)+300 and MOUSE_X < (SCREEN_WIDTH+x1)+350 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+300, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+350, (SCREEN_HIGHT+y1)-100) --長方形を描く
if MOUSE_X > (SCREEN_WIDTH+x1)+350 and MOUSE_X < (SCREEN_WIDTH+x1)+400 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+350, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+400, (SCREEN_HIGHT+y1)-100) --長方形を描く
--ノブの指針をdataref値に合わせる
graphics.set_color(0.7961 ,0.8706 ,0.7882, 1)
if Map_renge_SW == 0 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+346, (SCREEN_HIGHT+y1)-62, 270, 26, 8) --三角
elseif Map_renge_SW == 1 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+346, (SCREEN_HIGHT+y1)-62, 300, 26, 8) --三角
elseif Map_renge_SW == 2 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+346, (SCREEN_HIGHT+y1)-62, 330, 26, 8) --三角
elseif Map_renge_SW == 3 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+346, (SCREEN_HIGHT+y1)-62, 0, 26, 8) --三角
elseif Map_renge_SW == 4 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+346, (SCREEN_HIGHT+y1)-62, 30, 26, 8) --三角
elseif Map_renge_SW == 5 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+346, (SCREEN_HIGHT+y1)-62, 60, 26, 8) --三角
elseif Map_renge_SW == 6 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+346, (SCREEN_HIGHT+y1)-62, 90, 26, 8) --三角
else
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+346, (SCREEN_HIGHT+y1)-62, 120, 26, 8) --三角
end
--ノブの円描画
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+346, (SCREEN_HIGHT+y1)-62, 20) --円
graphics.set_color(0.7961 ,0.8706 ,0.7882, 1)
graphics.draw_circle((SCREEN_WIDTH+x1)+346, (SCREEN_HIGHT+y1)-62, 20, 2) --円
--ノブのテキスト
draw_string((SCREEN_WIDTH+x1)+325, (SCREEN_HIGHT+y1)-15, "-- TFC --")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+309, (SCREEN_HIGHT+y1)-65, "5")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+307, (SCREEN_HIGHT+y1)-50, "10")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+320, (SCREEN_HIGHT+y1)-37, "20")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+339, (SCREEN_HIGHT+y1)-33, "40")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+358, (SCREEN_HIGHT+y1)-37, "80")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+372, (SCREEN_HIGHT+y1)-50, "160")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+375, (SCREEN_HIGHT+y1)-65, "320")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+373, (SCREEN_HIGHT+y1)-80, "640")
-------------------------------------------------------------------------
--MAIN PANEL BRIGHTNESS ノブの描画
-------------------------------------------------------------------------
--左半分
if MOUSE_X > (SCREEN_WIDTH+x1)+400 and MOUSE_X < (SCREEN_WIDTH+x1)+450 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+400, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+450, (SCREEN_HIGHT+y1)-100) --長方形を描く
if MOUSE_X > (SCREEN_WIDTH+x1)+450 and MOUSE_X < (SCREEN_WIDTH+x1)+500 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+450, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+500, (SCREEN_HIGHT+y1)-100) --長方形を描く
--1段目(BACKGROUND BRIGHT)
graphics.set_color(0 , 1 , 0, 0.5)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+410, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+490, (SCREEN_HIGHT+y1)-43) --スライダーライン
graphics.draw_rectangle((SCREEN_WIDTH+x1)+410+Brightness[0]*65, (SCREEN_HIGHT+y1)-47, (SCREEN_WIDTH+x1)+425+Brightness[0]*65, (SCREEN_HIGHT+y1)-36) --スライダーラインつまみ
--2段目(AFDS FLOOD BRIGHT)
graphics.set_color(0 , 1 , 0, 0.5)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+410, (SCREEN_HIGHT+y1)-60, (SCREEN_WIDTH+x1)+490, (SCREEN_HIGHT+y1)-63) --スライダーライン
graphics.draw_rectangle((SCREEN_WIDTH+x1)+410+Generic_lights_switch[6]*65, (SCREEN_HIGHT+y1)-67, (SCREEN_WIDTH+x1)+425+Generic_lights_switch[6]*65, (SCREEN_HIGHT+y1)-56) --スライダーラインつまみ
--3段目(OVERHEAD PANEL BRIGHT)
graphics.set_color(0 , 1 , 0, 0.5)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+410, (SCREEN_HIGHT+y1)-80, (SCREEN_WIDTH+x1)+490, (SCREEN_HIGHT+y1)-83) --スライダーライン
graphics.draw_rectangle((SCREEN_WIDTH+x1)+410+Generic_lights_switch[7]*65, (SCREEN_HIGHT+y1)-87, (SCREEN_WIDTH+x1)+425+Generic_lights_switch[7]*65, (SCREEN_HIGHT+y1)-76) --スライダーラインつまみ
--テキスト
draw_string((SCREEN_WIDTH+x1)+416, (SCREEN_HIGHT+y1)-15, "MAIN PANEL")
draw_string((SCREEN_WIDTH+x1)+430, (SCREEN_HIGHT+y1)-28, "BRIGHT")
--[[ ノブ式の描画(未使用)
--クリックスぺースにマウスをもっていったときの色(左右分)
if MOUSE_X > (SCREEN_WIDTH+x1)+400 and MOUSE_X < (SCREEN_WIDTH+x1)+450 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+400, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+450, (SCREEN_HIGHT+y1)-100) --長方形を描く
if MOUSE_X > (SCREEN_WIDTH+x1)+450 and MOUSE_X < (SCREEN_WIDTH+x1)+500 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+450, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+500, (SCREEN_HIGHT+y1)-100) --長方形を描く
--円形の描画
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+450, (SCREEN_HIGHT+y1)-62, 20) --円
graphics.set_color(0.7961 ,0.8706 ,0.7882, 1)
graphics.draw_circle((SCREEN_WIDTH+x1)+450, (SCREEN_HIGHT+y1)-62, 20, 2) --円ケイ
--ノブの指針をdataref値に合わせる(dataref値を角度に入れる)
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+450, (SCREEN_HIGHT+y1)-62, tostring((Brightness[0]*300)-150), 26, 8) --三角
--ノブのテキスト
draw_string((SCREEN_WIDTH+x1)+416, (SCREEN_HIGHT+y1)-15, "MAIN PANEL")
draw_string((SCREEN_WIDTH+x1)+430, (SCREEN_HIGHT+y1)-28, "BRIGHT")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+412, (SCREEN_HIGHT+y1)-90, "OFF")
]]
-------------------------------------------------------------------------
--オーバーヘッド、サイドパネル BRIGHTNESS スライダーの描画
-------------------------------------------------------------------------
--左半分
if MOUSE_X > (SCREEN_WIDTH+x1)+500 and MOUSE_X < (SCREEN_WIDTH+x1)+550 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+500, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+550, (SCREEN_HIGHT+y1)-100) --長方形を描く
--右半分
if MOUSE_X > (SCREEN_WIDTH+x1)+550 and MOUSE_X < (SCREEN_WIDTH+x1)+600 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+550, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+600, (SCREEN_HIGHT+y1)-100) --長方形を描く
--1段目(オーバーヘッドパネル PANEL BRIGHT)
graphics.set_color(0 , 1 , 0, 0.5)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+510, (SCREEN_HIGHT+y1)-40, (SCREEN_WIDTH+x1)+590, (SCREEN_HIGHT+y1)-43) --スライダーライン
graphics.draw_rectangle((SCREEN_WIDTH+x1)+510+Brightness[2]*65, (SCREEN_HIGHT+y1)-47, (SCREEN_WIDTH+x1)+525+Brightness[2]*65, (SCREEN_HIGHT+y1)-36) --スライダーラインつまみ
--2段目(サイドパネル PANEL BRIGHT)
graphics.set_color(0 , 1 , 0, 0.5)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+510, (SCREEN_HIGHT+y1)-60, (SCREEN_WIDTH+x1)+590, (SCREEN_HIGHT+y1)-63) --スライダーライン
graphics.draw_rectangle((SCREEN_WIDTH+x1)+510+Generic_lights_switch[8]*65, (SCREEN_HIGHT+y1)-67, (SCREEN_WIDTH+x1)+525+Generic_lights_switch[8]*65, (SCREEN_HIGHT+y1)-56) --スライダーラインつまみ
--3段目(サイドパネル FLOOD BRIGHT)
graphics.set_color(0 , 1 , 0, 0.5)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+510, (SCREEN_HIGHT+y1)-80, (SCREEN_WIDTH+x1)+590, (SCREEN_HIGHT+y1)-83) --スライダーライン
graphics.draw_rectangle((SCREEN_WIDTH+x1)+510+Brightness[3]*65, (SCREEN_HIGHT+y1)-87, (SCREEN_WIDTH+x1)+525+Brightness[3]*65, (SCREEN_HIGHT+y1)-76) --スライダーラインつまみ
--クリックスぺースにマウスをもっていったときの色
--[[
--1段目(未使用)
if MOUSE_X > (SCREEN_WIDTH+x1)+510 and MOUSE_X < (SCREEN_WIDTH+x1)+590 and MOUSE_Y > (SCREEN_HIGHT+y1)-47 and MOUSE_Y < (SCREEN_HIGHT+y1)-36 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+510, (SCREEN_HIGHT+y1)-47, (SCREEN_WIDTH+x1)+590, (SCREEN_HIGHT+y1)-36) ---スライダー選択範囲
--2段目(未使用)
if MOUSE_X > (SCREEN_WIDTH+x1)+510 and MOUSE_X < (SCREEN_WIDTH+x1)+590 and MOUSE_Y > (SCREEN_HIGHT+y1)-67 and MOUSE_Y < (SCREEN_HIGHT+y1)-56 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+510, (SCREEN_HIGHT+y1)-67, (SCREEN_WIDTH+x1)+590, (SCREEN_HIGHT+y1)-56) ---スライダー選択範囲
--3段目(未使用)
if MOUSE_X > (SCREEN_WIDTH+x1)+510 and MOUSE_X < (SCREEN_WIDTH+x1)+590 and MOUSE_Y > (SCREEN_HIGHT+y1)-87 and MOUSE_Y < (SCREEN_HIGHT+y1)-76 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+510, (SCREEN_HIGHT+y1)-87, (SCREEN_WIDTH+x1)+590, (SCREEN_HIGHT+y1)-76) ---スライダー選択範囲
]]
--[[ 未使用
--ブライトネス円形を描画
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+550, (SCREEN_HIGHT+y1)-62, 20) --円
graphics.set_color(0.7961 ,0.8706 ,0.7882, 1)
graphics.draw_circle((SCREEN_WIDTH+x1)+550, (SCREEN_HIGHT+y1)-62, 20, 2) --円ケイ
--ノブの指針をdataref値に合わせる(dataref値を角度に入れる)
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+550, (SCREEN_HIGHT+y1)-62, tostring((Brightness[2]*300)-150), 26, 8) --三角
]]
--ノブのテキスト
draw_string((SCREEN_WIDTH+x1)+505, (SCREEN_HIGHT+y1)-15, "Overhead Panel")
draw_string((SCREEN_WIDTH+x1)+530, (SCREEN_HIGHT+y1)-28, "BRIGHT")
--draw_string_Helvetica_10((SCREEN_WIDTH+x1)+512, (SCREEN_HIGHT+y1)-90, "OFF")
-------------------------------------------------------------------------
-- COM1 の描画
-------------------------------------------------------------------------
--クリックスぺースにマウスをもっていったときの色(左右分)
--[[
if MOUSE_X > (SCREEN_WIDTH+x1)+600 and MOUSE_X < (SCREEN_WIDTH+x1)+625 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-20 then --範囲(上左1)
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+600, (SCREEN_HIGHT+y1)-20, (SCREEN_WIDTH+x1)+625, (SCREEN_HIGHT+y1)-45) --長方形を描く(上左1)
if MOUSE_X > (SCREEN_WIDTH+x1)+625 and MOUSE_X < (SCREEN_WIDTH+x1)+650 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-20 then --範囲(上左2)
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+625, (SCREEN_HIGHT+y1)-20, (SCREEN_WIDTH+x1)+650, (SCREEN_HIGHT+y1)-45) --長方形を描く(上左2)
if MOUSE_X > (SCREEN_WIDTH+x1)+625 and MOUSE_X < (SCREEN_WIDTH+x1)+650 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-20 then --範囲(上右1)
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+650, (SCREEN_HIGHT+y1)-20, (SCREEN_WIDTH+x1)+700, (SCREEN_HIGHT+y1)-45) --長方形を描く (上右1)
]]
--範囲を指定して長方形を描画
if MOUSE_X > (SCREEN_WIDTH+x1)+600 and MOUSE_X < (SCREEN_WIDTH+x1)+625 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下左1)
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+600, (SCREEN_HIGHT+y1)-65, (SCREEN_WIDTH+x1)+625, (SCREEN_HIGHT+y1)-100) --長方形を描く(下左1)
if MOUSE_X > (SCREEN_WIDTH+x1)+625 and MOUSE_X < (SCREEN_WIDTH+x1)+650 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下左25)
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+625, (SCREEN_HIGHT+y1)-65, (SCREEN_WIDTH+x1)+650, (SCREEN_HIGHT+y1)-100) --長方形を描く(下左2)
if MOUSE_X > (SCREEN_WIDTH+x1)+650 and MOUSE_X < (SCREEN_WIDTH+x1)+675 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下右1)
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+650, (SCREEN_HIGHT+y1)-65, (SCREEN_WIDTH+x1)+675, (SCREEN_HIGHT+y1)-100) --長方形を描く (下右1)
if MOUSE_X > (SCREEN_WIDTH+x1)+675 and MOUSE_X < (SCREEN_WIDTH+x1)+700 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下右2)
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+675, (SCREEN_HIGHT+y1)-65, (SCREEN_WIDTH+x1)+700, (SCREEN_HIGHT+y1)-100) --長方形を描く (下右1)
--周波数の確定矢印を描画
if MOUSE_X > (SCREEN_WIDTH+x1)+625 and MOUSE_X < (SCREEN_WIDTH+x1)+675 and MOUSE_Y > (SCREEN_HIGHT+y1)-65 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.5)
end
graphics.draw_triangle((SCREEN_WIDTH+x1)+665, (SCREEN_HIGHT+y1)-51, (SCREEN_WIDTH+x1)+635, (SCREEN_HIGHT+y1)-51, (SCREEN_WIDTH+x1)+650, (SCREEN_HIGHT+y1)-46) --矢印三角形描画
graphics.draw_triangle((SCREEN_WIDTH+x1)+650, (SCREEN_HIGHT+y1)-61, (SCREEN_WIDTH+x1)+635, (SCREEN_HIGHT+y1)-56, (SCREEN_WIDTH+x1)+665, (SCREEN_HIGHT+y1)-56) --矢印三角形描画
graphics.draw_rectangle((SCREEN_WIDTH+x1)+643, (SCREEN_HIGHT+y1)-51, (SCREEN_WIDTH+x1)+655, (SCREEN_HIGHT+y1)-56) --矢印長方形を描く
--テキスト、周波数表示
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
draw_string((SCREEN_WIDTH+x1)+625, (SCREEN_HIGHT+y1)-15, "-- COM1 --")
draw_string_Times_Roman_24((SCREEN_WIDTH+x1)+612, (SCREEN_HIGHT+y1)-40, tostring(Com1_frequency_Mhz).."."..tostring(Com1_frequency_khz))
draw_string_Times_Roman_24((SCREEN_WIDTH+x1)+612, (SCREEN_HIGHT+y1)-85, tostring(Com1_standby_frequency_Mhz).."."..tostring(Com1_standby_frequency_khz))
-------------------------------------------------------------------------
-- NAV1 の描画
-------------------------------------------------------------------------
--クリックスぺースにマウスをもっていったときの色(左右分)
if MOUSE_X > (SCREEN_WIDTH+x1)+700 and MOUSE_X < (SCREEN_WIDTH+x1)+725 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --範囲を指定(左1)
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+700, (SCREEN_HIGHT+y1)-65, (SCREEN_WIDTH+x1)+725, (SCREEN_HIGHT+y1)-100) --長方形を描く(左1)
if MOUSE_X > (SCREEN_WIDTH+x1)+725 and MOUSE_X < (SCREEN_WIDTH+x1)+750 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --範囲を指定(左2)
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+725, (SCREEN_HIGHT+y1)-65, (SCREEN_WIDTH+x1)+750, (SCREEN_HIGHT+y1)-100) --長方形を描く(左2)
if MOUSE_X > (SCREEN_WIDTH+x1)+750 and MOUSE_X < (SCREEN_WIDTH+x1)+775 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --範囲を指定(右1)
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+750, (SCREEN_HIGHT+y1)-65, (SCREEN_WIDTH+x1)+775, (SCREEN_HIGHT+y1)-100) --長方形を描く(右1)
if MOUSE_X > (SCREEN_WIDTH+x1)+775 and MOUSE_X < (SCREEN_WIDTH+x1)+800 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --範囲を指定(右2)
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+775, (SCREEN_HIGHT+y1)-65, (SCREEN_WIDTH+x1)+800, (SCREEN_HIGHT+y1)-100) --長方形を描く(右1)
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
--テキスト、周波数の表示
draw_string((SCREEN_WIDTH+x1)+725, (SCREEN_HIGHT+y1)-15, "-- NAV1 --")
draw_string_Times_Roman_24((SCREEN_WIDTH+x1)+724, (SCREEN_HIGHT+y1)-40, tostring(Nav1_frequency_Mhz).."."..tostring(Nav1_frequency_khz))
draw_string_Times_Roman_24((SCREEN_WIDTH+x1)+724, (SCREEN_HIGHT+y1)-85, tostring(Nav1_standby_frequency_Mhz).."."..tostring(Nav1_standby_frequency_khz))
--上下の矢印を描く
if MOUSE_X > (SCREEN_WIDTH+x1)+725 and MOUSE_X < (SCREEN_WIDTH+x1)+775 and MOUSE_Y > (SCREEN_HIGHT+y1)-65 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.5)
end
graphics.draw_triangle((SCREEN_WIDTH+x1)+765, (SCREEN_HIGHT+y1)-51, (SCREEN_WIDTH+x1)+735, (SCREEN_HIGHT+y1)-51, (SCREEN_WIDTH+x1)+750, (SCREEN_HIGHT+y1)-46) --矢印三角形描画
graphics.draw_triangle((SCREEN_WIDTH+x1)+750, (SCREEN_HIGHT+y1)-61, (SCREEN_WIDTH+x1)+735, (SCREEN_HIGHT+y1)-56, (SCREEN_WIDTH+x1)+765, (SCREEN_HIGHT+y1)-56) --矢印三角形描画
graphics.draw_rectangle((SCREEN_WIDTH+x1)+743, (SCREEN_HIGHT+y1)-51, (SCREEN_WIDTH+x1)+755, (SCREEN_HIGHT+y1)-56) --矢印長方形を描く
-------------------------------------------------------------------------
--バローメーター の描画
-------------------------------------------------------------------------
--[[
--クリックスぺースにマウスをもっていったときの色(左右分)
if MOUSE_X > (SCREEN_WIDTH+x1)+830 and MOUSE_X < (SCREEN_WIDTH+x1)+846 and MOUSE_Y > (SCREEN_HIGHT+y1)-30 and MOUSE_Y < (SCREEN_HIGHT+y1)-15 then --4桁数値のアップ範囲
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+830, (SCREEN_HIGHT+y1)-15, (SCREEN_WIDTH+x1)+846, (SCREEN_HIGHT+y1)-30) --長方形を描く(上左1)
if MOUSE_X > (SCREEN_WIDTH+x1)+847 and MOUSE_X < (SCREEN_WIDTH+x1)+959 and MOUSE_Y > (SCREEN_HIGHT+y1)-30 and MOUSE_Y < (SCREEN_HIGHT+y1)-15 then --3桁数値のアップ範囲
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+847, (SCREEN_HIGHT+y1)-15, (SCREEN_WIDTH+x1)+859, (SCREEN_HIGHT+y1)-30) --長方形を描く(上左2)
if MOUSE_X > (SCREEN_WIDTH+x1)+859 and MOUSE_X < (SCREEN_WIDTH+x1)+872 and MOUSE_Y > (SCREEN_HIGHT+y1)-30 and MOUSE_Y < (SCREEN_HIGHT+y1)-15 then --2桁数値のアップ範囲
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0.)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+859, (SCREEN_HIGHT+y1)-15, (SCREEN_WIDTH+x1)+872, (SCREEN_HIGHT+y1)-30) --長方形を描く(上右1)
if MOUSE_X > (SCREEN_WIDTH+x1)+872 and MOUSE_X < (SCREEN_WIDTH+x1)+886 and MOUSE_Y > (SCREEN_HIGHT+y1)-30 and MOUSE_Y < (SCREEN_HIGHT+y1)-15 then --1桁数値のアップ範囲
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+872, (SCREEN_HIGHT+y1)-15, (SCREEN_WIDTH+x1)+886, (SCREEN_HIGHT+y1)-30) --長方形を描く(上右2)
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+830 and MOUSE_X < (SCREEN_WIDTH+x1)+846 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-30 then --4桁数値のダウン範囲
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+830, (SCREEN_HIGHT+y1)-30, (SCREEN_WIDTH+x1)+846, (SCREEN_HIGHT+y1)-45) --長方形を描く(上左1)
if MOUSE_X > (SCREEN_WIDTH+x1)+747 and MOUSE_X < (SCREEN_WIDTH+x1)+759 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-30 then --3桁数値のダウン範囲
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+847, (SCREEN_HIGHT+y1)-30, (SCREEN_WIDTH+x1)+859, (SCREEN_HIGHT+y1)-45) --長方形を描く(上左2)
if MOUSE_X > (SCREEN_WIDTH+x1)+859 and MOUSE_X < (SCREEN_WIDTH+x1)+872 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-30 then --2桁数値のダウン範囲
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0.)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+859, (SCREEN_HIGHT+y1)-30, (SCREEN_WIDTH+x1)+872, (SCREEN_HIGHT+y1)-45) --長方形を描く(上右1)
if MOUSE_X > (SCREEN_WIDTH+x1)+872 and MOUSE_X < (SCREEN_WIDTH+x1)+886 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-30 then --1桁数値のダウン範囲
graphics.set_color(0 , 1 , 0, 0.2)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+872, (SCREEN_HIGHT+y1)-30, (SCREEN_WIDTH+x1)+886, (SCREEN_HIGHT+y1)-45) --長方形を描く(上右2)
]]
-----------------------------------------------------------------------------------
--バローのクリック範囲とマウスオンの色
--左側の上段
if MOUSE_X > (SCREEN_WIDTH+x1)+800 and MOUSE_X < (SCREEN_WIDTH+x1)+850 and MOUSE_Y > (SCREEN_HIGHT+y1)-72 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then --範囲(下左1)
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
--左側の下段
graphics.draw_rectangle((SCREEN_WIDTH+x1)+800, (SCREEN_HIGHT+y1)-45, (SCREEN_WIDTH+x1)+850, (SCREEN_HIGHT+y1)-72) --長方形を描く(下左1)
if MOUSE_X > (SCREEN_WIDTH+x1)+800 and MOUSE_X < (SCREEN_WIDTH+x1)+850 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-72 then --範囲(下左1)
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+800, (SCREEN_HIGHT+y1)-72, (SCREEN_WIDTH+x1)+850, (SCREEN_HIGHT+y1)-100) --長方形を描く(下左1)
--右側の上段
if MOUSE_X > (SCREEN_WIDTH+x1)+850 and MOUSE_X < (SCREEN_WIDTH+x1)+900 and MOUSE_Y > (SCREEN_HIGHT+y1)-72 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then --範囲(下右1)
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+850, (SCREEN_HIGHT+y1)-45, (SCREEN_WIDTH+x1)+900, (SCREEN_HIGHT+y1)-72) --長方形を描く(下右1)
--右側の下段
if MOUSE_X > (SCREEN_WIDTH+x1)+850 and MOUSE_X < (SCREEN_WIDTH+x1)+900 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-72 then --範囲(下右1)
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+850, (SCREEN_HIGHT+y1)-72, (SCREEN_WIDTH+x1)+900, (SCREEN_HIGHT+y1)-100) --長方形を描く(下右1)
--STDクリック範囲
if MOUSE_X > (SCREEN_WIDTH+x1)+810 and MOUSE_X < (SCREEN_WIDTH+x1)+825 and MOUSE_Y > (SCREEN_HIGHT+y1)-40 and MOUSE_Y < (SCREEN_HIGHT+y1)-25 then
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+810, (SCREEN_HIGHT+y1)-25, (SCREEN_WIDTH+x1)+825, (SCREEN_HIGHT+y1)-40) --長方形を描く
--テキスト描画
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
draw_string((SCREEN_WIDTH+x1)+828, (SCREEN_HIGHT+y1)-15, "BARO IN")
--数値を変化させる
Baro_Val = string.format("%1.2f", Baro_Knob)
draw_string_Times_Roman_24((SCREEN_WIDTH+x1)+835, (SCREEN_HIGHT+y1)-40, Baro_Val)
-------------------------------------------------------------------------
-- トランスポンダ の描画
-------------------------------------------------------------------------
--クリックスぺースにマウスをもっていったときの色(左右分)
if MOUSE_X > (SCREEN_WIDTH+x1)+900 and MOUSE_X < (SCREEN_WIDTH+x1)+950 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then --範囲(下左1)
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+900, (SCREEN_HIGHT+y1)-45, (SCREEN_WIDTH+x1)+950, (SCREEN_HIGHT+y1)-100) --長方形を描く(下左1)
if MOUSE_X > (SCREEN_WIDTH+x1)+950 and MOUSE_X < (SCREEN_WIDTH+x1)+1000 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then --範囲(下右1)
graphics.set_color(0 , 0 , 0, 0.5)
else
graphics.set_color(0 , 0 , 0, 0)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+950, (SCREEN_HIGHT+y1)-45, (SCREEN_WIDTH+x1)+1000, (SCREEN_HIGHT+y1)-100) --長方形を描く(下右1)
--テキスト描画
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
draw_string((SCREEN_WIDTH+x1)+908, (SCREEN_HIGHT+y1)-15, "TRANSPONDER")
Transponder_Val = string.format("%04d", Transponder_code)
draw_string_Times_Roman_24((SCREEN_WIDTH+x1)+935, (SCREEN_HIGHT+y1)-40, Transponder_Val)
--ノブ円形描画
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+953, (SCREEN_HIGHT+y1)-77, 15) --円
graphics.set_color(0.7961 ,0.8706 ,0.7882, 1)
graphics.draw_circle((SCREEN_WIDTH+x1)+953, (SCREEN_HIGHT+y1)-77, 15, 2) --円ケイ
--ノブの指針をdataref値に合わせる
graphics.set_color(0.7961 ,0.8706 ,0.7882, 1)
if Transponder_Knob == 0 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+953, (SCREEN_HIGHT+y1)-77, 270, 21, 8) --三角
elseif Transponder_Knob == 1 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+953, (SCREEN_HIGHT+y1)-77, 306, 21, 8) --三角
elseif Transponder_Knob == 2 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+953, (SCREEN_HIGHT+y1)-77, 342, 21, 8) --三角
elseif Transponder_Knob == 3 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+953, (SCREEN_HIGHT+y1)-77, 18, 21, 8) --三角
elseif Transponder_Knob == 4 then
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+953, (SCREEN_HIGHT+y1)-77, 54, 21, 8) --三角
else
graphics.draw_inner_tracer((SCREEN_WIDTH+x1)+953, (SCREEN_HIGHT+y1)-77, 90, 21, 8) --三角
end
--ノブテキスト描画
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+918, (SCREEN_HIGHT+y1)-55, "alt OFF")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+960, (SCREEN_HIGHT+y1)-55, "ON")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+905, (SCREEN_HIGHT+y1)-81, "TEST")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+908, (SCREEN_HIGHT+y1)-68, "STBY")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+973, (SCREEN_HIGHT+y1)-68, "TA")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+980, (SCREEN_HIGHT+y1)-81, "TA")
draw_string_Helvetica_10((SCREEN_WIDTH+x1)+975, (SCREEN_HIGHT+y1)-90, "/RA")
-------------------------------------------------------------------------
-- 下段スイッチ の描画
-------------------------------------------------------------------------
--縦分離線
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
graphics.set_width(1) --線の太さ
graphics.draw_line((SCREEN_WIDTH+x1)+70, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x2)+70, (SCREEN_HIGHT+y2)-125) --縦分離線
graphics.draw_line((SCREEN_WIDTH+x1)+150, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x2)+150, (SCREEN_HIGHT+y2)-125) --縦分離線
graphics.draw_line((SCREEN_WIDTH+x1)+300, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x2)+300, (SCREEN_HIGHT+y2)-125) --縦分離線
graphics.draw_line((SCREEN_WIDTH+x1)+365, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x2)+365, (SCREEN_HIGHT+y2)-125) --縦分離線
graphics.draw_line((SCREEN_WIDTH+x1)+435, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x2)+435, (SCREEN_HIGHT+y2)-125) --縦分離線
graphics.draw_line((SCREEN_WIDTH+x1)+582, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x2)+582, (SCREEN_HIGHT+y2)-125) --縦分離線
graphics.draw_line((SCREEN_WIDTH+x1)+692, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x2)+692, (SCREEN_HIGHT+y2)-125) --縦分離線
graphics.draw_line((SCREEN_WIDTH+x1)+757, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x2)+757, (SCREEN_HIGHT+y2)-125) --縦分離線
--マウスクリック時の円色変化
if Landing_SW[0] == 1 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+85, (SCREEN_HIGHT+y1)-115, 5) --円(landing light)
if Generic_lights_SW[2] == 1 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+165, (SCREEN_HIGHT+y1)-109, 5) --円(L)
if Generic_lights_SW[3] == 1 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+165, (SCREEN_HIGHT+y1)-121, 5) --円(R)
if Generic_lights_SW[4] == 1 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+315, (SCREEN_HIGHT+y1)-115, 5) --円(TAXI)
if Generic_lights_SW[1] == 1 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+380, (SCREEN_HIGHT+y1)-115, 5) --円(LOGO)
if PositionLight == 1 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+510, (SCREEN_HIGHT+y1)-109, 5) --円(STROBE)
if PositionLight == -1 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+510, (SCREEN_HIGHT+y1)-121, 5) --円(STEADY)
if AntiCollisionLight == 1 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+597, (SCREEN_HIGHT+y1)-115, 5) --円(Anti Collsion)
if Generic_lights_SW[0] == 1 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+707, (SCREEN_HIGHT+y1)-115, 5) --円(WING)
if Generic_lights_SW[5] == 1 then
graphics.set_color(0 , 1 , 0, 0.8)
else
graphics.set_color(0 , 1 , 0, 0.2)
end
graphics.draw_filled_circle((SCREEN_WIDTH+x1)+772, (SCREEN_HIGHT+y1)-115, 5) --円(Wheel Well)
--テキスト
graphics.set_color(1 , 1, 1, 1)
draw_string((SCREEN_WIDTH+x1)+20, (SCREEN_HIGHT+y1)-118, "LIGHT")
draw_string((SCREEN_WIDTH+x1)+95, (SCREEN_HIGHT+y1)-118, "Landing")
draw_string((SCREEN_WIDTH+x1)+175, (SCREEN_HIGHT+y1)-112, "L")
draw_string((SCREEN_WIDTH+x1)+175, (SCREEN_HIGHT+y1)-124, "R")
draw_string((SCREEN_WIDTH+x1)+190, (SCREEN_HIGHT+y1)-118, "Runway TurnOFF")
draw_string((SCREEN_WIDTH+x1)+325, (SCREEN_HIGHT+y1)-118, "TAXI")
draw_string((SCREEN_WIDTH+x1)+390, (SCREEN_HIGHT+y1)-118, "LOGO")
draw_string((SCREEN_WIDTH+x1)+445, (SCREEN_HIGHT+y1)-118, "POSITION")
draw_string((SCREEN_WIDTH+x1)+520, (SCREEN_HIGHT+y1)-112, "STROBE")
draw_string((SCREEN_WIDTH+x1)+520, (SCREEN_HIGHT+y1)-124, "STEADY")
draw_string((SCREEN_WIDTH+x1)+607, (SCREEN_HIGHT+y1)-118, "Anti Collsion")
draw_string((SCREEN_WIDTH+x1)+717, (SCREEN_HIGHT+y1)-118, "WING")
draw_string((SCREEN_WIDTH+x1)+782, (SCREEN_HIGHT+y1)-118, "Wheel Well")
--sound マウスが乗ったら色を変化させる
if MOUSE_X > (SCREEN_WIDTH+x1)+940 and MOUSE_X < (SCREEN_WIDTH+x1)+995 and MOUSE_Y > (SCREEN_HIGHT+y1)-125 and MOUSE_Y < (SCREEN_HIGHT+y1)-105 then
graphics.set_color(0 , 1 , 0, 0.5)
else
graphics.set_color(0.5451 ,0.6667 ,0.5333, 1)
end
graphics.draw_rectangle((SCREEN_WIDTH+x1)+940, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x1)+995, (SCREEN_HIGHT+y1)-125) --長方形を描く
graphics.set_color(1 , 1, 1, 1)
draw_string((SCREEN_WIDTH+x1)+952, (SCREEN_HIGHT+y1)-118, "Sound") --テキスト
--ダミークリックスペースの作成
--[[
graphics.set_color(0.5451 ,0.6667 ,0.5333, 0.2)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+75, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x1)+145, (SCREEN_HIGHT+y1)-125) --長方形を描く(Landing)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+155, (SCREEN_HIGHT+y1)-100, (SCREEN_WIDTH+x1)+188, (SCREEN_HIGHT+y1)-115) --長方形を描く(L)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+155, (SCREEN_HIGHT+y1)-115, (SCREEN_WIDTH+x1)+188, (SCREEN_HIGHT+y1)-130) --長方形を描く(R)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+305, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x1)+360, (SCREEN_HIGHT+y1)-125) --長方形を描く(TAXI)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+370, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x1)+430, (SCREEN_HIGHT+y1)-125) --長方形を描く(LOGO)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+500, (SCREEN_HIGHT+y1)-100, (SCREEN_WIDTH+x1)+577, (SCREEN_HIGHT+y1)-115) --長方形を描く(STROBE)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+500, (SCREEN_HIGHT+y1)-115, (SCREEN_WIDTH+x1)+577, (SCREEN_HIGHT+y1)-130) --長方形を描く(STEADY)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+587, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x1)+687, (SCREEN_HIGHT+y1)-125) --長方形を描く(Anti Collsion)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+697, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x1)+752, (SCREEN_HIGHT+y1)-125) --長方形を描く(WING)
graphics.draw_rectangle((SCREEN_WIDTH+x1)+752, (SCREEN_HIGHT+y1)-105, (SCREEN_WIDTH+x1)+850, (SCREEN_HIGHT+y1)-125) --長方形を描く(Wheel Well)
]]
end
do_every_draw("draw_quick_settings()")
-------------------------------------------------------------------------
--///////// マウスをクリックしたときの動作を設定する関数 ///////////////////
-------------------------------------------------------------------------
function qs_mouse_click_events2()
-- SpeedBrake_SW
if MOUSE_X > (SCREEN_WIDTH+x1)+4 and MOUSE_X < (SCREEN_WIDTH+x1)+96 and MOUSE_Y > (SCREEN_HIGHT+y1)-32 and MOUSE_Y < (SCREEN_HIGHT+y1)-4 then
if SpeedBrake_SW == 0 then
SpeedBrake_SW = 1
else
SpeedBrake_SW = 0
end
RESUME_MOUSE_CLICK = false --trueにすると戻ってしまう。
end
--スラストレバー
if MOUSE_X > (SCREEN_WIDTH+x1)+4 and MOUSE_X < (SCREEN_WIDTH+x1)+96 and MOUSE_Y > (SCREEN_HIGHT+y1)-64 and MOUSE_Y < (SCREEN_HIGHT+y1)-36 then
if MOUSE_STATUS == "down" then
command_once("sim/engines/thrust_reverse_toggle")
end
end
--ParkBrake_SW
if MOUSE_X > (SCREEN_WIDTH+x1)+4 and MOUSE_X < (SCREEN_WIDTH+x1)+96 and MOUSE_Y > (SCREEN_HIGHT+y1)-96 and MOUSE_Y < (SCREEN_HIGHT+y1)-68 then
if MOUSE_STATUS == "down" then
command_once("laminar/B738/push_button/park_brake_on_off")
end
--[[
if ParkBrake_SW == 0 then
ParkBrake_SW = 1
else
ParkBrake_SW = 0
end
]]
RESUME_MOUSE_CLICK = false --trueにすると戻ってしまう。
end
-------------------------------------------------------------------------
--ワイパーノブ マウスクリック
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+100 and MOUSE_X < (SCREEN_WIDTH+x1)+150 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
command_once("laminar/B738/knob/left_wiper_dn")
command_once("laminar/B738/knob/right_wiper_dn")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+150 and MOUSE_X < (SCREEN_WIDTH+x1)+200 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
command_once("laminar/B738/knob/left_wiper_up")
command_once("laminar/B738/knob/right_wiper_up")
end
end
-------------------------------------------------------------------------
--CTRノブ マウスクリック
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+200 and MOUSE_X < (SCREEN_WIDTH+x1)+250 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
command_once("laminar/B738/EFIS_control/capt/map_mode_dn")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+250 and MOUSE_X < (SCREEN_WIDTH+x1)+300 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
command_once("laminar/B738/EFIS_control/capt/map_mode_up")
end
end
-------------------------------------------------------------------------
--TFCノブ マウスクリック
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+300 and MOUSE_X < (SCREEN_WIDTH+x1)+350 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
command_once("laminar/B738/EFIS_control/capt/map_range_dn")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+350 and MOUSE_X < (SCREEN_WIDTH+x1)+400 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
command_once("laminar/B738/EFIS_control/capt/map_range_up")
end
end
-------------------------------------------------------------------------
--メインパネル Britnessスライダー スペースクリック又はドラッグした時の動作
-------------------------------------------------------------------------
--左範囲をクリックした場合の動作
if MOUSE_X > (SCREEN_WIDTH+x1)+400 and MOUSE_X < (SCREEN_WIDTH+x1)+450 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
Brightness[0] = Brightness[0] - 0.01
Generic_lights_switch[6] = Generic_lights_switch[6] - 0.01
Generic_lights_switch[7] = Generic_lights_switch[7] - 0.01
end
if MOUSE_STATUS == "drag" then
Brightness[0] = Brightness[0] - 0.01
Generic_lights_switch[6] = Generic_lights_switch[6] - 0.01
Generic_lights_switch[7] = Generic_lights_switch[7] - 0.01
end
--dataref数値の制限(0になったら止まる)
if Brightness[0] < 0 then
Brightness[0] = 0
end
if Generic_lights_switch[6] < 0 then
Generic_lights_switch[6] = 0
end
if Generic_lights_switch[7] < 0 then
Generic_lights_switch[7] = 0
end
RESUME_MOUSE_CLICK = true --これ必ず必要
end
--右範囲をクリックした場合の動作
if MOUSE_X > (SCREEN_WIDTH+x1)+450 and MOUSE_X < (SCREEN_WIDTH+x1)+500 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
Brightness[0] = Brightness[0] + 0.01
Generic_lights_switch[6] = Generic_lights_switch[6] + 0.01
Generic_lights_switch[7] = Generic_lights_switch[7] + 0.01
end
if MOUSE_STATUS == "drag" then
Brightness[0] = Brightness[0] + 0.01
Generic_lights_switch[6] = Generic_lights_switch[6] + 0.01
Generic_lights_switch[7] = Generic_lights_switch[7] + 0.01
end
--dataref数値の制限(1になったら止まる)
if Brightness[0] > 1 then
Brightness[0] = 1
end
if Generic_lights_switch[6] > 1 then
Generic_lights_switch[6] = 1
end
if Generic_lights_switch[7] > 1 then
Generic_lights_switch[7] = 1
end
RESUME_MOUSE_CLICK = true
end
-------------------------------------------------------------------------
--オーバーヘッドパネル、サイドパネル Britnessノブ マウスクリック
--------------------------------------------------------------------------
--左範囲をクリックした場合の動作
if MOUSE_X > (SCREEN_WIDTH+x1)+500 and MOUSE_X < (SCREEN_WIDTH+x1)+550 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
Brightness[2] = Brightness[2] - 0.01
Generic_lights_switch[8] = Generic_lights_switch[8] - 0.01
Brightness[3] = Brightness[3] - 0.01
Baro_Knob = Baro_Knob - 0.01
end
if MOUSE_STATUS == "drag" then
Brightness[2] = Brightness[2] - 0.01
Generic_lights_switch[8] = Generic_lights_switch[8] - 0.01
Brightness[3] = Brightness[3] - 0.01
Baro_Knob = Baro_Knob - 0.01
end
--dataref数値の制限(0になったら止まる)
if Brightness[2] < 0 then
Brightness[2] = 0
end
if Generic_lights_switch[8] < 0 then
Generic_lights_switch[8] = 0
end
if Brightness[3] < 0 then
Brightness[3] = 0
end
RESUME_MOUSE_CLICK = true --これ必ず必要
end
--右範囲をクリックした場合の動作
if MOUSE_X > (SCREEN_WIDTH+x1)+550 and MOUSE_X < (SCREEN_WIDTH+x1)+600 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
Brightness[2] = Brightness[2] + 0.01
Generic_lights_switch[8] = Generic_lights_switch[8] + 0.01
Brightness[3] = Brightness[3] + 0.01
end
if MOUSE_STATUS == "drag" then
Brightness[2] = Brightness[2] + 0.01
Generic_lights_switch[8] = Generic_lights_switch[8] + 0.01
Brightness[3] = Brightness[3] + 0.01
end
--dataref数値の制限(1になったら止まる)
if Brightness[2] > 1 then
Brightness[2] = 1
end
if Generic_lights_switch[8] > 1 then
Generic_lights_switch[8] = 1
end
if Brightness[3] > 1 then
Brightness[3] = 1
end
RESUME_MOUSE_CLICK = true
end
--[[ 未使用ゾーン
if MOUSE_X > (SCREEN_WIDTH+x1)+500 and MOUSE_X < (SCREEN_WIDTH+x1)+550 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
Brightness[2] = Brightness[2] - 0.01
end
if MOUSE_STATUS == "drag" then
Brightness[2] = Brightness[2] - 0.01
end
--dataref数値の制限(0になったら止まる)
if Brightness[2] < 0 then
Brightness[2] = 0
end
RESUME_MOUSE_CLICK = true --これ必ず必要
end
if MOUSE_X > (SCREEN_WIDTH+x1)+550 and MOUSE_X < (SCREEN_WIDTH+x1)+600 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-40 then
if MOUSE_STATUS == "down" then
Brightness[2] = Brightness[2] + 0.01
end
if MOUSE_STATUS == "drag" then
Brightness[2] = Brightness[2] + 0.01
end
--dataref数値の制限(1になったら止まる)
if Brightness[2] > 1 then
Brightness[2] = 1
end
RESUME_MOUSE_CLICK = true
end
]]
-------------------------------------------------------------------------
--Baro マウスクリック Baro_Val
-------------------------------------------------------------------------
--STDクリック範囲
if MOUSE_X > (SCREEN_WIDTH+x1)+810 and MOUSE_X < (SCREEN_WIDTH+x1)+825 and MOUSE_Y > (SCREEN_HIGHT+y1)-40 and MOUSE_Y < (SCREEN_HIGHT+y1)-25 then
if MOUSE_STATUS == "down" then
command_once("laminar/B738/EFIS_control/capt/push_button/std_press")
end
RESUME_MOUSE_CLICK = true --これ必ず必要
end
if MOUSE_X > (SCREEN_WIDTH+x1)+800 and MOUSE_X < (SCREEN_WIDTH+x1)+850 and MOUSE_Y > (SCREEN_HIGHT+y1)-72 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then
if MOUSE_STATUS == "down" then
Baro_Knob = Baro_Knob + 0.01
end
RESUME_MOUSE_CLICK = true --これ必ず必要
--dataref数値の制限(1になったら止まる)
if Baro_Knob > 40 then
Baro_Knob = 40
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+800 and MOUSE_X < (SCREEN_WIDTH+x1)+850 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-72 then
if MOUSE_STATUS == "drag" then
Baro_Knob = Baro_Knob + 0.01
end
RESUME_MOUSE_CLICK = true --これ必ず必要
--dataref数値の制限(1になったら止まる)
if Baro_Knob > 40 then
Baro_Knob = 40
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+850 and MOUSE_X < (SCREEN_WIDTH+x1)+900 and MOUSE_Y > (SCREEN_HIGHT+y1)-72 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then
if MOUSE_STATUS == "down" then
Baro_Knob = Baro_Knob - 0.01
end
RESUME_MOUSE_CLICK = true --これ必ず必要
--dataref数値の制限(0になったら止まる)
if Baro_Knob < 0 then
Baro_Knob = 0
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+850 and MOUSE_X < (SCREEN_WIDTH+x1)+900 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-72 then
if MOUSE_STATUS == "drag" then
Baro_Knob = Baro_Knob - 0.01
end
RESUME_MOUSE_CLICK = true --これ必ず必要
--dataref数値の制限(0になったら止まる)
if Baro_Knob < 0 then
Baro_Knob = 0
end
end
-------------------------------------------------------------------------
--Transponderノブ マウスクリック
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+900 and MOUSE_X < (SCREEN_WIDTH+x1)+950 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then
if MOUSE_STATUS == "down" then
command_once("laminar/B738/knob/transponder_mode_dn")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+950 and MOUSE_X < (SCREEN_WIDTH+x1)+1000 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then
if MOUSE_STATUS == "down" then
command_once("laminar/B738/knob/transponder_mode_up")
end
end
-------------------------------------------------------------------------
--Com1 アップダウンマウスクリック
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+600 and MOUSE_X < (SCREEN_WIDTH+x1)+625 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下左)
if MOUSE_STATUS == "down" then
command_once("sim/radios/stby_com1_coarse_up")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+625 and MOUSE_X < (SCREEN_WIDTH+x1)+650 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下左)
if MOUSE_STATUS == "down" then
command_once("sim/radios/stby_com1_coarse_down")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+650 and MOUSE_X < (SCREEN_WIDTH+x1)+675 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下右)
if MOUSE_STATUS == "down" then
command_once("sim/radios/stby_com1_fine_up")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+675 and MOUSE_X < (SCREEN_WIDTH+x1)+700 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下右)
if MOUSE_STATUS == "down" then
command_once("sim/radios/stby_com1_fine_down")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+625 and MOUSE_X < (SCREEN_WIDTH+x1)+675 and MOUSE_Y > (SCREEN_HIGHT+y1)-65 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then --矢印の範囲
if MOUSE_STATUS == "down" then
command_once("sim/radios/com1_standy_flip")
end
end
-------------------------------------------------------------------------
--NAV1 アップダウンマウスクリック
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+700 and MOUSE_X < (SCREEN_WIDTH+x1)+725 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下左)
if MOUSE_STATUS == "down" then
command_once("sim/radios/stby_nav1_coarse_up")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+725 and MOUSE_X < (SCREEN_WIDTH+x1)+750 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下左)
if MOUSE_STATUS == "down" then
command_once("sim/radios/stby_nav1_coarse_down")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+750 and MOUSE_X < (SCREEN_WIDTH+x1)+775 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下右)
if MOUSE_STATUS == "down" then
command_once("sim/radios/stby_nav1_fine_up")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+775 and MOUSE_X < (SCREEN_WIDTH+x1)+800 and MOUSE_Y > (SCREEN_HIGHT+y1)-100 and MOUSE_Y < (SCREEN_HIGHT+y1)-65 then --長方形範囲 (下右)
if MOUSE_STATUS == "down" then
command_once("sim/radios/stby_nav1_fine_down")
end
end
if MOUSE_X > (SCREEN_WIDTH+x1)+725 and MOUSE_X < (SCREEN_WIDTH+x1)+775 and MOUSE_Y > (SCREEN_HIGHT+y1)-65 and MOUSE_Y < (SCREEN_HIGHT+y1)-45 then --矢印の範囲
if MOUSE_STATUS == "down" then
command_once("sim/radios/nav1_standy_flip")
end
end
-------------------------------------------------------------------------
--トランスポンダ アップダウンマウスクリック
-------------------------------------------------------------------------
--4桁数値のアップ
if MOUSE_X > (SCREEN_WIDTH+x1)+930 and MOUSE_X < (SCREEN_WIDTH+x1)+946 and MOUSE_Y > (SCREEN_HIGHT+y1)-30 and MOUSE_Y < (SCREEN_HIGHT+y1)-15 then --4桁数値のアップ範囲
if MOUSE_STATUS == "down" then
command_once("sim/transponder/transponder_thousands_up")
end
end
--4桁数値のダウン
if MOUSE_X > (SCREEN_WIDTH+x1)+930 and MOUSE_X < (SCREEN_WIDTH+x1)+946 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-30 then --4桁数値のダウン範囲
if MOUSE_STATUS == "down" then
command_once("sim/transponder/transponder_thousands_down")
end
end
--3桁数値のアップ
if MOUSE_X > (SCREEN_WIDTH+x1)+947 and MOUSE_X < (SCREEN_WIDTH+x1)+959 and MOUSE_Y > (SCREEN_HIGHT+y1)-30 and MOUSE_Y < (SCREEN_HIGHT+y1)-15 then --3桁数値のアップ範囲
if MOUSE_STATUS == "down" then
command_once("sim/transponder/transponder_hundreds_up")
end
end
--3桁数値のダウン
if MOUSE_X > (SCREEN_WIDTH+x1)+947 and MOUSE_X < (SCREEN_WIDTH+x1)+959 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-30 then --3桁数値のダウン範囲
if MOUSE_STATUS == "down" then
command_once("sim/transponder/transponder_hundreds_down")
end
end
--2桁数値のアップ
if MOUSE_X > (SCREEN_WIDTH+x1)+959 and MOUSE_X < (SCREEN_WIDTH+x1)+972 and MOUSE_Y > (SCREEN_HIGHT+y1)-30 and MOUSE_Y < (SCREEN_HIGHT+y1)-15 then --2桁数値のアップ範囲
if MOUSE_STATUS == "down" then
command_once("sim/transponder/transponder_tens_up")
end
end
--2桁数値のダウン
if MOUSE_X > (SCREEN_WIDTH+x1)+959 and MOUSE_X < (SCREEN_WIDTH+x1)+972 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-30 then --2桁数値のダウン範囲
if MOUSE_STATUS == "down" then
command_once("sim/transponder/transponder_tens_down")
end
end
--1桁数値のアップ
if MOUSE_X > (SCREEN_WIDTH+x1)+972 and MOUSE_X < (SCREEN_WIDTH+x1)+986 and MOUSE_Y > (SCREEN_HIGHT+y1)-30 and MOUSE_Y < (SCREEN_HIGHT+y1)-15 then --1桁数値のアップ範囲
if MOUSE_STATUS == "down" then
command_once("sim/transponder/transponder_ones_up")
end
end
--1桁数値のダウン
if MOUSE_X > (SCREEN_WIDTH+x1)+972 and MOUSE_X < (SCREEN_WIDTH+x1)+986 and MOUSE_Y > (SCREEN_HIGHT+y1)-45 and MOUSE_Y < (SCREEN_HIGHT+y1)-30 then --1桁数値のダウン範囲
if MOUSE_STATUS == "down" then
command_once("sim/transponder/transponder_ones_down")
end
end
-------------------------------------------------------------------------
--下段スイッチ
-------------------------------------------------------------------------
--ランディングライト
if MOUSE_X > (SCREEN_WIDTH+x1)+75 and MOUSE_X < (SCREEN_WIDTH+x1)+145 and MOUSE_Y > (SCREEN_HIGHT+y1)-125 and MOUSE_Y < (SCREEN_HIGHT+y1)-105 then --範囲
if Landing_SW[0] == 0 then
command_once("sim/lights/landing_lights_on")
else
command_once("sim/lights/landing_lights_off")
end
end
--Runway Turnoff(L)
if MOUSE_X > (SCREEN_WIDTH+x1)+155 and MOUSE_X < (SCREEN_WIDTH+x1)+188 and MOUSE_Y > (SCREEN_HIGHT+y1)-115 and MOUSE_Y < (SCREEN_HIGHT+y1)-100 then --範囲
if Generic_lights_SW[2] == 0 then
Generic_lights_SW[2] = 1
else
Generic_lights_SW[2] = 0
end
end
--Runway Turnoff(R)
if MOUSE_X > (SCREEN_WIDTH+x1)+155 and MOUSE_X < (SCREEN_WIDTH+x1)+188 and MOUSE_Y > (SCREEN_HIGHT+y1)-130 and MOUSE_Y < (SCREEN_HIGHT+y1)-115 then --範囲
if Generic_lights_SW[3] == 0 then
Generic_lights_SW[3] = 1
else
Generic_lights_SW[3] = 0
end
end
--TAXI
if MOUSE_X > (SCREEN_WIDTH+x1)+305 and MOUSE_X < (SCREEN_WIDTH+x1)+360 and MOUSE_Y > (SCREEN_HIGHT+y1)-125 and MOUSE_Y < (SCREEN_HIGHT+y1)-105 then --範囲
if Generic_lights_SW[4] == 0 then
Generic_lights_SW[4] = 1
else
Generic_lights_SW[4] = 0
end
end
--LOGO
if MOUSE_X > (SCREEN_WIDTH+x1)+370 and MOUSE_X < (SCREEN_WIDTH+x1)+430 and MOUSE_Y > (SCREEN_HIGHT+y1)-125 and MOUSE_Y < (SCREEN_HIGHT+y1)-105 then --範囲
if Generic_lights_SW[1] == 0 then
Generic_lights_SW[1] = 1
else
Generic_lights_SW[1] = 0
end
end
--STROBE
if MOUSE_X > (SCREEN_WIDTH+x1)+500 and MOUSE_X < (SCREEN_WIDTH+x1)+577 and MOUSE_Y > (SCREEN_HIGHT+y1)-115 and MOUSE_Y < (SCREEN_HIGHT+y1)-100 then --範囲
if MOUSE_STATUS == "down" then
command_once("laminar/B738/toggle_switch/position_light_up")
end
end
--STEADY
if MOUSE_X > (SCREEN_WIDTH+x1)+500 and MOUSE_X < (SCREEN_WIDTH+x1)+577 and MOUSE_Y > (SCREEN_HIGHT+y1)-130 and MOUSE_Y < (SCREEN_HIGHT+y1)-115 then --範囲
if MOUSE_STATUS == "down" then
command_once("laminar/B738/toggle_switch/position_light_down")
end
end
--Anti Collsion
if MOUSE_X > (SCREEN_WIDTH+x1)+587 and MOUSE_X < (SCREEN_WIDTH+x1)+687 and MOUSE_Y > (SCREEN_HIGHT+y1)-125 and MOUSE_Y < (SCREEN_HIGHT+y1)-105 then --範囲
if MOUSE_STATUS == "down" then
command_once("sim/lights/beacon_lights_toggle")
end
end
--WING
if MOUSE_X > (SCREEN_WIDTH+x1)+697 and MOUSE_X < (SCREEN_WIDTH+x1)+752 and MOUSE_Y > (SCREEN_HIGHT+y1)-125 and MOUSE_Y < (SCREEN_HIGHT+y1)-105 then --範囲
if Generic_lights_SW[0] == 0 then
Generic_lights_SW[0] = 1
else
Generic_lights_SW[0] = 0
end
end
--Wheel Well Generic_lights_SW
if MOUSE_X > (SCREEN_WIDTH+x1)+752 and MOUSE_X < (SCREEN_WIDTH+x1)+850 and MOUSE_Y > (SCREEN_HIGHT+y1)-125 and MOUSE_Y < (SCREEN_HIGHT+y1)-105 then --範囲
if Generic_lights_SW[5] == 0 then
command_once("laminar/B738/switch/wheel_light_on")
else
command_once("laminar/B738/switch/wheel_light_off")
end
end
-------------------------------------------------------------------------
--Saund スペースをクリックしたら音を鳴らす
-------------------------------------------------------------------------
if MOUSE_X > (SCREEN_WIDTH+x1)+855 and MOUSE_X < (SCREEN_WIDTH+x1)+900 and MOUSE_Y > (SCREEN_HIGHT+y1)-125 and MOUSE_Y < (SCREEN_HIGHT+y1)-105 then
if MOUSE_STATUS == "down" and playing == false then --音が鳴っていないなら
play_sound(warning)
playing = true
else
stop_sound(warning)
playing = false
end
end
ESUME_MOUSE_CLICK = false
end
do_on_mouse_click("qs_mouse_click_events2()")
end