Skip to content

Commit

Permalink
fixes for new version
Browse files Browse the repository at this point in the history
  • Loading branch information
huww98 committed Dec 24, 2023
1 parent 1787a04 commit d7ab9ff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/components/ItemSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
<div class="icon-grid">
<BuildingIcon v-for="i of iconsRight" :icon-id="itemIconId(i.id)" :key="i.id"
:style="{gridRow: i.grid[1], gridColumn: i.grid[2] - 6}"
:style="{gridRow: i.grid[1], gridColumn: i.grid[2] - 7}"
@click="selected(i)"/>
</div>
</Modal>
Expand Down Expand Up @@ -49,8 +49,8 @@ watch(openModal, o => { if (!o) handler.value!.focus() });
const page = ref<1 | 2>(1);
const icons = computed(() => items.filter(i => i.grid[0] === page.value));
const iconsLeft = computed(() => icons.value.filter(i => i.grid[2] <= 6));
const iconsRight = computed(() => icons.value.filter(i => i.grid[2] > 6));
const iconsLeft = computed(() => icons.value.filter(i => i.grid[2] <= 7));
const iconsRight = computed(() => icons.value.filter(i => i.grid[2] > 7));
const selected = (i: Item | null) => {
openModal.value = false;
Expand Down
10 changes: 5 additions & 5 deletions src/components/RecipeSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
<div class="icon-grid">
<BuildingIcon v-for="i of iconsRight" :icon-id="recipeIconId(i.id)" :key="i.id"
:style="{gridRow: i.grid[1], gridColumn: i.grid[2] - 6}"
:style="{gridRow: i.grid[1], gridColumn: i.grid[2] - 7}"
@click="selected(i)"/>
</div>
</Modal>
Expand Down Expand Up @@ -49,8 +49,8 @@ watch(openModal, o => { if (!o) handler.value!.focus() });
const page = ref<1 | 2>(1);
const icons = computed(() => recipes.filter(r => r.grid[0] === page.value));
const iconsLeft = computed(() => icons.value.filter(r => r.grid[2] <= 6));
const iconsRight = computed(() => icons.value.filter(r => r.grid[2] > 6));
const iconsLeft = computed(() => icons.value.filter(r => r.grid[2] <= 7));
const iconsRight = computed(() => icons.value.filter(r => r.grid[2] > 7));
const selected = (i: Recipe | null) => {
openModal.value = false;
Expand All @@ -73,10 +73,10 @@ const selected = (i: Recipe | null) => {
@media screen and (max-width: 640px) {
display: grid;
}
grid-template: repeat(7, 1fr) / repeat(6, 1fr);
grid-template: repeat(7, 1fr) / repeat(7, 1fr);
--cell-size: 40px;
height: calc(7 * var(--cell-size));
width: calc(6 * var(--cell-size));
width: calc(7 * var(--cell-size));
.icon {
width: var(--cell-size);
Expand Down
4 changes: 2 additions & 2 deletions src/iconTexture.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { TextureLoader, WebGLRenderer, Texture, RGBAFormat, UnsignedByteType, Vector2 } from 'three';
import { allIconIds, iconUrl } from './data/icons';

const WIDTH = 20;
const HEIGHT = 20;
const WIDTH = 24;
const HEIGHT = 24;
const ICON_SIZE = 80;

export class IconTexture {
Expand Down

0 comments on commit d7ab9ff

Please sign in to comment.