function varargout = About(varargin)
% About
%   About displays information about the release version

%   Project: IMPACT
%   Title of Code: controller_design
%   Relevant additional documentation:
%   Developer: Carlos Gonzalez
%   External Dependencies: NA
%
%   Disclaimer
%   CAUTION: It is strongly recommended that changes to this code
%   should be avoided without first consulting with authors.
%-----------

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @About_OpeningFcn, ...
                   'gui_OutputFcn',  @About_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before About is made visible.
function About_OpeningFcn(hObject, eventdata, handles, varargin)
% Choose default command line output for About
handles.output = hObject;

addIMPACTIcon(hObject);

import java.awt.*;
tk = java.awt.Toolkit.getDefaultToolkit();
ScreenDimens = tk.getScreenSize();
ScreenH = get(ScreenDimens,'Height');
ScreenW = get(ScreenDimens,'Width');

Img = image(imread(fullfile(matlabroot,'toolbox','IMPACT','code', 'start.png')));
set(handles.ImageAxes,'Xtick',[],'Ytick',[],'Xticklabel',[],'Yticklabel',[],'xcolor',[1 1 1],'ycolor',[1 1 1]...
    ,'XLim',get(Img,'XData'),'YLim',get(Img,'YData'),'Ydir','Reverse', 'Position', [0 0 1 1]);

xd = get(Img,'XData');
yd = get(Img,'YData');
set(hObject, 'WindowStyle', 'modal','units','normalized','Position',[(ScreenW-xd(2))/2/ScreenW,(ScreenH-yd(2))/2/ScreenH,xd(2)/ScreenW,yd(2)/ScreenH]);

% Update handles structure
guidata(hObject, handles);



% --- Outputs from this function are returned to the command line.
function varargout = About_OutputFcn(hObject, eventdata, handles) 
varargout{1} = handles.output;


% --- Executes on button press in OK.
function OK_Callback(hObject, eventdata, handles)
close(handles.figure_About);



% --- Executes on key press with focus on figure_About and no controls selected.
function figure_About_KeyPressFcn(hObject, eventdata, handles)



