1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: SmLytButton.h 4 5 Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain proprietary 8 information of Nintendo and/or its licensed developers and are protected by 9 national and international copyright laws. They may not be disclosed to third 10 parties or copied or duplicated in any form, in whole or in part, without the 11 prior written consent of Nintendo. 12 13 The content herein is highly confidential and should be handled accordingly. 14 15 $Revision: $ 16 *---------------------------------------------------------------------------*/ 17 #ifndef SM_LYT_BUTTON_H_ 18 #define SM_LYT_BUTTON_H_ 19 20 //#include <nw/demo.h> 21 22 #include "../include/SmLayout.h" 23 #include "../include/SmMessage.h" 24 #include "../include/SmRectCollision.h" 25 26 //------------------------------------------------------------------------------ 27 // �{�^���N���X 28 class SmLytButton : public SmMessage 29 { 30 public: 31 // �R���X�g���N�^ 32 SmLytButton( SmLayout* smLayout, const wchar_t* string, const char* bounding ); 33 34 // �f�X�g���N�^ 35 ~SmLytButton(); 36 37 // ���b�Z�[�W��M 38 virtual bool ReceveMessage( SmMessageType type, void* object, uint targetId ); 39 40 // �`�� 41 virtual void Render(); 42 43 // �{�^����Ԃ�ݒ肷�� 44 void SetSwitch( bool bswitch ); 45 46 // �{�^����Ԃ��X���b�v���� 47 void SwapSwitch(); 48 49 // �X�C�b�`�I���I�t��Ԃ��擾���� IsSwitch()50 bool IsSwitch() 51 { 52 return m_IsSwitch; 53 } 54 55 /* 56 �z�u�@�\ 57 */ 58 // �ʒu 59 void SetPosition( f32 x, f32 y ); 60 61 // �\��/��\����ւ� SetVisible(bool visible)62 virtual void SetVisible( bool visible ) 63 { 64 // ���C�A�E�g�̕\��/��\�����ւ� 65 m_Layout->SetVisible( visible ); 66 } 67 68 69 private: 70 SmLayout* m_Layout; 71 72 u16 m_LastX; 73 u16 m_LastY; 74 75 SmRectCollision m_Collision; 76 77 wchar_t* m_String; 78 79 bool m_IsPressed; 80 bool m_IsGrab; 81 bool m_IsSwitch; 82 }; 83 84 85 86 87 #endif // SM_LYT_BUTTON_H_ 88