Bottle 2D - Lua API 1.0.0
All you need to create games using bottle2D.

header.hpp

Go to the documentation of this file.
00001 
00002 
00004 class Vector3D
00005 {
00006 public:
00007      Vector3D(number x, number y, number z);
00008      Vector3D();
00010     Vector3D  operator+( Vector3D vect);
00012     Vector3D  operator-( Vector3D vect);
00014     bool  operator==( Vector3D vect);
00016     Vector3D  operator*(number nb);
00018     Vector3D  operator/(number nb);
00020     number GetSquareSum();
00022     number GetSize();
00024     Vector3D GetDirection();
00026     number GetDotProduct( Vector3D vector2);
00028     float x;
00030     float y;
00032     float z;
00033 };
00034 
00036 class Vector2D
00037 {
00038 public:
00039      Vector2D(number x, number y);
00040      Vector2D();
00042     Vector2D  operator+( Vector2D vect);
00044     Vector2D  operator-( Vector2D vect);
00046     bool  operator==( Vector2D vect);
00048     Vector2D  operator*(number nb);
00050     Vector2D  operator/(number nb);
00052     number GetSquareSum();
00054     number GetSize();
00056     Vector2D GetDirection();
00058     number GetDotProduct( Vector2D vector2);
00060     number GetAngle();
00062     Vector2D GetDirectNormal();
00064     Vector2D GetIndirectNormal();
00065 // /** Get the angle between the given vector (reference) and this vector */
00067     float x;
00069     float y;
00070 };
00071 
00073 class Color
00074 {
00075 public:
00076      Color();
00077      Color(number r, number g, number b);
00078      Color(number r, number g, number b, number a);
00079     char r;
00080     char g;
00081     char b;
00082     char a;
00083 };
00084 
00086 class Texture
00087 {
00088 public:
00090      Texture();
00092      Texture( string filename);
00094     number GetWidth();
00096     number GetHeight();
00098     Vector2D GetSize();
00100     nil LoadFromFile( string filename);
00101 };
00102 
00104 class Sound
00105 {
00106 public:
00108      Sound();
00110      Sound( string filename);
00112     nil LoadFromFile( string filename);
00116     number GetSampleRate();
00120     number GetChannelsCount();
00124     number GetDuration();
00125 };
00126 
00128 class Music
00129 {
00130 public:
00132      Music();
00134      Music( string filename);
00140     nil LoadFromFile( string filename);
00144     number GetDuration();
00148     number GetChannelsCount();
00151     nil Play();
00154     nil Pause();
00157     nil Stop();
00162     nil SetLoop(bool Loop);
00167     nil SetPitch(number Pitch);
00172     nil SetVolume(number Volume);
00173 //  */
00177     bool GetLoop();
00181     number GetPitch();
00185     number GetVolume();
00189     number GetPlayingOffset();
00193     bool IsPlaying();
00194 };
00195 
00197 class Font
00198 {
00199 public:
00201      Font();
00203      Font( string filename);
00205     nil LoadFromFile( string filename);
00206 };
00207 
00208 
00210 class Arguments
00211 {
00212 public:
00214     number GetCount();
00216     string GetNext();
00218     nil Add( string arg);
00220     nil Clear();
00221 };
00222 
00224 class ModeInfo
00225 {
00226 public:
00227     string fullName;
00228     string idName;
00229     string auther;
00230     string path;
00231     string description;
00232     string version;
00233     string screenshot;
00234 };
00235 
00237 class ConfigNode
00238 {
00239 public:
00241     string GetString( string key);
00243     number GetNumber( string key);
00245     luaObject GetValue( string key);
00247     bool ChildExists( string key);
00249     luaObject GetLuaTable();
00251     nil SetValue( string key, luaObject value);
00253     nil SetLuaTable(luaObject table);
00255     ConfigNode AccessNode( string key);
00257     nil Remove( string key);
00259     nil Clear();
00261     bool IsDeleted();
00262 };
00263 
00265 class ConfigManager
00266 {
00267 public:
00269     ModeInfo GetModeInfo( string idName);
00271     ModeInfo GetModeInfo(number id);
00273     string GetCurrentModeId();
00275     ConfigNode GetRootConfigNode();
00277     number GetModeCount();
00279     ConfigNode GetGlobalConfigNode();
00281     nil InitLocales( string path);
00282 };
00283 
00284 
00286 class EventHandlerBase
00287 {
00288 public:
00289     nil Destroy();
00290     bool ShouldBeDestroyed();
00292     nil SetUserData( string id,  luaObject data);
00294     luaObject GetUserData( string id);
00296     bool UserDataExists( string id);
00298     luaObject GetLuaFunction();
00300     nil SetLuaFunction(luaObject luaFunction);
00302     bool  operator==( EventHandlerBase event);
00303 };
00304 
00305 
00307 class Timer : public EventHandlerBase
00308 {
00309 public:
00311     float interval;
00313     number GetInterval();
00315     nil SetInterval(number numbererval);
00317     number GetElapsedTime();
00319     nil SetElapsedTime(number elapsedTime);
00321     nil Start();
00323     nil Stop();
00325     bool IsRunning();
00326 };
00327 
00329 class Chronometer : public EventHandlerBase
00330 {
00331 public:
00333     float totalTime;
00335     number GetTotalTime();
00337     nil SetTotalTime(number totalTime);
00339     float ratio;
00341     number GetRatio();
00343     nil SetRatio(number newRatio);
00345     nil Restart();
00347     nil Start();
00349     nil Stop();
00351     bool IsRunning();
00352 };
00353 
00355 class MouseZoneEvent : public EventHandlerBase
00356 {
00357 public:
00359     float zone;
00361     ProtectedPtr<PhysicObject> GetZone();
00363     nil SetZone(ProtectedPtr<PhysicObject> zone);
00365     bool IsInside();
00366 };
00367 
00368 
00370 class Object
00371 {
00372 public:
00374     bool  operator==( Object obj);
00376     luaObject Clone();
00378     luaObject CloneToGroup(Group newParent);
00380     Vector2D position;
00382     Vector2D GetPosition();
00384     nil SetPosition( Vector2D pos);
00386     float rotation;
00388     number GetRotation();
00390     nil SetRotation(number angle);
00392     float x;
00394     float y;
00396     number GetPositionX();
00398     number GetPositionY();
00400     nil SetPositionX(number pos);
00402     nil SetPositionY(number pos);
00404     Vector2D globalPosition;
00406     Vector2D GetGlobalPosition();
00408     nil SetGlobalPosition( Vector2D pos);
00410     Vector2D rotation;
00412     number GetGlobalRotation();
00414     nil SetGlobalRotation(number rotation);
00416     nil Rotate(number angle);
00418     nil Move( Vector2D mvt);
00420     std::string name;
00422     string GetName();
00424     nil SetName( string str);
00426     float speed;
00428     nil SetSpeed( Vector2D speed);
00430     Vector2D GetSpeed();
00432     float angularVelocity;
00434     nil SetAngularVelocity(number speed);
00436     number GetAngularVelocity();
00438     number GetType();
00440     long GetUniqueId();
00442     nil ChangeParent(Group parent);
00444     nil Destroy();
00446     luaObject GetParent();
00448     nil SetUserData( string id,  luaObject data);
00450     luaObject GetUserData( string id);
00452     bool UserDataExists( string id);
00454     ProtectedPtr<Screen> GetParentScreen();
00455 };
00456 
00457 
00459 class Drawable : public Object
00460 {
00461 public:
00463     int zPos;
00465     number GetZpos();
00467     nil SetZpos(number val);
00469     number GetLowZPos();
00471     bool visible;
00473     nil Show(bool visible = true);
00475     nil Hide();
00477     bool IsVisible();
00479     bool IsUpperThan( Drawable drawableToCompare);
00480 };
00481 
00482 
00484 class PhysicObject : public Object
00485 {
00486 public:
00488     bool IsPointInside( Vector2D ponumber);
00490     std::string eventFunction;
00501     nil SetEventFunction( luaObject luaFunction);
00503     luaObject GetEventFunction();
00505     number GetPhysicGroup();
00507     bool IsIntersect( PhysicObject obj);
00509     luaObject IsIntersectWithGroup(number phGroup);
00510 };
00511 
00513 class CollisionInfo
00514 {
00515 public:
00517     PhysicObject* phObj;
00519     Vector2D point;
00521     Vector2D penetrationVector;
00522 };
00523 
00524 
00529 class Group : public Drawable
00530 {
00531 public:
00533     Vector2D scale;
00535     nil SetScale( Vector2D scale);
00537     Vector2D GetScale();
00539     number GetChildCount();
00541     luaObject GetPhysicChild(number index);
00543     number GetPhysicChildCount();
00545     luaObject GetDrawableChild(number index);
00547     number GetDrawableChildCount();
00549     nil DestroyChildren();
00551     nil EnableCut(bool isCut);
00553     bool IsCut();
00555     nil SetCutRect( Vector2D position,  Vector2D size);
00557     Vector2D GetCutRectPosition();
00559     Vector2D GetCutRectSize();
00560 /*#define X(typeName, typeId)             typeName *FindByName ## typeName(const std::string &name);
00561 X_OBJ_LIST
00562 #undef X*/
00566     luaObject GetChildTable();
00571     luaObject FindByIndex(number id);
00573     luaObject FindByName( string name);
00575     ProtectedPtr<PhLine> FindByNamePhLine( string name);
00577     ProtectedPtr<PhRect> FindByNamePhRect( string name);
00579     ProtectedPtr<PhTriangle> FindByNamePhTriangle( string name);
00581     ProtectedPtr<PhCircle> FindByNamePhCircle( string name);
00583     ProtectedPtr<PhShape> FindByNamePhShape( string name);
00585     ProtectedPtr<Group> FindByNameGroup( string name);
00587     ProtectedPtr<ParticleSource> FindByNameParticleSource( string name);
00589     ProtectedPtr<Shape> FindByNameShape( string name);
00591     ProtectedPtr<Sprite> FindByNameSprite( string name);
00593     ProtectedPtr<Text> FindByNameText( string name);
00595     ProtectedPtr<PostFX> FindByNamePostFX( string name);
00597     ProtectedPtr<Screen> FindByNameScreen( string name);
00599     ProtectedPtr<ScreenRenderer> FindByNameScreenRenderer( string name);
00601     ProtectedPtr<TexturedArea> FindByNameTexturedArea( string name);
00609     ProtectedPtr<PhLine> CreatePhLine(number phGroupId,  string name,  Vector2D pt1,  Vector2D pt2);
00616     ProtectedPtr<PhRect> CreatePhRect(number phGroupId,  string name,  Vector2D size);
00624     ProtectedPtr<PhRect> CreatePhRect(number phGroupId,  string name,  Vector2D position,  Vector2D size);
00633     ProtectedPtr<PhTriangle> CreatePhTriangle(number phGroupId,  string name,  Vector2D pt1,  Vector2D pt2,  Vector2D pt3);
00640     ProtectedPtr<PhShape> CreatePhShape(number phGroupId,  string name);
00648     ProtectedPtr<PhCircle> CreatePhCircle(number phGroupId,  string name,  Vector2D center, number radius);
00653     ProtectedPtr<Group> CreateGroup( string name);
00659     ProtectedPtr<Group> CreateGroup( string name,  Vector2D position);
00670     ProtectedPtr<ParticleSource> CreateParticleSource( string name,  ParticleModel model, number maxParticleNumber);
00675     ProtectedPtr<Shape> CreateShape( string name);
00686     ProtectedPtr<Shape> CreateShapeLine( string name,  Vector2D P1,  Vector2D P2, number Thickness,  Color Col, number Outline,  Color OutlineCol);
00696     ProtectedPtr<Shape> CreateShapeRectangle( string name,  Vector2D P1,  Vector2D P2,  Color Col, number Outline,  Color OutlineCol);
00706     ProtectedPtr<Shape> CreateShapeRectangleSize( string name,  Vector2D position,  Vector2D size,  Color Col, number Outline,  Color OutlineCol);
00716     ProtectedPtr<Shape> CreateShapeCircle( string name,  Vector2D Center, number Radius,  Color Col, number Outline,  Color OutlineCol);
00721     ProtectedPtr<Sprite> CreateSprite( string name);
00728     ProtectedPtr<Sprite> CreateSprite( string name, Texture image,  Vector2D position);
00734     ProtectedPtr<Text> CreateText( string name,  string text);
00743     ProtectedPtr<Text> CreateText( string name,  string text, number fontSize,  Color fontColor,  Vector2D position);
00748     ProtectedPtr<PostFX> CreatePostFX( string name);
00753     ProtectedPtr<ScreenRenderer> CreateScreenRenderer( string name);
00761     ProtectedPtr<TexturedArea> CreateTexturedArea( string name, Texture image,  Vector2D position,  Vector2D areaSize);
00772     nil SetPreDestroyFunction( luaObject luaFunction);
00774     luaObject GetPreDestroyFunction();
00775 };
00776 
00777 
00779 class ScreenConfig
00780 {
00781 public:
00783      ScreenConfig();
00785      ScreenConfig( Vector2D size);
00787     nil ChangeSize( Vector2D size);
00789     nil CameraReset();
00791     float forcedRatio;
00793     nil SetForcedRatio(number value);
00795     number GetForcedRatio();
00797     bool isFixedRatio;
00799     nil SetFixedRatio(bool value);
00801     bool IsFixedRatio();
00803     Vector2D screenSize;
00805     nil SetScreenSize( Vector2D value);
00807     Vector2D GetScreenSize();
00809     Vector2D cameraTopLeft;
00811     nil SetCameraTopLeft( Vector2D value);
00813     Vector2D GetCameraTopLeft();
00815     Vector2D cameraBottomRight;
00817     nil SetCameraBottomRight( Vector2D value);
00819     Vector2D GetCameraBottomRight();
00821     nil CameraMove( Vector2D mvt);
00823     nil CameraZoom(number addedZoom);
00825     nil CameraZoom(Vector2D addedZoom);
00826 // /** Access the camera zoom */
00828     nil CameraSetZoom(number zoom);
00830     nil CameraSetZoom(Vector2D zoom);
00832     Vector2D CameraGetZoom();
00833 // /** Get zoom, using screen size */
00835     Vector2D cameraCenter;
00837     nil CameraSetCenter( Vector2D center);
00839     Vector2D CameraGetCenter();
00841     Vector2D cameraHalfSize;
00843     nil CameraSetHalfSize( Vector2D halfSize);
00845     Vector2D CameraGetHalfSize();
00847     Vector2D cameraSize;
00849     nil CameraSetSize( Vector2D cameraSize);
00851     Vector2D CameraGetSize();
00852 };
00853 
00859 class Screen : public Group
00860 {
00861 public:
00869     ProtectedPtr<EventHandlerBase> RegisterButtonEvent( luaObject luaFunction,  string keyName, bool pressed);
00877     ProtectedPtr<EventHandlerBase> RegisterButtonInZoneEvent( luaObject luaFunction, MouseZoneEvent zoneEvt,  string keyName, bool pressed);
00883     ProtectedPtr<EventHandlerBase> RegisterMouseMoveEvent( luaObject luaFunction);
00889     ProtectedPtr<Timer> RegisterTimer( luaObject luaFunction, number numbererval, bool isRunning = true);
00895     ProtectedPtr<Chronometer> RegisterChronometer( luaObject luaFunction, number totalTime, bool isRunning = true);
00901     ProtectedPtr<MouseZoneEvent> RegisterMouseZoneEvent( luaObject luaFunction, PhysicObject zone);
00905     ProtectedPtr<EventHandlerBase> RegisterFrameEvent( luaObject luaFunction);
00907     nil SetMouseRelative(bool relative);
00909     bool IsMouseRelative();
00911     nil ShowCursor(bool show);
00913     bool IsCursorVisible();
00915     number GetEventCount();
00917     luabind::object renderScreen;
00922     nil SetRenderScreen(luaObject renderScreen);
00925     luaObject GetRenderScreen();
00926 // /** Show the FPS (for optimisation) */
00927 // /** Tels if FPS ate shown */
00929     float timeSpeed;
00931     nil SetTimeSpeed(number timeSpeed);
00933     number GetTimeSpeed();
00940     nil AddPhysicGroup(number phGroupId1, number phGroupId2);
00942     Color backgroundColor;
00944     Color GetBackgroundColor();
00946     nil SetBackgroundColor( Color color);
00948     ScreenConfig screenConfig;
00950     ScreenConfig GetScreenConfig();
00952     nil SetScreenConfig( ScreenConfig screenConfig);
00954     number GetUnusedPhGroup();
00956     ProtectedPtr<SoundPlayer> PlaySound(Sound sound);
00958     nil StopAllSounds();
00960     bool IsCurrentRunningScreen();
00961 };
00962 
00963 
00968     nil ChangeScreen( string name);
00970     nil ChangeScreen(ProtectedPtr<Screen> screen);
00972     ProtectedPtr<Screen> CreateScreen( string name);
00974     ProtectedPtr<Screen> CreateScreen( string name,  ScreenConfig screenConfig);
00976     string GetCommonDataPath();
00978     string GetModePath();
00983     string GetEngineVersion();
00985     nil RequestRecreateRenderWindow();
00989     number GetFrameTime();
00991     nil Quit();
00995     number ConvertRatioCosAccelerationDeceleration(number ratio);
01000     number ConvertRatioAcceleration(number ratio, number coefficient);
01005     number ConvertRatioDeceleration(number ratio, number coefficient);
01007     Vector2D GetMousePosition();
01008 // /** Set the current mouse position */
01010     ConfigNode GetModeConf();
01012     ModeInfo GetModeInfo();
01014     nil LoadMode( string idName);
01016     ConfigManager GetConfigManager();
01018     nil ForceFrame();
01020     nil ShowConsole(bool isVisible);
01022     bool IsConsoleVisible();
01024     bool IsKeyPressed( string keyName);
01028     Vector2D GetRealWindowSize();
01030     nil SetShowPhysicObjects(bool isVisible);
01032     bool IsShowPhysicObjects();
01034     string _( string str);
01036     string GetTypeName(number typeId);
01038     string GetChildTree();
01042     luaObject GetAvaibleVideoModes();
01044     luaObject GetCmdArguments();
01046     SoundManager GetGlobalSoundManager();
01048     ProtectedPtr<Screen> GetCurrentScreen();
01050     luaObject GetScreenList();
01052     number GetUniqueFrameId();
01053 
01054 
01055 
01056 
01058 class ParticleModel
01059 {
01060 public:
01062      ParticleModel();
01064      ParticleModel(number lifeTimeMin, number lifeTimeMax);
01068     nil AddFixedParam( string name, number value);
01072     nil AddMutableParam( string name, number begin, number end);
01076     nil AddRandomParam( string name, number min, number max);
01080     nil AddMutableRandomParam( string name, number begin_min, number begin_max, number end_min, number end_max);
01082     nil SetLifeTime(number min, number max);
01083 };
01084 
01086 class ParticleEmitter
01087 {
01088 public:
01090      ParticleEmitter();
01092     nil SetAngles(number angleA, number angleB);
01094     nil SetDirection( Vector2D direction);
01096     nil MakeLine( Vector2D pt1,  Vector2D pt2);
01098     nil MakeDisk( Vector2D center, number radius);
01100     nil MakeCircle( Vector2D center, number radius);
01102     nil MakePoint( Vector2D position);
01103 };
01104 
01108 class ParticleSource : public Drawable
01109 {
01110 public:
01112     int flow;
01117     nil SetFlow(number flow);
01119     number GetFlow();
01121     int tank;
01126     nil SetTank(number tank);
01128     number GetTank();
01130     Vector2D gravity;
01132     nil SetGravity( Vector2D force);
01134     Vector2D GetGravity();
01136     float friction;
01138     nil SetFriction(number friction);
01140     number GetFriction();
01142     nil SetForce(number min, number max);
01144     float minForce;
01146     number GetMinForce();
01148     nil SetMinForce(number minForce);
01150     float maxForce;
01152     number GetMaxForce();
01154     nil SetMaxForce(number maxForce);
01156     nil SetEmitterAngle(number angle);
01158     number GetEmitterAngle();
01160     nil SetEmitterDirection( Vector2D direction);
01162     Vector2D GetEmitterDirection();
01164     nil SetEmitter( ParticleEmitter emitter);
01166     nil MakeRenderLines(number length, number width);
01168     nil MakeRenderPoints(number ponumberSize);
01170     nil MakeRenderImages(Texture img,  Vector2D size, bool blendAdd);
01172     bool autoDestroy;
01174     nil SetAutoDestroy(bool autoDestroy);
01176     bool IsAutoDestroy();
01180     nil ComputeParticles(number time);
01182     luabind::object onTankEmptyEventFunction;
01186     nil SetOnTankEmptyEventFunction( luaObject luaFunction);
01188     luaObject GetOnTankEmptyEventFunction();
01189 };
01190 
01191 
01193 class PhCircle : public PhysicObject
01194 {
01195 public:
01197     float radius;
01199     nil SetRadius(number radius);
01201     number GetRadius();
01202 };
01203 
01204 
01206 class PhLine : public PhysicObject
01207 {
01208 public:
01210     sf::Vecor2f vector;
01212     nil SetVector( Vector2D vector);
01214     Vector2D GetVector();
01216     sf::Vecor2f pt2;
01218     nil SetPt2( Vector2D pt2);
01220     Vector2D GetPt2();
01221 };
01222 
01223 
01225 class PhRect : public PhysicObject
01226 {
01227 public:
01229     Vector2D size;
01231     Vector2D GetSize();
01233     nil SetSize( Vector2D size);
01235     float sizeX;
01237     float sizeY;
01239     number GetSizeX();
01241     number GetSizeY();
01243     nil SetSizeX(number size);
01245     nil SetSizeY(number size);
01246 };
01247 
01248 
01250 class PhShape : public PhysicObject
01251 {
01252 public:
01254     Vector2D GetPoint(number nb);
01256     nil SetPoint(number nb,  Vector2D pt);
01258     nil AddPoint( Vector2D pt);
01260     nil RemovePoint(number nb);
01261 };
01262 
01263 
01265 class PhTriangle : public PhysicObject
01266 {
01267 public:
01269     Vector2D GetPoint(number nb);
01271     nil SetPoint(number nb,  Vector2D pt);
01272 };
01273 
01274 
01275 
01280 class PostFX : public Drawable
01281 {
01282 public:
01283     bool LoadFromFile( string Filename);
01285     nil SetParameter( string Name, number X);
01287     nil SetParameter( string Name, number X, number Y);
01289     nil SetParameter( string Name, number X, number Y, number Z);
01291     nil SetParameter( string Name, number X, number Y, number Z, number W);
01293     nil SetTexture( string name, Texture image);
01295     bool static CanUsePostFX();
01296 };
01297 
01298 
01306 class Shape : public Drawable
01307 {
01308 public:
01310     Color color;
01312     nil SetColor( Color Col);
01314     Color GetColor();
01316     nil SetScale( Vector2D scale);
01318     Vector2D GetScale();
01320     nil SetScaleX(number FactorX);
01322     nil SetScaleY(number FactorY);
01324     nil SetCenter( Vector2D center);
01326     Vector2D GetCenter();
01327 // /** Add a point to the shape */
01329     nil AddPoint( Vector2D Position,  Color Col,  Color OutlineCol);
01331     number GetNbPoints();
01333     nil EnableFill(bool Enable);
01335     nil EnableOutline(bool Enable);
01337     nil SetPointPosition(number index,  Vector2D Position);
01339     nil SetPointColor(number index,  Color Col);
01341     nil SetPointOutlineColor(number index,  Color OutlineCol);
01343     nil SetOutlineWidth(number Width);
01345     Vector2D GetPointPosition(number index);
01347     Color GetPointColor(number index);
01349     Color GetPointOutlineColor(number index);
01351     number GetOutlineWidth();
01360     nil MakeLine( Vector2D P1,  Vector2D P2, number Thickness,  Color Col, number Outline,  Color OutlineCol);
01368     nil MakeRectangle( Vector2D P1,  Vector2D P2,  Color Col, number Outline,  Color OutlineCol);
01376     nil MakeCircle( Vector2D Center, number Radius,  Color Col, number Outline,  Color OutlineCol);
01378     nil SetSize(Vector2D size);
01379 };
01380 
01381 
01383 class Sprite : public Drawable
01384 {
01385 public:
01387     Vector2D size;
01389     Vector2D GetSize();
01391     nil SetSize( Vector2D newSize);
01393     nil SetImage(Texture image);
01395     Color color;
01397     nil SetColor( Color Col);
01399     Color GetColor();
01401     Vector2D GetScale();
01403     nil SetScaleX(number FactorX);
01405     nil SetScaleY(number FactorY);
01407     nil SetScale( Vector2D scale);
01409     nil SetCenter( Vector2D center);
01411     Vector2D GetCenter();
01413     nil FlipX(bool Flipped);
01415     nil FlipY(bool Flipped);
01417     Color GetPixel(unsigned number X, unsigned number Y);
01418 };
01419 
01420 
01422 class Text : public Drawable
01423 {
01424 public:
01426     std::string text;
01428     nil SetText( string text);
01430     string GetText();
01432     Vector2D GetTextSize();
01434     float maxWidth;
01436     nil SetMaxWidth(number maxWidth);
01438     number GetMaxWidth();
01440     bool canCutWords;
01442     nil SetCutWords(bool cutWords);
01444     bool IsCutWords();
01446     Color color;
01448     nil SetColor( Color Col);
01450     Color GetColor();
01452     Vector2D GetScale();
01454     nil SetScaleX(number FactorX);
01456     nil SetScaleY(number FactorY);
01457     nil SetScale( Vector2D scale);
01459     nil SetCenter( Vector2D center);
01461     Vector2D GetCenter();
01463     nil SetFont(Font numberFont);
01465     ProtectedPtr<Font> GetFont();
01467     nil SetSize(number size);
01469     number GetSize();
01471     nil SetFontSize(number size);
01473     number GetFontSize();
01475     bool bold;
01477     nil SetBold(bool isBold);
01479     bool GetBold();
01481     bool italic;
01483     nil SetItalic(bool isItalic);
01485     bool GetItalic();
01487     bool underligned;
01489     nil SetUnderligned(bool isUnderligned);
01491     bool GetUnderligned();
01493     Vector2D GetCharacterPos(number index);
01494 };
01495 
01496 
01500 class ScreenRenderer : public Drawable
01501 {
01502 public:
01504     Screen targetScreen;
01506     nil SetTargetScreen(ProtectedPtr<Screen> targetScreen);
01508     ProtectedPtr<Screen> GetTargetScreen();
01510     ScreenConfig screenConfig;
01512     ScreenConfig GetScreenConfig();
01514     nil SetScreenConfig( ScreenConfig screenConfig);
01516     bool isScreenConfigEnabled;
01518     bool IsScreenConfigEnabled();
01520     nil EnableScreenConfig(bool isScreenConfigEnabled);
01521 };
01522 
01523 
01525 class TexturedArea : public Sprite
01526 {
01527 public:
01529     Vector2D size;
01531     Vector2D GetAreaSize();
01533     nil SetAreaSize( Vector2D newSize);
01535     Vector2D textureSpeed;
01537     nil SetTextureSpeed( Vector2D speed);
01539     Vector2D GetTextureSpeed();
01541     Vector2D textureOffset;
01543     nil SetTextureOffset( Vector2D offset);
01545     Vector2D GetTextureOffset();
01546 };
01547 
01548 
01550 class SoundManager
01551 {
01552 public:
01554     ProtectedPtr<SoundPlayer> PlaySound(Sound sound);
01556     nil StopAllSounds();
01557 };
01558 
01559 class SoundPlayer
01560 {
01561 public:
01563     nil Stop();
01565     nil SetSound(En::Sound buffer);
01570     nil SetLoop(bool isLoop);
01575     nil SetPitch(number pitch);
01580     nil SetVolume(number volume);
01585     nil SetPosition(number x, number y, number z);
01590     nil SetPosition( Vector3D position);
01596     nil SetMinDistance(number minDistance);
01602     nil SetAttenuation(number attenuation);
01606     nil SetPlayingOffset(number timeOffset);
01610     bool GetLoop();
01614     number GetPitch();
01618     number GetVolume();
01622     Vector3D GetPosition();
01627     bool IsRelativeToListener();
01631     number GetMinDistance();
01635     number GetAttenuation();
01639     number GetPlayingOffset();
01640 };
01641 
 All Classes Files Functions Variables