Skip to content

Commit ef9b46c

Browse files
committed
feat: basics of tcg 3
1 parent 6c6061c commit ef9b46c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/pages/apps/TcgCardGeneratorPage.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const TcgCardGeneratorPage = () => {
4646
const [type, setType] = useState('Machine / Dragon');
4747
const [attack, setAttack] = useState('Photon Blast');
4848
const [defense, setDefense] = useState('Titanium Plating');
49+
const [cost, setCost] = useState('500 Credits');
4950
const [description, setDescription] = useState(
5051
'A mechanical dragon forged in the neon fires of the cybernetic underworld. It patrols the data streams, incinerating viruses with concentrated light.',
5152
);
@@ -303,6 +304,9 @@ const TcgCardGeneratorPage = () => {
303304
// Defense
304305
drawField('DEFENSE', defense, '#00aaff');
305306

307+
// Cost
308+
drawField('COST', cost, '#ff9900');
309+
306310
// Description Field
307311
currentY += 5;
308312
ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
@@ -327,7 +331,7 @@ const TcgCardGeneratorPage = () => {
327331
const date = new Date().toLocaleDateString();
328332
ctx.textAlign = 'right';
329333
ctx.fillText(`${date} | FEZCODEX | ${cardNumber}/${totalCards}`, logicalWidth - 25, footerY);
330-
}, [cardName, hp, background, image, generation, type, attack, defense, description, illustrator, cardNumber, totalCards]);
334+
}, [cardName, hp, background, image, generation, type, attack, defense, cost, description, illustrator, cardNumber, totalCards]);
331335

332336
const handleImageUpload = (e) => {
333337
const file = e.target.files[0];
@@ -493,6 +497,15 @@ const TcgCardGeneratorPage = () => {
493497
/>
494498
</div>
495499
</div>
500+
<div>
501+
<label className={labelClass}>Cost</label>
502+
<input
503+
type="text"
504+
value={cost}
505+
onChange={(e) => setCost(e.target.value)}
506+
className={inputBaseClass}
507+
/>
508+
</div>
496509
</div>
497510
</div>
498511

0 commit comments

Comments
 (0)