/*---------------------------------------------------------------------------* Project: NintendoWare File: SmLytButton.h Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo and/or its licensed developers and are protected by national and international copyright laws. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. The content herein is highly confidential and should be handled accordingly. $Revision: $ *---------------------------------------------------------------------------*/ #ifndef SM_LYT_BUTTON_H_ #define SM_LYT_BUTTON_H_ //#include #include "../include/SmLayout.h" #include "../include/SmMessage.h" #include "../include/SmRectCollision.h" //------------------------------------------------------------------------------ // ボタンクラス class SmLytButton : public SmMessage { public: // コンストラクタ SmLytButton( SmLayout* smLayout, const wchar_t* string, const char* bounding ); // デストラクタ ~SmLytButton(); // メッセージ受信 virtual bool ReceveMessage( SmMessageType type, void* object, uint targetId ); // 描画 virtual void Render(); // ボタン状態を設定する void SetSwitch( bool bswitch ); // ボタン状態をスワップする void SwapSwitch(); // スイッチオンオフ状態を取得する bool IsSwitch() { return m_IsSwitch; } /* 配置機能 */ // 位置 void SetPosition( f32 x, f32 y ); // 表示/非表示切り替え virtual void SetVisible( bool visible ) { // レイアウトの表示/非表示を切り替え m_Layout->SetVisible( visible ); } private: SmLayout* m_Layout; u16 m_LastX; u16 m_LastY; SmRectCollision m_Collision; wchar_t* m_String; bool m_IsPressed; bool m_IsGrab; bool m_IsSwitch; }; #endif // SM_LYT_BUTTON_H_