ScummVM API documentation
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
28namespace AGS3 {
29
30using AGS::Shared::GUIButton;
31struct AnimatingGUIButton;
32
33void Button_Animate(GUIButton *butt, int view, int loop, int speed, int repeat, int blocking, int direction, int sframe = 0, int volume = 100);
34void Button_Animate4(GUIButton *butt, int view, int loop, int speed, int repeat);
35const char *Button_GetText_New(GUIButton *butt);
36void Button_GetText(GUIButton *butt, char *buffer);
37void Button_SetText(GUIButton *butt, const char *newtx);
38void Button_SetFont(GUIButton *butt, int newFont);
39int Button_GetFont(GUIButton *butt);
40int Button_GetClipImage(GUIButton *butt);
41void Button_SetClipImage(GUIButton *butt, int newval);
42int Button_GetGraphic(GUIButton *butt);
43int Button_GetMouseOverGraphic(GUIButton *butt);
44void Button_SetMouseOverGraphic(GUIButton *guil, int slotn);
45int Button_GetNormalGraphic(GUIButton *butt);
46void Button_SetNormalGraphic(GUIButton *guil, int slotn);
47int Button_GetPushedGraphic(GUIButton *butt);
48void Button_SetPushedGraphic(GUIButton *guil, int slotn);
49int Button_GetTextColor(GUIButton *butt);
50void Button_SetTextColor(GUIButton *butt, int newcol);
51
52// Update button's animation, returns whether the animation continues
53bool UpdateAnimatingButton(int bu);
54size_t GetAnimatingButtonCount();
55AnimatingGUIButton *GetAnimatingButtonByIndex(int idxn);
56void AddButtonAnimation(const AnimatingGUIButton &abtn);
57void StopButtonAnimation(int idxn);
58int FindButtonAnimation(int guin, int objn);
59void FindAndRemoveButtonAnimation(int guin, int objn);
60void RemoveAllButtonAnimations();
61
62} // namespace AGS3
63
64#endif