[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In order to startup and use AWS, currently, the following tasks need to be accomplished:
aws = CS_LOAD_PLUGIN(plugin_mgr, "crystalspace.window.alternatemanager", iAws); |
Where aws
is type iAws*
(or csRef<iAws>
).
awsCanvas = aws->SetupCanvas (0, myG2D, myG3D); |
Where myG2D
and myG3D
are your iGraphics2D
and
iGraphics3D
cavas objects, respectively.
aws->GetPrefMgr()->Load("./data/temp/awstest.def"); |
aws->GetPrefMgr()->SelectDefaultSkin("Normal Windows"); |
iAwsWindow *test1 = aws->CreateWindowFrom("Splash"); iAwsWindow *test2 = aws->CreateWindowFrom("Another"); if (test1) test1->Show(); if (test2) test2->Show(); |
// Start drawing 2D graphics. if (!myG3D->BeginDraw (CSDRAW_2DGRAPHICS)) return; // Make sure invalidated areas get a chance to // redraw themselves. aws->Redraw (); // Draw the current view of the window system to a // graphics context with a certain alpha value. aws->Print (myG3D, 64); |
That's all there is to it. AWS is designed to be easy to use. Of course, this brief look does not illustrate how to get user input, from components in the windows, nor does it illustrate how to do anything other than display your windows. However, the windows created here are full-fledged windows with all the controls listed in the definition that you've created. For more advanced topics, read about signals (see section 7.13.2 Signals: Responding To User Input) and custom components (see section 7.13.3 Creating Custom AWS Components).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |