Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 802 vs 804 for /trunk/Source Code/GUI/Headers/GUIButton.h

Diff revisions: vs.
  @@ -48,6 +48,8 @@
48 48
49 49 class GUIButton : public GUIElement {
50 50 typedef DELEGATE_CBK_PARAM<I64> ButtonCallback;
51 + typedef DELEGATE_CBK_PARAM<AudioDescriptor_ptr> AudioCallback;
52 +
51 53 friend class GUIInterface;
52 54 friend class SceneGUIElements;
53 55
  @@ -59,6 +61,9 @@
59 61 void setVisible(const bool visible) override;
60 62 void setOnClickSound(const AudioDescriptor_ptr& onClickSound);
61 63
64 + // return false if we replace an existing callback
65 + static bool soundCallback(const AudioCallback& cbk);
66 +
62 67 protected:
63 68 GUIButton(U64 guiID,
64 69 const stringImpl& text,
  @@ -66,7 +71,8 @@
66 71 const vec2<F32>& relativeOffset,
67 72 const vec2<F32>& relativeDimensions,
68 73 CEGUI::Window* parent,
69 - ButtonCallback callback);
74 + ButtonCallback callback,
75 + AudioDescriptor_ptr onClickSound);
70 76 ~GUIButton();
71 77
72 78 void draw(GFXDevice& context) const;
  @@ -77,6 +83,8 @@
77 83 ButtonCallback _callbackFunction;
78 84 CEGUI::Window* _btnWindow;
79 85 AudioDescriptor_ptr _onClickSound;
86 +
87 + static AudioCallback _soundCallback;
80 88 };
81 89
82 90 }; // namespace Divide