by warmi » Apr 26, 2003 @ 6:02pm
Uh .. Anigma is not exactly the best example if you want to learn basic GapiDraw usage.
It is rather complicated in the sense that the game is not really using GapiDraw directly but rather small GUI framework built on top of GapiDraw.
The framework consists of entire set of widgets,dialogs, messaging system (slots and signals ), timer and file access classes etc ..
If you are interested in CGapiDraw usage then check WR_Application ( which is main application class derived from CGapiApplication) and WR_Painter ( which is sort of like Java Graphics class or even CPaintDC - it encapsulates all graphic calls.)
Basically the entire framwork is based upon concept of a window which has bunch of virtual methods like :
paintEvent(WR_Painter *p);
stylusPressEvent ( WR_StylusEvent * );
resizeEvent();
moveEvent();
etc..
The idea is that you never directly use CGapiDraw but rather write MFC/JAva/Qt like code creating windows, responding to paint messages etc ...
Here is an ugly screenshot (using default GapiDraw system font) of a window with a listbox and button and two transparent dialogs ( one with a listbox) floating above that window: