Skip to content

Commit

Permalink
Several last final improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Darxoon committed Jun 17, 2024
1 parent 8127d43 commit 3255299
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/elf/fileTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const typedefs = {
walkOrigin: "Vector3",
walkRadius: "Vector3",
field_0xd8: "float",
field_0xdc: "float",
field_0xdc: "int",
chaseOrigin: "Vector3",
chaseRadius: "Vector3",
field_0xf8: "int",
Expand Down
3 changes: 2 additions & 1 deletion src/lib/editor/fileEditor/welcomeScreen/FileTree.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
}
for (const file of dir.files) {
if (!onlyShowSupported || supportedFiles.some(name => file.name.includes(name))) {
// TODO: remove ItemList hack once it gets supported
if (!onlyShowSupported || (supportedFiles.some(name => file.name.includes(name)) && !file.name.includes('ItemList'))) {
outFiles.push({
path: file.path,
name: file.name,
Expand Down
5 changes: 3 additions & 2 deletions src/lib/editor/fileEditor/welcomeScreen/WelcomeScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ ${filePath}. Please report this to the developer (Darxoon)

<p>To use this tool, you need a copy of the Paper Mario: TTYD Remake
and either the&nbsp;emulator <a href="https://www.ryujinx.org/">Ryujinx</a> or a homebrewed
Nintendo Switch with <a href="https://nh-server.github.io/switch-guide/">Atmosphere</a>.</p>
Nintendo Switch with <a href="https://nh-server.github.io/switch-guide/">Atmosphere</a>
in order to create a RomFS dump. (Skip the following step if you already have one)</p>

<p>If you are using <em>Atmosphere</em>, install
<a href="https://github.com/DarkMatterCore/nxdumptool/releases">NXDumpTool</a> and extract
Expand All @@ -177,7 +178,7 @@ ${filePath}. Please report this to the developer (Darxoon)

<p><input type="file" bind:this={folderSelector} on:change={uploadRomfs} multiple></p>

<p>(it will not get uploaded, only stored locally in your browser)</p>
<p>(it will not be uploaded, only stored locally in your browser)</p>

{#if setupLabelOverride}
<p>{setupLabelOverride}</p>
Expand Down
8 changes: 7 additions & 1 deletion src/lib/menu/viewMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ export function getViewMenu(): MenuCategory {
onClick: () => {
let tab = editorStrip.activeTab()

if (tab.content.type === "cardList") {
if (tab == null) {
showModal(TextAlert, {
title: "All Field Descriptions",
content: `This menu requires an active file to be open.
Please open one before trying again.`
})
} else if (tab.content.type === "cardList") {
const { dataType } = tab.content
viewAllDescriptions(dataType)
} else {
Expand Down
10 changes: 9 additions & 1 deletion src/lib/modals/NoteViewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@
</script>

<Alert title="All User Notes">
<div class="wrapper tabbable" bind:this={wrapper}>
<div class="wrapper tabbable" class:empty={allNotes.length == 0} bind:this={wrapper}>
{#if allNotes.length == 0}
<p>You can add notes by hovering over a field name if you have an active file open
and clicking on •••, then typing something into the Personal Notes box.</p>
<p>Nothing here yet.</p>
{/if}
{#each allNotes as [id, content], i}
<div class="element">
<b>{FILE_TYPES[DataType[id[0]]].displayName + ' > ' + toReadableString(id[1])}:</b>
Expand All @@ -38,6 +43,9 @@
min-width: 32rem;
min-height: 14rem;
}
.empty {
max-width: min-content;
}
.element {
margin: 0 1rem 1rem 0;
padding: 6px 12px;
Expand Down

0 comments on commit 3255299

Please sign in to comment.