ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
button.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef AGS_ENGINE_AC_BUTTON_H
23 #define AGS_ENGINE_AC_BUTTON_H
24 
25 #include "ags/globals.h"
26 #include "ags/shared/gui/gui_button.h"
27 
28 namespace AGS3 {
29 
30 using AGS::Shared::GUIButton;
31 struct AnimatingGUIButton;
32 
33 void Button_Animate(GUIButton *butt, int view, int loop, int speed, int repeat, int blocking, int direction, int sframe = 0, int volume = 100);
34 void Button_Animate4(GUIButton *butt, int view, int loop, int speed, int repeat);
35 const char *Button_GetText_New(GUIButton *butt);
36 void Button_GetText(GUIButton *butt, char *buffer);
37 void Button_SetText(GUIButton *butt, const char *newtx);
38 void Button_SetFont(GUIButton *butt, int newFont);
39 int Button_GetFont(GUIButton *butt);
40 int Button_GetClipImage(GUIButton *butt);
41 void Button_SetClipImage(GUIButton *butt, int newval);
42 int Button_GetGraphic(GUIButton *butt);
43 int Button_GetMouseOverGraphic(GUIButton *butt);
44 void Button_SetMouseOverGraphic(GUIButton *guil, int slotn);
45 int Button_GetNormalGraphic(GUIButton *butt);
46 void Button_SetNormalGraphic(GUIButton *guil, int slotn);
47 int Button_GetPushedGraphic(GUIButton *butt);
48 void Button_SetPushedGraphic(GUIButton *guil, int slotn);
49 int Button_GetTextColor(GUIButton *butt);
50 void Button_SetTextColor(GUIButton *butt, int newcol);
51 
52 // Update button's animation, returns whether the animation continues
53 bool UpdateAnimatingButton(int bu);
54 size_t GetAnimatingButtonCount();
55 AnimatingGUIButton *GetAnimatingButtonByIndex(int idxn);
56 void AddButtonAnimation(const AnimatingGUIButton &abtn);
57 void StopButtonAnimation(int idxn);
58 int FindButtonAnimation(int guin, int objn);
59 void FindAndRemoveButtonAnimation(int guin, int objn);
60 void RemoveAllButtonAnimations();
61 
62 } // namespace AGS3
63 
64 #endif
Definition: ags.h:40