Oxygine  1
2g game engine
DebugActor.h
1 #pragma once
2 #include "oxygine-include.h"
3 #include "Actor.h"
4 
5 
6 namespace oxygine
7 {
8  DECLARE_SMART(DebugActor, spDebugActor);
9 
11  class DebugActor: public Actor
12  {
13  public:
14  static spDebugActor instance;
15 
16  static Resources* resSystem;
17  static void initialize();
18  static void show();
19  static void toggle();
20  static void hide();
21  static void release();
23  static void setCorner(int corner);
24  static void addDebugString(const char* format, ...);
25  static std::string getDefaultName() { return "debug_actor"; }
26 
27  DebugActor();
28  ~DebugActor();
29 
30 
32  void showTouchedActor(bool show);
33  void showTexel2PixelErrors(bool show);
34 
35  protected:
36  void onAdded2Stage() override;
37  void onRemovedFromStage() override;
38  void showDevMenu(spActor data);
39  void _btnClicked(Event* ev);
40 
41 
42  void doUpdate(const UpdateState& us) override;
43  void render(const RenderState&) override;
44  void addButton(float& x, const char* name, const char* anim);
45  private:
46 
47  spColorRectSprite _bg;
48  spTextField _text;
49  std::string _debugText;
50  int _frames;
51  timeMS _startTime;
52 
53 
54  bool _showTouchedActor;
55  bool _showTexel2PixelErrors;
56 
57  bool _dragging;
58  Vector2 _local;
59 
60  void onEvent(Event* ev);
61  void onDAEvent(Event* ev);
62  };
63 }
Definition: Actor.h:42
void doUpdate(const UpdateState &us) override
Definition: Event.h:10
void showTouchedActor(bool show)
Definition: RenderState.h:27
Definition: DebugActor.h:11
Definition: UpdateState.h:6
void render(const RenderState &) override
–oxgl-end–!
Definition: Actor.h:14
Definition: Resources.h:43
static void setCorner(int corner)