Black Trigram (흑괘) - Korean Martial Arts Combat Simulator API - v0.7.9
    Preparing search index...

    Philosophy Screen Hooks

    Korean: 철학 화면 훅

    Custom hooks for state management in the Philosophy Screen

    • Philosophy screen state management hook

      Korean: 철학 화면 상태 관리 훅

      Manages the state for the Philosophy Screen including:

      • Selected trigram for detailed view
      • Current topic being viewed
      • Navigation between different philosophy sections

      Returns {
          clearSelection: () => void;
          selectedTrigram: TrigramStance | null;
          selectTrigram: (stance: TrigramStance) => void;
          setTopic: (newTopic: PhilosophyTopic) => void;
          topic: PhilosophyTopic;
      }

      Philosophy state and control functions

      • clearSelection: () => void

        Clear trigram selection

        Korean: 선택 해제

      • selectedTrigram: TrigramStance | null
      • selectTrigram: (stance: TrigramStance) => void

        Select a trigram for detailed view

        Korean: 트라이그램 선택

      • setTopic: (newTopic: PhilosophyTopic) => void

        Change the current philosophy topic

        Korean: 주제 변경

      • topic: PhilosophyTopic
      const {
      selectedTrigram,
      topic,
      selectTrigram,
      setTopic,
      clearSelection
      } = usePhilosophyState();

      // Select a trigram
      selectTrigram(TrigramStance.GEON);

      // Change topic
      setTopic("values");

      // Clear selection
      clearSelection();