Files
source/Utils/MercTextBox.h
Wanne e3bc68948e Merged from revision: 6812
Reworked Sectory actions menu (CTRL + .) (by Sevenfm)
- Also added support for 16 medium size buttons dialog.
- see: http://www.bears-pit.com/board/ubbthreads.php/topics/329932.html#Post329932

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6813 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-01-22 13:28:48 +00:00

77 lines
2.0 KiB
C

#ifndef __MERCTEXTBOX_H_
#define __MERCTEXTBOX_H_
#include "Types.h"
#define MERC_POPUP_PREPARE_FLAGS_TRANS_BACK 0x00000001
#define MERC_POPUP_PREPARE_FLAGS_MARGINS 0x00000002
#define MERC_POPUP_PREPARE_FLAGS_STOPICON 0x00000004
#define MERC_POPUP_PREPARE_FLAGS_SKULLICON 0x00000008
BOOLEAN InitMercPopupBox( );
// create a pop up box if needed, return id of box..a -1 means couldn't be added
// sevenfm: added bFixedWidth flag. known issue if using this - text caption is not centered
INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorderIndex, STR16 pString, UINT16 usWidth, UINT16 usMarginX, UINT16 usMarginTopY, UINT16 usMarginBottomY, UINT16 *pActualWidth, UINT16 *pActualHeight, BOOLEAN bFixedWidth = FALSE);
// remove the current box
BOOLEAN RemoveMercPopupBox();
// remove this box from the index
BOOLEAN RemoveMercPopupBoxFromIndex( UINT32 uiId );
// render the current pop up box
BOOLEAN RenderMercPopupBox(INT16 sDestX, INT16 sDestY, UINT32 uiBuffer );
// render pop up box with this index value
BOOLEAN RenderMercPopUpBoxFromIndex( INT32 iBoxId, INT16 sDestX, INT16 sDestY, UINT32 uiBuffer );
void RemoveTextMercPopupImages( );
typedef struct {
UINT32 uiSourceBufferIndex;
UINT16 sWidth;
UINT16 sHeight;
UINT8 ubBackgroundIndex;
UINT8 ubBorderIndex;
UINT32 uiMercTextPopUpBackground;
UINT32 uiMercTextPopUpBorder;
BOOLEAN fMercTextPopupInitialized;
BOOLEAN fMercTextPopupSurfaceInitialized;
UINT32 uiFlags;
} MercPopUpBox;
BOOLEAN OverrideMercPopupBox( MercPopUpBox *pMercBox );
BOOLEAN ResetOverrideMercPopupBox( );
BOOLEAN SetPrepareMercPopupFlags( UINT32 uiFlags );
// background enumeration
enum{
BASIC_MERC_POPUP_BACKGROUND = 0,
WHITE_MERC_POPUP_BACKGROUND,
GREY_MERC_POPUP_BACKGROUND,
DIALOG_MERC_POPUP_BACKGROUND,
LAPTOP_POPUP_BACKGROUND,
IMP_POPUP_BACKGROUND,
};
// border enumeration
enum{
BASIC_MERC_POPUP_BORDER =0,
RED_MERC_POPUP_BORDER,
BLUE_MERC_POPUP_BORDER,
DIALOG_MERC_POPUP_BORDER,
LAPTOP_POP_BORDER
};
#endif