/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.vostan.sokoban.menu;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import static org.vostan.sokoban.App.theApp;
import org.vostan.sokoban.R;

/**
 *
 * @author vahagnk
 */
public class MainFragment extends Fragment
{
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle)
	{
		super.onCreate(icicle);
		View v = inflater.inflate(R.layout.main_fragment, container, false);
		if ( theApp().getAchivedLevel() == 1 )
			((Button)v.findViewById(R.id.btn_start)).setText(R.string.btn_start_begin);
		//
		//	Set Footer.
		//
		String str = getString(R.string.copyright) + "\n" 
				+getString(R.string.version_tag) + " " + getString(R.string.git_version);
		((TextView)v.findViewById(R.id.footer_txt)).setText(str);
		
		return v;
	}
}
