Skip to content
Snippets Groups Projects
Verified Commit 0aaeaebe authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

feat: new interface for emulator

parent b13d4ff0
No related branches found
No related tags found
No related merge requests found
Pipeline #1294 passed
......@@ -946,6 +946,18 @@ class GameboyEmulator implements Emulator {
//Component.get<KeyValue>("diag:framerate").value = `${value} FPS`;
}
getName() {
return "Boytacean";
}
getVersion() {
return info.version;
}
getVersionUrl() {
return "https://gitlab.stage.hive.pt/joamag/boytacean/-/blob/master/CHANGELOG.md"";
}
toggleRunning() {
if (this.paused) {
this.resume();
......@@ -983,18 +995,6 @@ class GameboyEmulator implements Emulator {
this.start({ engine: null });
}
name() {
return "Boytacean";
}
version() {
return info.version;
}
versionUrl() {
return "https://gitlab.stage.hive.pt/joamag/boytacean/-/blob/master/CHANGELOG.md"";
}
toggleWindow() {
this.maximize();
}
......
......@@ -19,10 +19,13 @@ import {
import "./app.css";
export interface Emulator {
getName(): string;
getVersion(): string;
getVersionUrl(): string;
toggleRunning(): void;
pause(): void;
resume(): void;
reset(): void;
name(): string;
version(): string;
versionUrl(): string;
}
type AppProps = {
......@@ -55,9 +58,9 @@ export const App: FC<AppProps> = ({ emulator, backgrounds = ["264653"] }) => {
</Footer>
<PanelSplit left={<div>This is the left panel</div>}>
<Title
text={emulator.name()}
version={emulator.version()}
versionUrl={emulator.versionUrl()}
text={emulator.getName()}
version={emulator.getVersion()}
versionUrl={emulator.getVersionUrl()}
iconSrc={require("../res/thunder.png")}
></Title>
<Section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment