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

feat: new fullscreen

parent b9ce2b2c
No related branches found
No related tags found
1 merge request!9Version 0.4.0 🍾
Pipeline #1361 passed
......@@ -68,10 +68,13 @@ export const App: FC<AppProps> = ({ emulator, backgrounds = ["264653"] }) => {
const onResetClick = () => {
emulator.reset();
};
const onFullscreenClick = () => {
setFullscreen((!fullscreen);
};
const onThemeClick = () => {
setBackgroundIndex((backgroundIndex + 1) % backgrounds.length);
};
const onDrawHAndler = (handler: DrawHandler) => {
const onDrawHandler = (handler: DrawHandler) => {
setInterval(() => {
handler(emulator.getImageBuffer(), PixelFormat.RGB);
}, 1000);
......@@ -90,7 +93,7 @@ export const App: FC<AppProps> = ({ emulator, backgrounds = ["264653"] }) => {
<PanelSplit
left={
<div>
<Display fullscreen={fullscreen} onDrawHandler={onDrawHAndler} />
<Display fullscreen={fullscreen} onDrawHandler={onDrawHandler} />
</div>
}
>
......@@ -148,6 +151,12 @@ export const App: FC<AppProps> = ({ emulator, backgrounds = ["264653"] }) => {
imageAlt="reset"
onClick={onResetClick}
/>
<Button
text={"Fullscreen"}
image={require("../res/maximise.svg")}
imageAlt="maximise"
onClick={onFullscreenClick}
/>
<Button
text={"Theme"}
image={require("../res/marker.svg")}
......
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