Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
DOOM committed Jun 30, 2023
1 parent c102fdc commit 07d60ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 3 additions & 2 deletions code/controllers/subsystem/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,10 @@ SUBSYSTEM_DEF(minimaps)

if ("selectAnnouncement")
toolbar_selection = "export"
to_chat(usr, SPAN_WARNING("params1 -> [params["image"]]"))

// params["image"] <- "should" be of type png returned from tgui

//hardcoded testing, PROGRESS!
marine_announcement("<img src=[params["image"]] height=600 width=100%>", "Marine Major")
. = TRUE

}
Expand Down
4 changes: 3 additions & 1 deletion tgui/packages/tgui/interfaces/CanvasLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ export class CanvasLayer extends Component {
}

if (selection === 'export') {
this.props.onImageExport(this.canvasRef.current.toDataURL());

this.props.onImageExport(String(this.canvasRef.current.toDataURL("image/jpeg", 0.2)));

return;
}

Expand Down
8 changes: 1 addition & 7 deletions tgui/packages/tgui/interfaces/TacticalMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@ export const TacticalMap = (props, context) => {
const { data, act } = useBackend<TacMapProps>(context);

// maybe this is the right way of doing this, maybe not, idk.
const handleTacMapExport = (image: string) => {
if (image === null || image === undefined){
data.exportedTacMapImage = "not found";
}
else {
const handleTacMapExport = (image: any) => {
data.exportedTacMapImage = image;
}
};


return (
<Window title={'Tactical Map'} theme="usmc" width={650} height={750}>
<Window.Content>
Expand Down

0 comments on commit 07d60ca

Please sign in to comment.