summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-01-23 13:31:41 -0500
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-01-23 13:31:41 -0500
commite34d35ea80e46f3e4c87badf9a8aba2267d64a1d (patch)
tree979e368928e19781da20867f746fa4acada9fbb9 /src
parent4d8526978c37eba545925a4d10a894e14e0bf058 (diff)
downloadDecky-Framegen-e34d35ea80e46f3e4c87badf9a8aba2267d64a1d.tar.gz
Decky-Framegen-e34d35ea80e46f3e4c87badf9a8aba2267d64a1d.zip
add print current running game
Diffstat (limited to 'src')
-rwxr-xr-xsrc/index.tsx26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/index.tsx b/src/index.tsx
index 390454b..288e1e6 100755
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -3,6 +3,7 @@ import {
PanelSection,
PanelSectionRow,
ButtonItem,
+ Router,
} from "@decky/ui";
import { definePlugin, callable } from "@decky/api";
import { FaShip } from "react-icons/fa";
@@ -153,10 +154,33 @@ function FGModInstallerSection() {
);
}
+function MainRunningApp() {
+ const mainRunningApp = Router.MainRunningApp;
+
+ return (
+ <PanelSection title="Main Running App">
+ <PanelSectionRow>
+ <div>
+ {mainRunningApp ? (
+ <span>Main Running App: {mainRunningApp.display_name}</span>
+ ) : (
+ <span>No app is currently running.</span>
+ )}
+ </div>
+ </PanelSectionRow>
+ </PanelSection>
+ );
+}
+
export default definePlugin(() => ({
name: "Framegen Plugin",
titleView: <div>Framegen Plugin</div>,
- content: <MainContent />,
+ content: (
+ <>
+ <MainContent />
+ <MainRunningApp />
+ </>
+ ),
icon: <FaShip />,
onDismount() {
console.log("Framegen Plugin unmounted");