

//
// Core Program for TETDM 
// PopUpForStory.java Version 1.04
// Copyright(C) 2012-2018 TETDM CORE MEMBER ALL RIGHTS RESERVED.
// This program is provided under the license.
//

package source.Tutorial;

import source.*;
import source.TextData.*;
import source.Utility.*;

import java.awt.*;
import java.awt.event.*;
import javax.swing.JFrame;

import java.io.File;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.text.*;
import java.util.*;

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import javax.swing.GroupLayout.Alignment;

public class PopUpForStory extends JFrame
{
    public StoryPanel storyPanel;

	Container pane = getContentPane();
    
    Control control;
		
	public PopUpForStory(int X, int Y, int width, int height, Control control, int number)
	{
		super("Story");
		pane.setLayout(new BorderLayout());
	
        this.control = control;
        
		setBounds(X, Y, width, height);
		//setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		
		setAlwaysOnTop(true);
		pane.setBackground(Color.white);
//		setUndecorated(true);
		
        storyPanel = new StoryPanel(control, number);
        pane.add(storyPanel);

		this.addWindowListener(new MyWindowListener());
        
		setVisible(true);
	}
    
    class MyWindowListener extends WindowAdapter {
        public void windowClosing(WindowEvent e)
        {
            control.btTutorial.setSelected(false);
            control.characterTutorial = 0;
            control.setCharacterTutorialButton();
        }
    }
}
