Updated FloatingMenu

Added OBSProc information, and VTuberProc information, for later when
testing if these programs are running, and maybe later implementing
killing of these programs.
This commit is contained in:
Mario Steele 2026-03-06 21:26:03 -06:00
parent 00d437b523
commit 6611830c18

View file

@ -77,8 +77,8 @@ var anchored_position: Vector2
var _set_win: Window var _set_win: Window
var _edit_win: Window var _edit_win: Window
var _obs_pid: int = -1 var _obs_proc: ProcessTree.ProcessInfo = null
var _vtuber_pid: int = -1 var _vtuber_proc: ProcessTree.ProcessInfo = null
var _vtuber_sid: int var _vtuber_sid: int
var _camera_sid: int var _camera_sid: int
@ -199,8 +199,15 @@ func _handle_script_editor() -> void:
_edit_win = win _edit_win = win
func _handle_run_obs() -> void: func _handle_run_obs() -> void:
if _obs_proc and _obs_proc.is_running():
print("OBS is running.")
return
elif _obs_proc and not _obs_proc.is_running():
_obs_proc = null
var tree := ProcessTree.new() var tree := ProcessTree.new()
if tree.has_process_name(Globals.settings.obs_name): if tree.has_process_name(Globals.settings.obs_name):
_obs_proc = tree.get_process_by_name(Globals.settings.obs_name)
print("OBS is running.") print("OBS is running.")
return return
else: else:
@ -224,8 +231,16 @@ func _handle_step_away() -> void:
EventManager.add_alert(alert) EventManager.add_alert(alert)
func _handle_run_vtuber() -> void: func _handle_run_vtuber() -> void:
if _vtuber_proc and _vtuber_proc.is_running():
print("VTuber is running.")
return
elif _vtuber_proc and not _vtuber_proc.is_running():
_vtuber_proc = null
var tree := ProcessTree.new() var tree := ProcessTree.new()
if tree.has_process_name(Globals.settings.vtuber_name): if tree.has_process_name(Globals.settings.vtuber_name):
_vtuber_proc = tree.get_process_by_name(Globals.settings.vtuber_name)
print("VTuber is running.") print("VTuber is running.")
return return
else: else: