wxMediaCtrl in wxSplashScreen presentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
BIN
samples/splash/press.mpg
Normal file
BIN
samples/splash/press.mpg
Normal file
Binary file not shown.
80
samples/splash/press.pov
Normal file
80
samples/splash/press.pov
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: press.pov
|
||||||
|
// Purpose: POV-Ray scene used to generate clip for splash
|
||||||
|
// Author: Wlodzimierz ABX Skiba
|
||||||
|
// Modified by:
|
||||||
|
// Created: 24/11/2004
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Wlodzimierz Skiba
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#version 3.6;
|
||||||
|
|
||||||
|
// Rendering options : +FN +W80 +H60 +AM1 +A0.05 +R5 +J0 +KFF99
|
||||||
|
|
||||||
|
#include "colors.inc"
|
||||||
|
#include "rad_def.inc"
|
||||||
|
|
||||||
|
global_settings {
|
||||||
|
assumed_gamma 1.0
|
||||||
|
max_trace_level 100
|
||||||
|
}
|
||||||
|
|
||||||
|
background { colour White }
|
||||||
|
|
||||||
|
#declare Texts = array[ 3 ];
|
||||||
|
|
||||||
|
#declare Texts[0] = "PRESS";
|
||||||
|
#declare Texts[1] = "ANY";
|
||||||
|
#declare Texts[2] = "KEY";
|
||||||
|
|
||||||
|
camera{ orthographic look_at .5 location .5-z right 1.05*x up 1.05*y }
|
||||||
|
|
||||||
|
#declare Items = dimension_size( Texts , 1 );
|
||||||
|
|
||||||
|
#declare Objects = array[ Items + 1 ];
|
||||||
|
|
||||||
|
#declare f_line = function(x,xa,ya,xb,yb){((yb-ya)/(xb-xa))*(x-xa)+ya};
|
||||||
|
|
||||||
|
#declare Counter = 0;
|
||||||
|
#while ( Counter <= Items )
|
||||||
|
#if ( Counter < Items )
|
||||||
|
#declare Object = text{ ttf "crystal.ttf" Texts[ Counter ] 1 0 };
|
||||||
|
#else
|
||||||
|
#declare Object = Objects[ Items ];
|
||||||
|
#end
|
||||||
|
|
||||||
|
#declare M = max_extent( Object );
|
||||||
|
#declare m = min_extent( Object );
|
||||||
|
#declare S = M - m;
|
||||||
|
#declare Objects[ Counter ] = object{ Object translate -m + z*Counter scale <1/S.x,1/S.y,1> };
|
||||||
|
#declare Objects[ Items ] =
|
||||||
|
#if ( Counter = 0 | Counter = Items )
|
||||||
|
object{
|
||||||
|
#else
|
||||||
|
union{
|
||||||
|
object{ Objects[ Items ] translate y*1.1 }
|
||||||
|
#end
|
||||||
|
object{ Objects[ Counter ] }
|
||||||
|
};
|
||||||
|
|
||||||
|
#declare X0=Counter/(Items+1);
|
||||||
|
#declare Y0=0;
|
||||||
|
#declare X1=(Counter+1)/(Items+1);
|
||||||
|
#declare Y1=1;
|
||||||
|
#declare X2=(Counter+2)/(Items+1);
|
||||||
|
#declare Y2=0;
|
||||||
|
|
||||||
|
#declare increase=f_line(clock,X0,Y0,X1,Y1);
|
||||||
|
#declare decrease=f_line(clock,X1,Y1,X2,Y2);
|
||||||
|
#declare change=min(increase,decrease);
|
||||||
|
#declare level=max(change,0);
|
||||||
|
|
||||||
|
object{
|
||||||
|
Objects[ Counter ]
|
||||||
|
pigment{ rgb level transmit 1-level }
|
||||||
|
}
|
||||||
|
#declare Counter = Counter + 1;
|
||||||
|
#end
|
||||||
|
|
@@ -10,11 +10,12 @@
|
|||||||
<wx-lib>adv</wx-lib>
|
<wx-lib>adv</wx-lib>
|
||||||
<wx-lib>core</wx-lib>
|
<wx-lib>core</wx-lib>
|
||||||
<wx-lib>base</wx-lib>
|
<wx-lib>base</wx-lib>
|
||||||
|
<wx-lib>media</wx-lib>
|
||||||
<win32-res>../sample.rc</win32-res>
|
<win32-res>../sample.rc</win32-res>
|
||||||
</exe>
|
</exe>
|
||||||
|
|
||||||
<wx-data id="data">
|
<wx-data id="data">
|
||||||
<files>splash.png</files>
|
<files>splash.png press.mpg</files>
|
||||||
</wx-data>
|
</wx-data>
|
||||||
|
|
||||||
</makefile>
|
</makefile>
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#include "wx/splash.h"
|
#include "wx/splash.h"
|
||||||
|
#include "wx/mediactrl.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// resources
|
// resources
|
||||||
@@ -199,11 +200,18 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
|||||||
wxSPLASH_CENTRE_ON_PARENT | wxSPLASH_NO_TIMEOUT,
|
wxSPLASH_CENTRE_ON_PARENT | wxSPLASH_NO_TIMEOUT,
|
||||||
0, this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
0, this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||||
wxSIMPLE_BORDER|wxSTAY_ON_TOP);
|
wxSIMPLE_BORDER|wxSTAY_ON_TOP);
|
||||||
wxStaticText *text = new wxStaticText( splash->GetSplashWindow(), wxID_EXIT, _T("click somewhere\non image"), wxPoint(13,11) );
|
wxWindow *win = splash->GetSplashWindow();
|
||||||
|
#if wxUSE_MEDIACTRL
|
||||||
|
wxMediaCtrl *media = new wxMediaCtrl( win, wxID_EXIT, _T("press.mpg"), wxPoint(2,2));
|
||||||
|
media->SetSize(wxSize(80,60));
|
||||||
|
media->Play();
|
||||||
|
#else
|
||||||
|
wxStaticText *text = new wxStaticText( win, wxID_EXIT, _T("click somewhere\non image"), wxPoint(13,11) );
|
||||||
text->SetBackgroundColour(*wxWHITE);
|
text->SetBackgroundColour(*wxWHITE);
|
||||||
text->SetForegroundColour(*wxBLACK);
|
text->SetForegroundColour(*wxBLACK);
|
||||||
wxFont font = text->GetFont();
|
wxFont font = text->GetFont();
|
||||||
font.SetPointSize(2*font.GetPointSize()/3);
|
font.SetPointSize(2*font.GetPointSize()/3);
|
||||||
text->SetFont(font);
|
text->SetFont(font);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user