Isaac 2D  1.0
CheckBox.h
1 // // IsaacFramework //
3 // //////////////////////
4 //
5 // Copyright (c) 2014 Horatiu Condrea
6 //
7 // This software is provided 'as-is', without any express or implied warranty.
8 // In no event will the authors be held liable for any damages arising from the use of this software.
9 //
10 // Permission is granted to anyone to use this software for any purpose, including commercial applications,
11 // and to alter it and redistribute it freely, subject to the following restrictions:
12 //
13 // 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. a
14 // If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
15 //
16 // 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
17 //
18 // 3. This notice may not be removed or altered from any source distribution.
19 //
21 /*
22 Copyright @ 2014
23 Author Horatiu Condrea [ horiacondrea.com ]
24 Revision | Who | Date | Comment
25 ------------------------------------------------------------------------------------------------------------------------------------------
26 1.0 | hc | August 2015 | Created
27 */
28 // Headers
30 #pragma once
31 #include <SFML/Graphics.hpp>
32 #include <Frame.h>
33 #include "defines.h"
35 
36 namespace isaac
37 {
38  class EXPORT_API CheckBox : public sf::Drawable, public sf::Transformable
39  {
40  public:
41  CheckBox(const isaac::Frame* ac_Box, isaac::Frame* av_Check, const bool& ac_bCheck);
42  CheckBox(const sf::Shape* ac_Box, sf::Shape* av_Check, const bool& ac_bCheck);
43  ~CheckBox();
44 
45  virtual void mp_Update(std::shared_ptr<sf::RenderWindow> av_pMainWindow, sf::Event event);
46 
47  virtual bool mf_bCheckForTrigger();
48 
49  virtual void mp_SetCheckBox(const bool& ac_bCheck);
50 
51  private:
52  virtual void draw(sf::RenderTarget& target, sf::RenderStates States) const;
53 
54  const Frame* mc_Box;
55  Frame* mv_Check;
56 
57  const sf::Shape* mc_pBox;
58  sf::Shape* mv_pCheck;
59 
60  bool mv_bChecked;
61 
62  };
63 
64 
65 }
Definition: CheckBox.h:38
Definition: BlankScene.cpp:32
Definition: Frame.h:38