diff --git a/src/App.tsx b/src/App.tsx index f9733a5..6553b51 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -13,10 +13,13 @@ import { VStack, SimpleGrid, Button, - Flex + Flex, + Image, + Center } from '@chakra-ui/react' import theme from './theme' import { useEffect } from 'react' +import logoImg from './assets/logo.png' type BuildingId = 'mouseFarms' | 'keyboardFactories' | 'monitorDisplays' | 'officeSpace' | 'serverRooms' | 'dataCenters' | 'dataCities' | 'dataCountries' | 'dataContinents' | 'dataWorlds' | 'dataMoons' | @@ -117,13 +120,7 @@ function App() { // Handle clicks anywhere in the game const handleClick = (e: React.MouseEvent) => { - // Don't count clicks on buttons or interactive elements - if (e.target instanceof HTMLElement && - (e.target.tagName === 'BUTTON' || - e.target.closest('button') || - e.target.closest('[role="button"]'))) { - return - } + // All clicks count now! click() } @@ -140,18 +137,29 @@ function App() { - - - Clicker Clicker 2 - + + + + Clicker Clicker 2 + + + Click anywhere to start (and then scroll down) + - Level {playerLevel} + + {/* Reset button positioned in the top right */} + + + {/* Shop Section */} - Shop + + Shop + Level {playerLevel} + {availableBuildings.map((building) => ( diff --git a/src/components/BuildingButton.tsx b/src/components/BuildingButton.tsx index 7f72b00..045b7ab 100644 --- a/src/components/BuildingButton.tsx +++ b/src/components/BuildingButton.tsx @@ -74,7 +74,7 @@ export function BuildingButton({ const { points, playerLevel, upgradeBuilding } = useGameStore() const canAfford = points >= cost const meetsLevelRequirement = playerLevel >= levelRequirement - const isDisabled = !canAfford || !meetsLevelRequirement + const isDisabledStyle = !canAfford || !meetsLevelRequirement // Calculate upgrade cost const calculateUpgradeCost = (currentLevel: number): number => { @@ -124,7 +124,7 @@ export function BuildingButton({ {title} - {/* Overlay for owned and level */} + {/* Overlay for owned count */} - - Owned: {owned} - Level: {level} - + Owned: {owned} @@ -150,7 +147,9 @@ export function BuildingButton({ + + 🔄} + onClick={onOpen} + colorScheme="red" + size="md" + variant="ghost" + borderRadius="full" + /> +