mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
SAGA2: Rename classes in button.h
This commit is contained in:
parent
d4a3dc97c0
commit
1fcdb25a19
@ -569,9 +569,9 @@ int16 openAutoMap() {
|
||||
|
||||
pAutoMap = new AutoMap(autoMapRect, (uint8 *)_summaryData, 0, NULL);
|
||||
|
||||
new gCompButton(*pAutoMap, closeAutoMapBtnRect, closeBtnImage, numBtnImages, 0, cmdAutoMapQuit);
|
||||
new GfxCompButton(*pAutoMap, closeAutoMapBtnRect, closeBtnImage, numBtnImages, 0, cmdAutoMapQuit);
|
||||
|
||||
new gCompButton(*pAutoMap, scrollBtnRect, scrollBtnImage, numBtnImages, 0, cmdAutoMapScroll);
|
||||
new GfxCompButton(*pAutoMap, scrollBtnRect, scrollBtnImage, numBtnImages, 0, cmdAutoMapScroll);
|
||||
|
||||
pAutoMap->setDecorations(autoMapDecorations,
|
||||
ARRAYSIZE(autoMapDecorations),
|
||||
|
@ -42,7 +42,7 @@ extern void playMemSound(uint32 s); // play click # s
|
||||
Compressed image class
|
||||
* ======================================================================= */
|
||||
|
||||
void gCompImage::init(void) {
|
||||
void GfxCompImage::init(void) {
|
||||
compImages = NULL;
|
||||
max = 0;
|
||||
min = 0;
|
||||
@ -52,7 +52,7 @@ void gCompImage::init(void) {
|
||||
textFont = &Onyx10Font; // default
|
||||
}
|
||||
|
||||
gCompImage::gCompImage(gPanelList &list, const Rect16 &box, void *image, uint16 ident,
|
||||
GfxCompImage::GfxCompImage(gPanelList &list, const Rect16 &box, void *image, uint16 ident,
|
||||
AppFunc *cmd) : gControl(list, box, NULL, ident, cmd) {
|
||||
// setup a single image configuration
|
||||
|
||||
@ -66,7 +66,7 @@ gCompImage::gCompImage(gPanelList &list, const Rect16 &box, void *image, uint16
|
||||
}
|
||||
}
|
||||
|
||||
gCompImage::gCompImage(gPanelList &list,
|
||||
GfxCompImage::GfxCompImage(gPanelList &list,
|
||||
const Rect16 &box,
|
||||
uint32 contextID,
|
||||
char a, char b, char c,
|
||||
@ -86,7 +86,7 @@ gCompImage::gCompImage(gPanelList &list,
|
||||
for (i = 0, rNum = resNum; i < numImages; i++, rNum++) {
|
||||
compImages[i] = LoadResource(resContext,
|
||||
MKTAG(a, b, c, rNum),
|
||||
" gCompImage ");
|
||||
" GfxCompImage ");
|
||||
}
|
||||
|
||||
max = numImages - 1;
|
||||
@ -98,7 +98,7 @@ gCompImage::gCompImage(gPanelList &list,
|
||||
resContext = NULL;
|
||||
}
|
||||
|
||||
gCompImage::gCompImage(gPanelList &list, const Rect16 &box, void *image, const char *text, textPallete &pal, uint16 ident,
|
||||
GfxCompImage::GfxCompImage(gPanelList &list, const Rect16 &box, void *image, const char *text, textPallete &pal, uint16 ident,
|
||||
AppFunc *cmd) : gControl(list, box, text, ident, cmd) {
|
||||
// setup a single image configuration
|
||||
init();
|
||||
@ -116,7 +116,7 @@ gCompImage::gCompImage(gPanelList &list, const Rect16 &box, void *image, const c
|
||||
textPal = pal;
|
||||
}
|
||||
|
||||
gCompImage::gCompImage(gPanelList &list, const Rect16 &box, void **images,
|
||||
GfxCompImage::GfxCompImage(gPanelList &list, const Rect16 &box, void **images,
|
||||
int16 numRes, int16 initial,
|
||||
uint16 ident, AppFunc *cmd) : gControl(list, box, NULL, ident, cmd) {
|
||||
init();
|
||||
@ -131,7 +131,7 @@ gCompImage::gCompImage(gPanelList &list, const Rect16 &box, void **images,
|
||||
currentImage = clamp(min, initial, max);
|
||||
}
|
||||
|
||||
gCompImage::gCompImage(gPanelList &list, const Rect16 &box, void **images,
|
||||
GfxCompImage::GfxCompImage(gPanelList &list, const Rect16 &box, void **images,
|
||||
int16 numRes, int16 initial, const char *text, textPallete &pal,
|
||||
uint16 ident, AppFunc *cmd) : gControl(list, box, text, ident, cmd) {
|
||||
init();
|
||||
@ -149,7 +149,7 @@ gCompImage::gCompImage(gPanelList &list, const Rect16 &box, void **images,
|
||||
textPal = pal;
|
||||
}
|
||||
|
||||
gCompImage::gCompImage(gPanelList &list, const StaticRect &box, void **images,
|
||||
GfxCompImage::GfxCompImage(gPanelList &list, const StaticRect &box, void **images,
|
||||
int16 numRes, int16 initial, const char *text, textPallete &pal,
|
||||
uint16 ident, AppFunc *cmd) : gControl(list, box, text, ident, cmd) {
|
||||
init();
|
||||
@ -168,7 +168,7 @@ gCompImage::gCompImage(gPanelList &list, const StaticRect &box, void **images,
|
||||
}
|
||||
|
||||
|
||||
gCompImage::~gCompImage(void) {
|
||||
GfxCompImage::~GfxCompImage(void) {
|
||||
// delete any allocated image pointers
|
||||
// for JEFFL: I took out the winklude #ifdefs becuase I belive
|
||||
// I fixed the problem that was causing the crash under win32
|
||||
@ -188,22 +188,22 @@ gCompImage::~gCompImage(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void gCompImage::pointerMove(gPanelMessage &msg) {
|
||||
void GfxCompImage::pointerMove(gPanelMessage &msg) {
|
||||
// call the superclass's pointerMove
|
||||
gControl::pointerMove(msg);
|
||||
|
||||
notify(gEventMouseMove, (msg.pointerEnter ? enter : 0) | (msg.pointerLeave ? leave : 0));
|
||||
}
|
||||
|
||||
void gCompImage::enable(bool abled) {
|
||||
void GfxCompImage::enable(bool abled) {
|
||||
gPanel::enable(abled);
|
||||
}
|
||||
|
||||
void gCompImage::invalidate(Rect16 *) {
|
||||
void GfxCompImage::invalidate(Rect16 *) {
|
||||
window.update(extent);
|
||||
}
|
||||
|
||||
void gCompImage::draw(void) {
|
||||
void GfxCompImage::draw(void) {
|
||||
gPort &port = window.windowPort;
|
||||
Rect16 rect = window.getExtent();
|
||||
|
||||
@ -215,7 +215,7 @@ void gCompImage::draw(void) {
|
||||
g_vm->_pointer->show(port, extent); // show mouse pointer
|
||||
}
|
||||
|
||||
void *gCompImage::getCurrentCompImage(void) {
|
||||
void *GfxCompImage::getCurrentCompImage(void) {
|
||||
if (compImages) {
|
||||
return compImages[currentImage]; // return the image pointed to by compImage
|
||||
} else {
|
||||
@ -224,13 +224,13 @@ void *gCompImage::getCurrentCompImage(void) {
|
||||
}
|
||||
|
||||
// waring! : the number of images has has to be == to the inital number
|
||||
void gCompImage::setImages(void **images) {
|
||||
void GfxCompImage::setImages(void **images) {
|
||||
if (images) {
|
||||
compImages = images;
|
||||
}
|
||||
}
|
||||
|
||||
void gCompImage::setImage(void *image) {
|
||||
void GfxCompImage::setImage(void *image) {
|
||||
if (image) {
|
||||
compImages[0] = image;
|
||||
max = 0;
|
||||
@ -238,7 +238,7 @@ void gCompImage::setImage(void *image) {
|
||||
}
|
||||
}
|
||||
|
||||
void gCompImage::select(uint16 val) {
|
||||
void GfxCompImage::select(uint16 val) {
|
||||
setCurrent(val);
|
||||
|
||||
if (getEnabled()) {
|
||||
@ -246,19 +246,19 @@ void gCompImage::select(uint16 val) {
|
||||
}
|
||||
}
|
||||
|
||||
void gCompImage::select(uint16 val, const Rect16 &rect) {
|
||||
void GfxCompImage::select(uint16 val, const Rect16 &rect) {
|
||||
select(val);
|
||||
setExtent(rect);
|
||||
}
|
||||
|
||||
void gCompImage::setExtent(const Rect16 &rect) {
|
||||
void GfxCompImage::setExtent(const Rect16 &rect) {
|
||||
// set the new extent
|
||||
extent = rect;
|
||||
}
|
||||
|
||||
// getCurrentCompImage() is virtual function that should return
|
||||
// the current image to be displayed (to be used across all sub-classes)
|
||||
void gCompImage::drawClipped(gPort &port,
|
||||
void GfxCompImage::drawClipped(gPort &port,
|
||||
const Point16 &offset,
|
||||
const Rect16 &r) {
|
||||
if (!extent.overlap(r)) return;
|
||||
@ -293,11 +293,11 @@ void gCompImage::drawClipped(gPort &port,
|
||||
}
|
||||
|
||||
/* ===================================================================== *
|
||||
gCompImageButton class member functions
|
||||
GfxSpriteImage class member functions
|
||||
* ===================================================================== */
|
||||
|
||||
gSpriteImage::gSpriteImage(gPanelList &list, const Rect16 &box, GameObject *object, char,
|
||||
uint16 ident, AppFunc *cmd) : gCompImage(list, box, NULL, ident, cmd) {
|
||||
GfxSpriteImage::GfxSpriteImage(gPanelList &list, const Rect16 &box, GameObject *object, char,
|
||||
uint16 ident, AppFunc *cmd) : GfxCompImage(list, box, NULL, ident, cmd) {
|
||||
// get the prototype for the object
|
||||
ProtoObj *proto = object->proto();
|
||||
|
||||
@ -310,7 +310,7 @@ gSpriteImage::gSpriteImage(gPanelList &list, const Rect16 &box, GameObject *obje
|
||||
|
||||
// getCurrentCompImage() is virtual function that should return
|
||||
// the current image to be displayed (to be used across all sub-classes)
|
||||
void gSpriteImage::drawClipped(gPort &port,
|
||||
void GfxSpriteImage::drawClipped(gPort &port,
|
||||
const Point16 &offset,
|
||||
const Rect16 &r) {
|
||||
if (!extent.overlap(r)) return;
|
||||
@ -340,10 +340,10 @@ void gSpriteImage::drawClipped(gPort &port,
|
||||
}
|
||||
|
||||
/* ===================================================================== *
|
||||
gCompImageButton class member functions
|
||||
GfxCompButton class member functions
|
||||
* ===================================================================== */
|
||||
|
||||
void gCompButton::loadImages(hResContext *con, hResID res1, hResID res2) {
|
||||
void GfxCompButton::loadImages(hResContext *con, hResID res1, hResID res2) {
|
||||
if (con) {
|
||||
forImage = LoadResource(con, res1, "CBtn fore image");
|
||||
resImage = LoadResource(con, res2, "CBtn res image");
|
||||
@ -358,7 +358,7 @@ void gCompButton::loadImages(hResContext *con, hResID res1, hResID res2) {
|
||||
dimmed = false;
|
||||
}
|
||||
|
||||
void gCompButton::loadImages(hResID contextID, hResID res1, hResID res2) {
|
||||
void GfxCompButton::loadImages(hResID contextID, hResID res1, hResID res2) {
|
||||
// init the resource context handle
|
||||
hResContext *con = resFile->newContext(contextID,
|
||||
"container window resource");
|
||||
@ -367,33 +367,33 @@ void gCompButton::loadImages(hResID contextID, hResID res1, hResID res2) {
|
||||
resFile->disposeContext(con); // get rid of this context
|
||||
}
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const Rect16 &box, hResContext *con, hResID resID1, hResID resID2, uint16 ident,
|
||||
AppFunc *cmd) : gCompImage(list, box, NULL, ident, cmd), extent(box) {
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, hResContext *con, hResID resID1, hResID resID2, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompImage(list, box, NULL, ident, cmd), extent(box) {
|
||||
loadImages(con, resID1, resID2);
|
||||
}
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const Rect16 &box, hResID contextID, hResID resID1, hResID resID2, uint16 ident,
|
||||
AppFunc *cmd) : gCompImage(list, box, NULL, ident, cmd), extent(box) {
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, hResID contextID, hResID resID1, hResID resID2, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompImage(list, box, NULL, ident, cmd), extent(box) {
|
||||
loadImages(contextID, resID1, resID2);
|
||||
}
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const Rect16 &box, hResContext *con, char a, char b, char c, int16 butNum_1, int16 butNum_2, uint16 ident,
|
||||
AppFunc *cmd) : gCompImage(list, box, NULL, ident, cmd), extent(box) {
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, hResContext *con, char a, char b, char c, int16 butNum_1, int16 butNum_2, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompImage(list, box, NULL, ident, cmd), extent(box) {
|
||||
loadImages(con, MKTAG(a, b, c, butNum_1), MKTAG(a, b, c, butNum_2));
|
||||
}
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const Rect16 &box, hResID contextID, char a, char b, char c, int16 butNum_1, int16 butNum_2, uint16 ident,
|
||||
AppFunc *cmd) : gCompImage(list, box, NULL, ident, cmd), extent(box) {
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, hResID contextID, char a, char b, char c, int16 butNum_1, int16 butNum_2, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompImage(list, box, NULL, ident, cmd), extent(box) {
|
||||
loadImages(contextID, MKTAG(a, b, c, butNum_1), MKTAG(a, b, c, butNum_2));
|
||||
}
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const Rect16 &box, hResContext *con, int16 butNum, uint16 ident,
|
||||
AppFunc *cmd) : gCompImage(list, box, NULL, ident, cmd), extent(box) {
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, hResContext *con, int16 butNum, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompImage(list, box, NULL, ident, cmd), extent(box) {
|
||||
loadImages(con, MKTAG('B', 'T', 'N', butNum), MKTAG('B', 'T', 'N', butNum + 1));
|
||||
}
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const Rect16 &box, void **images, int16 numRes, uint16 ident,
|
||||
AppFunc *cmd) : gCompImage(list, box, NULL, ident, cmd) {
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, void **images, int16 numRes, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompImage(list, box, NULL, ident, cmd) {
|
||||
if (images[0] && images[1] && numRes == 2) {
|
||||
forImage = images[0];
|
||||
resImage = images[1];
|
||||
@ -409,8 +409,8 @@ gCompButton::gCompButton(gPanelList &list, const Rect16 &box, void **images, int
|
||||
extent = box;
|
||||
}
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const Rect16 &box, void **images, int16 numRes, const char *text, textPallete &pal, uint16 ident,
|
||||
AppFunc *cmd) : gCompImage(list, box, NULL, 0, 0, text, pal, ident, cmd) {
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, void **images, int16 numRes, const char *text, textPallete &pal, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompImage(list, box, NULL, 0, 0, text, pal, ident, cmd) {
|
||||
if (images[0] && images[1] && numRes == 2) {
|
||||
forImage = images[0];
|
||||
resImage = images[1];
|
||||
@ -426,8 +426,8 @@ gCompButton::gCompButton(gPanelList &list, const Rect16 &box, void **images, int
|
||||
extent = box;
|
||||
}
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const Rect16 &box, void **images, int16 numRes, void *newDimImage, bool dimNess, uint16 ident,
|
||||
AppFunc *cmd) : gCompImage(list, box, NULL, ident, cmd) {
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, void **images, int16 numRes, void *newDimImage, bool dimNess, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompImage(list, box, NULL, ident, cmd) {
|
||||
if (images[0] && images[1] && numRes == 2) {
|
||||
forImage = images[0];
|
||||
resImage = images[1];
|
||||
@ -448,8 +448,8 @@ gCompButton::gCompButton(gPanelList &list, const Rect16 &box, void **images, int
|
||||
}
|
||||
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const Rect16 &box, void *image, uint16 ident,
|
||||
AppFunc *cmd) : gCompImage(list, box, NULL, ident, cmd)
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, void *image, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompImage(list, box, NULL, ident, cmd)
|
||||
|
||||
{
|
||||
if (image) {
|
||||
@ -467,7 +467,7 @@ gCompButton::gCompButton(gPanelList &list, const Rect16 &box, void *image, uint1
|
||||
extent = box;
|
||||
}
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const StaticRect &box, void **images, int16 numRes, const char *text, textPallete &pal, uint16 ident, AppFunc *cmd) : gCompImage(list, box, NULL, 0, 0, text, pal, ident, cmd) {
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const StaticRect &box, void **images, int16 numRes, const char *text, textPallete &pal, uint16 ident, AppFunc *cmd) : GfxCompImage(list, box, NULL, 0, 0, text, pal, ident, cmd) {
|
||||
if (images[0] && images[1] && numRes == 2) {
|
||||
forImage = images[0];
|
||||
resImage = images[1];
|
||||
@ -483,7 +483,7 @@ gCompButton::gCompButton(gPanelList &list, const StaticRect &box, void **images,
|
||||
extent = box;
|
||||
}
|
||||
|
||||
gCompButton::gCompButton(gPanelList &list, const Rect16 &box, AppFunc *cmd) : gCompImage(list, box, NULL, 0, cmd) {
|
||||
GfxCompButton::GfxCompButton(gPanelList &list, const Rect16 &box, AppFunc *cmd) : GfxCompImage(list, box, NULL, 0, cmd) {
|
||||
forImage = NULL;
|
||||
resImage = NULL;
|
||||
dimImage = NULL;
|
||||
@ -493,7 +493,7 @@ gCompButton::gCompButton(gPanelList &list, const Rect16 &box, AppFunc *cmd) : gC
|
||||
extent = box;
|
||||
}
|
||||
|
||||
gCompButton::~gCompButton(void) {
|
||||
GfxCompButton::~GfxCompButton(void) {
|
||||
if (internalAlloc) {
|
||||
if (forImage) {
|
||||
free(forImage);
|
||||
@ -512,7 +512,7 @@ gCompButton::~gCompButton(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void gCompButton::dim(bool enableFlag) {
|
||||
void GfxCompButton::dim(bool enableFlag) {
|
||||
if (enableFlag) {
|
||||
if (!dimmed) dimmed = true;
|
||||
} else {
|
||||
@ -523,13 +523,13 @@ void gCompButton::dim(bool enableFlag) {
|
||||
}
|
||||
|
||||
|
||||
void gCompButton::deactivate(void) {
|
||||
void GfxCompButton::deactivate(void) {
|
||||
selected = 0;
|
||||
window.update(extent);
|
||||
gPanel::deactivate();
|
||||
}
|
||||
|
||||
bool gCompButton::activate(gEventType why) {
|
||||
bool GfxCompButton::activate(gEventType why) {
|
||||
selected = 1;
|
||||
window.update(extent);
|
||||
|
||||
@ -541,21 +541,21 @@ bool gCompButton::activate(gEventType why) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void gCompButton::pointerMove(gPanelMessage &msg) {
|
||||
void GfxCompButton::pointerMove(gPanelMessage &msg) {
|
||||
if (dimmed) return;
|
||||
|
||||
//notify( gEventMouseMove, (msg.pointerEnter ? enter : 0)|(msg.pointerLeave ? leave : 0));
|
||||
gCompImage::pointerMove(msg);
|
||||
GfxCompImage::pointerMove(msg);
|
||||
}
|
||||
|
||||
bool gCompButton::pointerHit(gPanelMessage &) {
|
||||
bool GfxCompButton::pointerHit(gPanelMessage &) {
|
||||
if (dimmed) return false;
|
||||
|
||||
activate(gEventMouseDown);
|
||||
return true;
|
||||
}
|
||||
|
||||
void gCompButton::pointerRelease(gPanelMessage &) {
|
||||
void GfxCompButton::pointerRelease(gPanelMessage &) {
|
||||
// We have to test selected first because deactivate clears it.
|
||||
|
||||
if (selected) {
|
||||
@ -564,23 +564,23 @@ void gCompButton::pointerRelease(gPanelMessage &) {
|
||||
} else deactivate();
|
||||
}
|
||||
|
||||
void gCompButton::pointerDrag(gPanelMessage &msg) {
|
||||
void GfxCompButton::pointerDrag(gPanelMessage &msg) {
|
||||
if (selected != msg.inPanel) {
|
||||
selected = msg.inPanel;
|
||||
window.update(extent);
|
||||
}
|
||||
}
|
||||
|
||||
void gCompButton::enable(bool abled) {
|
||||
void GfxCompButton::enable(bool abled) {
|
||||
gPanel::enable(abled);
|
||||
}
|
||||
|
||||
void gCompButton::invalidate(Rect16 *) {
|
||||
void GfxCompButton::invalidate(Rect16 *) {
|
||||
window.update(extent);
|
||||
}
|
||||
|
||||
|
||||
void gCompButton::draw(void) {
|
||||
void GfxCompButton::draw(void) {
|
||||
gPort &port = window.windowPort;
|
||||
Rect16 rect = window.getExtent();
|
||||
|
||||
@ -590,7 +590,7 @@ void gCompButton::draw(void) {
|
||||
g_vm->_pointer->show(port, extent); // show mouse pointer
|
||||
}
|
||||
|
||||
void *gCompButton::getCurrentCompImage(void) {
|
||||
void *GfxCompButton::getCurrentCompImage(void) {
|
||||
if (dimmed) {
|
||||
return dimImage;
|
||||
} else if (selected) {
|
||||
@ -601,69 +601,16 @@ void *gCompButton::getCurrentCompImage(void) {
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* gToggleCompButton -- like a gCompButton but toggle on and off. *
|
||||
************************************************************************/
|
||||
|
||||
gToggleCompButton::gToggleCompButton(gPanelList &list, const Rect16 &box, hResContext *con, char a, char b, char c, int16 butNum_1, int16 butNum_2, uint16 ident,
|
||||
AppFunc *cmd) : gCompButton(list, box, con, a, b, c, butNum_1, butNum_2, ident, cmd) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
gToggleCompButton::gToggleCompButton(gPanelList &list, const Rect16 &box, hResContext *con, int16 butNum, uint16 ident,
|
||||
AppFunc *cmd) : gCompButton(list, box, con, butNum, ident, cmd) {
|
||||
|
||||
}
|
||||
|
||||
gToggleCompButton::gToggleCompButton(gPanelList &list, const Rect16 &box, void **images, int16 butRes, uint16 ident,
|
||||
AppFunc *cmd) : gCompButton(list, box, images, butRes, ident, cmd) {
|
||||
|
||||
}
|
||||
|
||||
gToggleCompButton::gToggleCompButton(gPanelList &list, const Rect16 &box, void **images, int16 butRes, char *text, textPallete &pal, uint16 ident,
|
||||
AppFunc *cmd) : gCompButton(list, box, images, butRes, text, pal, ident, cmd) {
|
||||
|
||||
}
|
||||
|
||||
bool gToggleCompButton::activate(gEventType why) {
|
||||
if (why == gEventKeyDown || why == gEventMouseDown) {
|
||||
// playSound( MKTAG('C','B','T',3) );
|
||||
|
||||
selected = !selected;
|
||||
window.update(extent);
|
||||
gPanel::deactivate();
|
||||
notify(gEventNewValue, selected); // notify App of successful hit
|
||||
playMemSound(1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool gToggleCompButton::pointerHit(gPanelMessage &) {
|
||||
return activate(gEventMouseDown);
|
||||
}
|
||||
|
||||
void gToggleCompButton::select(uint16 val) {
|
||||
selected = val;
|
||||
|
||||
setCurrent(val);
|
||||
|
||||
if (getEnabled()) {
|
||||
window.update(extent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* gOwnerSelCompButton -- like a gCompButton but does not chage the *
|
||||
* GfxOwnerSelCompButton -- like a GfxCompButton but does not chage the *
|
||||
* selector bit *
|
||||
************************************************************************/
|
||||
|
||||
gOwnerSelCompButton::gOwnerSelCompButton(gPanelList &list, const Rect16 &box, void **images, int16 butRes, uint16 ident,
|
||||
AppFunc *cmd) : gCompButton(list, box, images, butRes, ident, cmd) {
|
||||
GfxOwnerSelCompButton::GfxOwnerSelCompButton(gPanelList &list, const Rect16 &box, void **images, int16 butRes, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompButton(list, box, images, butRes, ident, cmd) {
|
||||
|
||||
}
|
||||
|
||||
bool gOwnerSelCompButton::activate(gEventType why) {
|
||||
bool GfxOwnerSelCompButton::activate(gEventType why) {
|
||||
if (why == gEventKeyDown || why == gEventMouseDown) {
|
||||
// selected = !selected;
|
||||
// window.update( extent );
|
||||
@ -674,11 +621,11 @@ bool gOwnerSelCompButton::activate(gEventType why) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool gOwnerSelCompButton::pointerHit(gPanelMessage &) {
|
||||
bool GfxOwnerSelCompButton::pointerHit(gPanelMessage &) {
|
||||
return activate(gEventMouseDown);
|
||||
}
|
||||
|
||||
void gOwnerSelCompButton::select(uint16 val) {
|
||||
void GfxOwnerSelCompButton::select(uint16 val) {
|
||||
selected = val;
|
||||
|
||||
setCurrent(val);
|
||||
@ -689,11 +636,11 @@ void gOwnerSelCompButton::select(uint16 val) {
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* gMultCompButton -- like gCompButton but does any number of images *
|
||||
* GfxMultCompButton -- like GfxCompButton but does any number of images *
|
||||
************************************************************************/
|
||||
|
||||
gMultCompButton::gMultCompButton(gPanelList &list, const Rect16 &box, hResContext *con, char a, char b, char c, int16 resStart, int16 numRes, int16 initial, uint16 ident,
|
||||
AppFunc *cmd) : gCompButton(list, box, (hResContext *)NULL, 0, ident, cmd) {
|
||||
GfxMultCompButton::GfxMultCompButton(gPanelList &list, const Rect16 &box, hResContext *con, char a, char b, char c, int16 resStart, int16 numRes, int16 initial, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompButton(list, box, (hResContext *)NULL, 0, ident, cmd) {
|
||||
int16 i, k;
|
||||
|
||||
|
||||
@ -712,8 +659,8 @@ gMultCompButton::gMultCompButton(gPanelList &list, const Rect16 &box, hResContex
|
||||
extent = box;
|
||||
}
|
||||
|
||||
gMultCompButton::gMultCompButton(gPanelList &list, const Rect16 &box, void **newImages, int16 numRes, int16 initial, uint16 ident,
|
||||
AppFunc *cmd) : gCompButton(list, box, (hResContext *)NULL, 0, ident, cmd) {
|
||||
GfxMultCompButton::GfxMultCompButton(gPanelList &list, const Rect16 &box, void **newImages, int16 numRes, int16 initial, uint16 ident,
|
||||
AppFunc *cmd) : GfxCompButton(list, box, (hResContext *)NULL, 0, ident, cmd) {
|
||||
if (!newImages) {
|
||||
images = NULL;
|
||||
max = 0;
|
||||
@ -734,9 +681,9 @@ gMultCompButton::gMultCompButton(gPanelList &list, const Rect16 &box, void **new
|
||||
extent = box;
|
||||
}
|
||||
|
||||
gMultCompButton::gMultCompButton(gPanelList &list, const Rect16 &box, void **newImages,
|
||||
GfxMultCompButton::GfxMultCompButton(gPanelList &list, const Rect16 &box, void **newImages,
|
||||
int16 numRes, int16 initial, bool hitResponse, uint16 ident,
|
||||
AppFunc *cmd) : gCompButton(list, box, (hResContext *)NULL, 0, ident, cmd) {
|
||||
AppFunc *cmd) : GfxCompButton(list, box, (hResContext *)NULL, 0, ident, cmd) {
|
||||
if (!newImages) {
|
||||
images = NULL;
|
||||
max = 0;
|
||||
@ -757,7 +704,7 @@ gMultCompButton::gMultCompButton(gPanelList &list, const Rect16 &box, void **new
|
||||
extent = box;
|
||||
}
|
||||
|
||||
gMultCompButton::~gMultCompButton(void) {
|
||||
GfxMultCompButton::~GfxMultCompButton(void) {
|
||||
int16 i;
|
||||
|
||||
if (images && internalAlloc) {
|
||||
@ -772,7 +719,7 @@ gMultCompButton::~gMultCompButton(void) {
|
||||
}
|
||||
}
|
||||
|
||||
bool gMultCompButton::activate(gEventType why) {
|
||||
bool GfxMultCompButton::activate(gEventType why) {
|
||||
if (why == gEventKeyDown || why == gEventMouseDown) {
|
||||
if (response) {
|
||||
if (++current > max) {
|
||||
@ -789,22 +736,22 @@ bool gMultCompButton::activate(gEventType why) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool gMultCompButton::pointerHit(gPanelMessage &) {
|
||||
bool GfxMultCompButton::pointerHit(gPanelMessage &) {
|
||||
return activate(gEventMouseDown);
|
||||
}
|
||||
|
||||
void *gMultCompButton::getCurrentCompImage(void) {
|
||||
void *GfxMultCompButton::getCurrentCompImage(void) {
|
||||
return images[current];
|
||||
}
|
||||
|
||||
/* ===================================================================== *
|
||||
gSlider class
|
||||
GfxSlider class
|
||||
* ===================================================================== */
|
||||
|
||||
gSlider::gSlider(gPanelList &list, const Rect16 &box, const Rect16 &imageBox,
|
||||
GfxSlider::GfxSlider(gPanelList &list, const Rect16 &box, const Rect16 &imageBox,
|
||||
int16 sliderStart, int16 sliderEnd, void **newImages, int16 resStart,
|
||||
int16 initial, uint16 ident,
|
||||
AppFunc *cmd) : gMultCompButton(list, box, newImages, resStart, initial, ident, cmd) {
|
||||
AppFunc *cmd) : GfxMultCompButton(list, box, newImages, resStart, initial, ident, cmd) {
|
||||
int16 calcX;
|
||||
|
||||
imageRect = imageBox;
|
||||
@ -821,7 +768,7 @@ gSlider::gSlider(gPanelList &list, const Rect16 &box, const Rect16 &imageBox,
|
||||
extent.width - imageRect.x);
|
||||
}
|
||||
|
||||
void *gSlider::getCurrentCompImage(void) {
|
||||
void *GfxSlider::getCurrentCompImage(void) {
|
||||
int16 val;
|
||||
int32 index;
|
||||
|
||||
@ -838,7 +785,7 @@ void *gSlider::getCurrentCompImage(void) {
|
||||
return images[index];
|
||||
}
|
||||
|
||||
int16 gSlider::getSliderLenVal(void) {
|
||||
int16 GfxSlider::getSliderLenVal(void) {
|
||||
int16 val = 0;
|
||||
|
||||
if (slValMin < 0 && slValMax < 0) {
|
||||
@ -854,7 +801,7 @@ int16 gSlider::getSliderLenVal(void) {
|
||||
return val;
|
||||
}
|
||||
|
||||
void gSlider::draw(void) {
|
||||
void GfxSlider::draw(void) {
|
||||
gPort &port = window.windowPort;
|
||||
Point16 offset = Point16(0, 0);
|
||||
|
||||
@ -871,7 +818,7 @@ inline int16 quantizedVolume(uint16 trueVolume) {
|
||||
return quantized;
|
||||
}
|
||||
|
||||
void gSlider::drawClipped(gPort &port,
|
||||
void GfxSlider::drawClipped(gPort &port,
|
||||
const Point16 &offset,
|
||||
const Rect16 &r) {
|
||||
void *dispImage = getCurrentCompImage();
|
||||
@ -886,7 +833,7 @@ void gSlider::drawClipped(gPort &port,
|
||||
}
|
||||
}
|
||||
|
||||
bool gSlider::activate(gEventType why) {
|
||||
bool GfxSlider::activate(gEventType why) {
|
||||
if (why == gEventKeyDown || why == gEventMouseDown) {
|
||||
selected = 1;
|
||||
window.update(extent);
|
||||
@ -896,13 +843,13 @@ bool gSlider::activate(gEventType why) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void gSlider::deactivate(void) {
|
||||
void GfxSlider::deactivate(void) {
|
||||
selected = 0;
|
||||
window.update(extent);
|
||||
gPanel::deactivate();
|
||||
}
|
||||
|
||||
bool gSlider::pointerHit(gPanelMessage &msg) {
|
||||
bool GfxSlider::pointerHit(gPanelMessage &msg) {
|
||||
// update the image index
|
||||
updateSliderIndexes(msg.pickPos);
|
||||
|
||||
@ -913,7 +860,7 @@ bool gSlider::pointerHit(gPanelMessage &msg) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void gSlider::pointerMove(gPanelMessage &msg) {
|
||||
void GfxSlider::pointerMove(gPanelMessage &msg) {
|
||||
if (selected) {
|
||||
// update the image index
|
||||
updateSliderIndexes(msg.pickPos);
|
||||
@ -925,7 +872,7 @@ void gSlider::pointerMove(gPanelMessage &msg) {
|
||||
}
|
||||
}
|
||||
|
||||
void gSlider::pointerRelease(gPanelMessage &) {
|
||||
void GfxSlider::pointerRelease(gPanelMessage &) {
|
||||
// We have to test selected first because deactivate clears it.
|
||||
if (selected) {
|
||||
deactivate(); // give back input focus
|
||||
@ -933,7 +880,7 @@ void gSlider::pointerRelease(gPanelMessage &) {
|
||||
} else deactivate();
|
||||
}
|
||||
|
||||
void gSlider::pointerDrag(gPanelMessage &msg) {
|
||||
void GfxSlider::pointerDrag(gPanelMessage &msg) {
|
||||
// update the image index
|
||||
updateSliderIndexes(msg.pickPos);
|
||||
|
||||
@ -942,7 +889,7 @@ void gSlider::pointerDrag(gPanelMessage &msg) {
|
||||
window.update(extent);
|
||||
}
|
||||
|
||||
void gSlider::updateSliderIndexes(Point16 &pos) {
|
||||
void GfxSlider::updateSliderIndexes(Point16 &pos) {
|
||||
pos.x = quantizedVolume(pos.x);
|
||||
// get x position units
|
||||
int32 unit = (extent.width * 100) / clamp(1, pos.x, extent.width);
|
||||
|
@ -93,7 +93,7 @@ class GameObject;
|
||||
Compressed image class
|
||||
* ======================================================================= */
|
||||
|
||||
class gCompImage : public gControl {
|
||||
class GfxCompImage : public gControl {
|
||||
private:
|
||||
|
||||
enum {
|
||||
@ -124,18 +124,18 @@ public:
|
||||
leave = (1 << 1)
|
||||
};
|
||||
|
||||
gCompImage(gPanelList &, const Rect16 &, void *, uint16, AppFunc *cmd = NULL);
|
||||
GfxCompImage(gPanelList &, const Rect16 &, void *, uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompImage(gPanelList &, const Rect16 &, void *, const char *,
|
||||
GfxCompImage(gPanelList &, const Rect16 &, void *, const char *,
|
||||
textPallete &, uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompImage(gPanelList &, const Rect16 &, void **, int16, int16,
|
||||
GfxCompImage(gPanelList &, const Rect16 &, void **, int16, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompImage(gPanelList &, const Rect16 &, void **, int16, int16,
|
||||
GfxCompImage(gPanelList &, const Rect16 &, void **, int16, int16,
|
||||
const char *, textPallete &, uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompImage(gPanelList &list,
|
||||
GfxCompImage(gPanelList &list,
|
||||
const Rect16 &box,
|
||||
uint32 contextID,
|
||||
char a, char b, char c,
|
||||
@ -144,10 +144,10 @@ public:
|
||||
uint16 ident,
|
||||
AppFunc *cmd);
|
||||
|
||||
gCompImage(gPanelList &, const StaticRect &, void **, int16, int16,
|
||||
GfxCompImage(gPanelList &, const StaticRect &, void **, int16, int16,
|
||||
const char *, textPallete &, uint16, AppFunc *cmd = NULL);
|
||||
|
||||
~gCompImage(void);
|
||||
~GfxCompImage(void);
|
||||
|
||||
void pointerMove(gPanelMessage &msg);
|
||||
void enable(bool);
|
||||
@ -176,7 +176,7 @@ public:
|
||||
const Rect16 &);
|
||||
};
|
||||
|
||||
class gSpriteImage : public gCompImage {
|
||||
class GfxSpriteImage : public GfxCompImage {
|
||||
private:
|
||||
|
||||
// Color set to draw the object.
|
||||
@ -187,7 +187,7 @@ protected:
|
||||
|
||||
public:
|
||||
// this one takes a sprite pointer
|
||||
gSpriteImage(gPanelList &, const Rect16 &, GameObject *, char,
|
||||
GfxSpriteImage(gPanelList &, const Rect16 &, GameObject *, char,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
|
||||
@ -200,7 +200,7 @@ public:
|
||||
Compressed image button
|
||||
* ======================================================================= */
|
||||
|
||||
class gCompButton : public gCompImage {
|
||||
class GfxCompButton : public GfxCompImage {
|
||||
protected:
|
||||
void *forImage; // pointer to forground compress image data
|
||||
void *resImage; // pointer to resessed compressed image data
|
||||
@ -211,45 +211,45 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, hResContext *, hResID res1, hResID res2,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, hResContext *, hResID res1, hResID res2,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, hResID contextID, hResID res1, hResID res2,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, hResID contextID, hResID res1, hResID res2,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, hResContext *, char, char, char, int16, int16,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, hResContext *, char, char, char, int16, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, hResID, char, char, char, int16, int16,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, hResID, char, char, char, int16, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, hResContext *, uint32 resID, int8, int8,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, hResContext *, uint32 resID, int8, int8,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, hResID, uint32, int8, int8,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, hResID, uint32, int8, int8,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, hResContext *, int16,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, hResContext *, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, void **, int16,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, void **, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, void **, int16,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, void **, int16,
|
||||
const char *, textPallete &, uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, void **, int16, void *, bool,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, void **, int16, void *, bool,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, void *,
|
||||
GfxCompButton(gPanelList &, const Rect16 &, void *,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const StaticRect &, void **, int16,
|
||||
GfxCompButton(gPanelList &, const StaticRect &, void **, int16,
|
||||
const char *, textPallete &, uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gCompButton(gPanelList &, const Rect16 &, AppFunc *cmd = NULL);
|
||||
GfxCompButton(gPanelList &, const Rect16 &, AppFunc *cmd = NULL);
|
||||
|
||||
~gCompButton(void);
|
||||
~GfxCompButton(void);
|
||||
|
||||
|
||||
bool activate(gEventType why); // activate the control
|
||||
@ -279,43 +279,15 @@ protected:
|
||||
virtual void *getCurrentCompImage(void);
|
||||
};
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* gToggleCompButton -- like a gCompButton but toggle on and off. *
|
||||
************************************************************************/
|
||||
|
||||
class gToggleCompButton : public gCompButton {
|
||||
public:
|
||||
gToggleCompButton(gPanelList &, const Rect16 &, hResContext *, char, char, char, int16, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gToggleCompButton(gPanelList &, const Rect16 &, hResContext *, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gToggleCompButton(gPanelList &, const Rect16 &, void **, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gToggleCompButton(gPanelList &, const Rect16 &, void **, int16,
|
||||
char *, textPallete &, uint16, AppFunc *cmd = NULL);
|
||||
|
||||
protected:
|
||||
bool activate(gEventType why); // activate the control
|
||||
bool pointerHit(gPanelMessage &msg);
|
||||
|
||||
public:
|
||||
void select(uint16 val);
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* gOwnerSelCompButton -- like a gCompButton but does not chage the *
|
||||
* GfxOwnerSelCompButton -- like a GfxCompButton but does not chage the *
|
||||
* selector bit *
|
||||
************************************************************************/
|
||||
|
||||
class gOwnerSelCompButton : public gCompButton {
|
||||
class GfxOwnerSelCompButton : public GfxCompButton {
|
||||
public:
|
||||
|
||||
gOwnerSelCompButton(gPanelList &, const Rect16 &, void **, int16,
|
||||
GfxOwnerSelCompButton(gPanelList &, const Rect16 &, void **, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
//protected:
|
||||
@ -325,10 +297,10 @@ public:
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* gMultCompButton -- like gCompButton but does any number of images *
|
||||
* GfxMultCompButton -- like GfxCompButton but does any number of images *
|
||||
************************************************************************/
|
||||
|
||||
class gMultCompButton : public gCompButton {
|
||||
class GfxMultCompButton : public GfxCompButton {
|
||||
private:
|
||||
bool response; // tells whether to display an image when hit.
|
||||
|
||||
@ -341,17 +313,17 @@ protected:
|
||||
|
||||
|
||||
public:
|
||||
gMultCompButton(gPanelList &, const Rect16 &, hResContext *, char, char, char, int16, int16, int16,
|
||||
GfxMultCompButton(gPanelList &, const Rect16 &, hResContext *, char, char, char, int16, int16, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gMultCompButton(gPanelList &, const Rect16 &, void **, int16, int16,
|
||||
GfxMultCompButton(gPanelList &, const Rect16 &, void **, int16, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
gMultCompButton(gPanelList &, const Rect16 &, void **,
|
||||
GfxMultCompButton(gPanelList &, const Rect16 &, void **,
|
||||
int16, int16, bool,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
~gMultCompButton(void);
|
||||
~GfxMultCompButton(void);
|
||||
|
||||
int16 getCurrent(void) {
|
||||
return current;
|
||||
@ -380,10 +352,10 @@ protected:
|
||||
|
||||
|
||||
/* ===================================================================== *
|
||||
gSlider class
|
||||
GfxSlider class
|
||||
* ===================================================================== */
|
||||
|
||||
class gSlider : public gMultCompButton {
|
||||
class GfxSlider : public GfxMultCompButton {
|
||||
protected:
|
||||
Rect16 imageRect;
|
||||
int16 slValMin;
|
||||
@ -392,7 +364,7 @@ protected:
|
||||
int16 imagePosX;
|
||||
|
||||
public:
|
||||
gSlider(gPanelList &, const Rect16 &, const Rect16 &, int16, int16,
|
||||
GfxSlider(gPanelList &, const Rect16 &, const Rect16 &, int16, int16,
|
||||
void **, int16, int16,
|
||||
uint16, AppFunc *cmd = NULL);
|
||||
|
||||
|
@ -1162,7 +1162,7 @@ ContainerWindow::ContainerWindow(ContainerNode &nd,
|
||||
view = NULL;
|
||||
|
||||
// create the close button for this window
|
||||
closeCompButton = new gCompButton(
|
||||
closeCompButton = new GfxCompButton(
|
||||
*this,
|
||||
app.closeRect, // rect for button
|
||||
containerRes, // resource context
|
||||
@ -1189,7 +1189,7 @@ ScrollableContainerWindow::ScrollableContainerWindow(
|
||||
view = new ContainerView(*this, app.viewRect, nd, app);
|
||||
|
||||
// make the button conected to this window
|
||||
scrollCompButton = new gCompButton(
|
||||
scrollCompButton = new GfxCompButton(
|
||||
*this,
|
||||
app.scrollRect, // rect for button
|
||||
containerRes, // resource context
|
||||
@ -1274,7 +1274,7 @@ void TangibleContainerWindow::setContainerSprite(void) {
|
||||
sprPos.x = objRect.x - (spr->size.x >> 1); //objRect.x + ( spr->size.x >> 1 );
|
||||
sprPos.y = objRect.y - (spr->size.y >> 1);
|
||||
|
||||
containerSpriteImg = new gSpriteImage(
|
||||
containerSpriteImg = new GfxSpriteImage(
|
||||
*this,
|
||||
Rect16(sprPos.x,
|
||||
sprPos.y,
|
||||
@ -1312,7 +1312,7 @@ IntangibleContainerWindow::IntangibleContainerWindow(
|
||||
ContainerNode &nd, ContainerAppearanceDef &app)
|
||||
: ScrollableContainerWindow(nd, app, "MentalWindow") {
|
||||
// make the button conected to this window
|
||||
mindSelectorCompButton = new gMultCompButton(
|
||||
mindSelectorCompButton = new GfxMultCompButton(
|
||||
*this,
|
||||
Rect16(49, 15 - 13, 52, 67),
|
||||
containerRes,
|
||||
@ -1342,7 +1342,7 @@ EnchantmentContainerWindow::EnchantmentContainerWindow(
|
||||
view = new EnchantmentContainerView(*this, nd, app);
|
||||
|
||||
// make the button conected to this window
|
||||
scrollCompButton = new gCompButton(
|
||||
scrollCompButton = new GfxCompButton(
|
||||
*this,
|
||||
app.scrollRect, // rect for button
|
||||
containerRes, // resource context
|
||||
@ -1955,7 +1955,7 @@ APPFUNC(cmdMindContainerFunc) {
|
||||
g_vm->_mouseInfo->setText(textBuffer);
|
||||
}
|
||||
|
||||
if (ev.value == gCompImage::leave) {
|
||||
if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(NULL);
|
||||
}
|
||||
}
|
||||
@ -1977,9 +1977,9 @@ APPFUNC(cmdCloseButtonFunc) {
|
||||
g_vm->_mouseInfo->setText(NULL);
|
||||
}
|
||||
} else if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value == gCompImage::enter) {
|
||||
if (ev.value == GfxCompImage::enter) {
|
||||
g_vm->_mouseInfo->setText(CLOSE_MOUSE);
|
||||
} else if (ev.value == gCompImage::leave) {
|
||||
} else if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(NULL);
|
||||
}
|
||||
}
|
||||
@ -1997,9 +1997,9 @@ APPFUNC(cmdScrollFunc) {
|
||||
cw->scrollDown();
|
||||
ev.window->update(cw->getView().getExtent());
|
||||
} else if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value == gCompImage::enter) {
|
||||
if (ev.value == GfxCompImage::enter) {
|
||||
g_vm->_mouseInfo->setText(SCROLL_MOUSE);
|
||||
} else if (ev.value == gCompImage::leave) {
|
||||
} else if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(NULL);
|
||||
}
|
||||
}
|
||||
|
@ -50,9 +50,9 @@ struct ContainerAppearanceDef;
|
||||
class CMassWeightIndicator;
|
||||
class ProtoObj;
|
||||
|
||||
class gCompButton;
|
||||
class gCompImage;
|
||||
class gMultCompButton;
|
||||
class GfxCompButton;
|
||||
class GfxCompImage;
|
||||
class GfxMultCompButton;
|
||||
struct TilePoint;
|
||||
|
||||
/* ===================================================================== *
|
||||
@ -273,7 +273,7 @@ public:
|
||||
|
||||
class ContainerWindow : public FloatingWindow {
|
||||
protected:
|
||||
gCompButton *closeCompButton; // the close button object
|
||||
GfxCompButton *closeCompButton; // the close button object
|
||||
ContainerView *view; // the container view object
|
||||
|
||||
public:
|
||||
@ -294,7 +294,7 @@ public:
|
||||
// Base class for all container windows with scroll control
|
||||
class ScrollableContainerWindow : public ContainerWindow {
|
||||
protected:
|
||||
gCompButton *scrollCompButton;
|
||||
GfxCompButton *scrollCompButton;
|
||||
|
||||
public:
|
||||
ScrollableContainerWindow(ContainerNode &nd,
|
||||
@ -314,7 +314,7 @@ public:
|
||||
// A container window for tangible containers
|
||||
class TangibleContainerWindow : public ScrollableContainerWindow {
|
||||
private:
|
||||
gCompImage *containerSpriteImg;
|
||||
GfxCompImage *containerSpriteImg;
|
||||
CMassWeightIndicator *massWeightIndicator;
|
||||
|
||||
Rect16 objRect;
|
||||
@ -339,7 +339,7 @@ class IntangibleContainerWindow : public ScrollableContainerWindow {
|
||||
protected:
|
||||
friend void setMindContainer(int index, IntangibleContainerWindow &cw);
|
||||
private:
|
||||
gMultCompButton *mindSelectorCompButton;
|
||||
GfxMultCompButton *mindSelectorCompButton;
|
||||
|
||||
public:
|
||||
|
||||
@ -348,7 +348,7 @@ public:
|
||||
|
||||
class EnchantmentContainerWindow : public ContainerWindow {
|
||||
protected:
|
||||
gCompButton *scrollCompButton;
|
||||
GfxCompButton *scrollCompButton;
|
||||
|
||||
public:
|
||||
EnchantmentContainerWindow(ContainerNode &nd,
|
||||
|
@ -732,7 +732,7 @@ int16 openScroll(uint16 textScript) {
|
||||
CDocument *win = NULL;
|
||||
|
||||
// close button
|
||||
gCompButton *closeScroll;
|
||||
GfxCompButton *closeScroll;
|
||||
void **closeBtnImage;
|
||||
uint16 buttonResID = 0;
|
||||
hResContext *decRes;
|
||||
@ -747,7 +747,7 @@ int16 openScroll(uint16 textScript) {
|
||||
win = new CDocument(scrollAppearance, bookText, &Script10Font, 0, NULL);
|
||||
|
||||
// make the quit button
|
||||
closeScroll = new gCompButton(*win, scrollAppearance.closeRect, closeBtnImage, numBtnImages, 0, cmdDocumentQuit);
|
||||
closeScroll = new GfxCompButton(*win, scrollAppearance.closeRect, closeBtnImage, numBtnImages, 0, cmdDocumentQuit);
|
||||
|
||||
closeScroll->accelKey = 0x1B;
|
||||
|
||||
@ -790,7 +790,7 @@ int16 openBook(uint16 textScript) {
|
||||
// point to book
|
||||
CDocument *win = NULL;
|
||||
|
||||
gCompButton *closeBook;
|
||||
GfxCompButton *closeBook;
|
||||
hResContext *decRes;
|
||||
|
||||
decRes = resFile->newContext(MKTAG('S', 'C', 'R', 'L'), "book resources");
|
||||
@ -799,7 +799,7 @@ int16 openBook(uint16 textScript) {
|
||||
win = new CDocument(bookAppearance, bookText, &Script10Font, 0, NULL);
|
||||
|
||||
// make the quit button
|
||||
closeBook = new gCompButton(*win, bookAppearance.closeRect, cmdDocumentQuit);
|
||||
closeBook = new GfxCompButton(*win, bookAppearance.closeRect, cmdDocumentQuit);
|
||||
closeBook->accelKey = 0x1B;
|
||||
|
||||
// attach the structure to the book, open the book
|
||||
@ -836,7 +836,7 @@ int16 openParchment(uint16 textScript) {
|
||||
// point to book
|
||||
CDocument *win = NULL;
|
||||
|
||||
gCompButton *closeParchment;
|
||||
GfxCompButton *closeParchment;
|
||||
hResContext *decRes;
|
||||
|
||||
decRes = resFile->newContext(MKTAG('S', 'C', 'R', 'L'), "book resources");
|
||||
@ -844,7 +844,7 @@ int16 openParchment(uint16 textScript) {
|
||||
// create the window
|
||||
win = new CDocument(parchAppearance, bookText, &Script10Font, 0, NULL);
|
||||
// make the quit button
|
||||
closeParchment = new gCompButton(*win, parchAppearance.closeRect, cmdDocumentQuit);
|
||||
closeParchment = new GfxCompButton(*win, parchAppearance.closeRect, cmdDocumentQuit);
|
||||
closeParchment->accelKey = 0x1B;
|
||||
|
||||
// attach the structure to the book, open the book
|
||||
|
@ -58,9 +58,9 @@ extern uint8 fixedColors[16];
|
||||
Classes
|
||||
* ===================================================================== */
|
||||
|
||||
// Private subclass of gCompImage for armor display
|
||||
// Private subclass of GfxCompImage for armor display
|
||||
|
||||
class gArmorIndicator : public gCompImage {
|
||||
class gArmorIndicator : public GfxCompImage {
|
||||
public:
|
||||
ArmorAttributes attr;
|
||||
void drawClipped(gPort &,
|
||||
@ -70,7 +70,7 @@ public:
|
||||
void setValue(PlayerActorID pID);
|
||||
|
||||
gArmorIndicator(gPanelList &list, const Rect16 &box, void *img, uint16 ident, AppFunc *cmd = nullptr)
|
||||
: gCompImage(list, box, img, ident, cmd) {
|
||||
: GfxCompImage(list, box, img, ident, cmd) {
|
||||
attr.damageAbsorbtion = 0;
|
||||
attr.damageDivider = 1;
|
||||
attr.defenseBonus = 0;
|
||||
@ -288,38 +288,38 @@ static const StaticRect botBox[numButtons] = {
|
||||
|
||||
|
||||
// options button
|
||||
gCompButton *optBtn;
|
||||
GfxCompButton *optBtn;
|
||||
gEnchantmentDisplay *enchDisp;
|
||||
|
||||
// brother buttons
|
||||
gOwnerSelCompButton *julBtn;
|
||||
gOwnerSelCompButton *phiBtn;
|
||||
gOwnerSelCompButton *kevBtn;
|
||||
gCompImage *broBtnFrame;
|
||||
GfxOwnerSelCompButton *julBtn;
|
||||
GfxOwnerSelCompButton *phiBtn;
|
||||
GfxOwnerSelCompButton *kevBtn;
|
||||
GfxCompImage *broBtnFrame;
|
||||
|
||||
|
||||
// trio controls
|
||||
gMultCompButton *portBtns[kNumViews];
|
||||
gOwnerSelCompButton *aggressBtns[kNumViews];
|
||||
//gCompButton *jumpBtns[kNumViews];
|
||||
gOwnerSelCompButton *centerBtns[kNumViews];
|
||||
gOwnerSelCompButton *bandingBtns[kNumViews];
|
||||
gCompImage *namePlates[kNumViews];
|
||||
gCompImage *namePlateFrames[kNumViews];
|
||||
GfxMultCompButton *portBtns[kNumViews];
|
||||
GfxOwnerSelCompButton *aggressBtns[kNumViews];
|
||||
//GfxCompButton *jumpBtns[kNumViews];
|
||||
GfxOwnerSelCompButton *centerBtns[kNumViews];
|
||||
GfxOwnerSelCompButton *bandingBtns[kNumViews];
|
||||
GfxCompImage *namePlates[kNumViews];
|
||||
GfxCompImage *namePlateFrames[kNumViews];
|
||||
gArmorIndicator *armorInd[kNumViews];
|
||||
|
||||
// individual
|
||||
gMultCompButton *indivPortBtn;
|
||||
gOwnerSelCompButton *indivAggressBtn;
|
||||
//gCompButton *indivJumpBtn;
|
||||
gOwnerSelCompButton *indivCenterBtn;
|
||||
gOwnerSelCompButton *indivBandingBtn;
|
||||
gCompImage *indivNamePlate;
|
||||
gCompImage *indivNamePlateFrame;
|
||||
GfxMultCompButton *indivPortBtn;
|
||||
GfxOwnerSelCompButton *indivAggressBtn;
|
||||
//GfxCompButton *indivJumpBtn;
|
||||
GfxOwnerSelCompButton *indivCenterBtn;
|
||||
GfxOwnerSelCompButton *indivBandingBtn;
|
||||
GfxCompImage *indivNamePlate;
|
||||
GfxCompImage *indivNamePlateFrame;
|
||||
gArmorIndicator *indivArmorInd;
|
||||
|
||||
// mental button/indicators
|
||||
gCompButton *menConBtn;
|
||||
GfxCompButton *menConBtn;
|
||||
|
||||
|
||||
// [brother panels] compressed image non-allocated pointer arrays
|
||||
@ -495,8 +495,8 @@ void CPlaqText::drawClipped(gPort &port,
|
||||
Portrait control class
|
||||
* ===================================================================== */
|
||||
|
||||
CPortrait::CPortrait(gMultCompButton **portraits,
|
||||
gMultCompButton *indivPort,
|
||||
CPortrait::CPortrait(GfxMultCompButton **portraits,
|
||||
GfxMultCompButton *indivPort,
|
||||
const uint16 numPorts,
|
||||
uint16 numBrothers) { // numBrothers = post 1
|
||||
// do some checking
|
||||
@ -749,7 +749,7 @@ CMassWeightIndicator::CMassWeightIndicator(gPanelList *panel, const Point16 &pos
|
||||
|
||||
// attach controls to the indivControls panel
|
||||
// these butttons will get deactivated along with the panel
|
||||
pieMass = new gCompImage(*panel,
|
||||
pieMass = new GfxCompImage(*panel,
|
||||
Rect16(massPiePos.x, massPiePos.y, pieXSize, pieYSize),
|
||||
pieIndImag,
|
||||
numPieIndImages,
|
||||
@ -757,7 +757,7 @@ CMassWeightIndicator::CMassWeightIndicator(gPanelList *panel, const Point16 &pos
|
||||
type,
|
||||
cmdMassInd);
|
||||
|
||||
pieBulk = new gCompImage(*panel,
|
||||
pieBulk = new GfxCompImage(*panel,
|
||||
Rect16(bulkPiePos.x, bulkPiePos.y, pieXSize, pieYSize),
|
||||
pieIndImag,
|
||||
numPieIndImages,
|
||||
@ -766,7 +766,7 @@ CMassWeightIndicator::CMassWeightIndicator(gPanelList *panel, const Point16 &pos
|
||||
cmdBulkInd);
|
||||
|
||||
// mass/bulk back image
|
||||
new gCompImage(*panel,
|
||||
new GfxCompImage(*panel,
|
||||
Rect16(backImagePos.x, backImagePos.y, backImageXSize, backImageYSize),
|
||||
massBulkImag,
|
||||
uiIndiv,
|
||||
@ -858,7 +858,7 @@ static uint8 manaColorMap[CManaIndicator::numManaTypes][CManaIndicator::numManaC
|
||||
};
|
||||
|
||||
|
||||
CManaIndicator::CManaIndicator(gPanelList &list) : gCompImage(list,
|
||||
CManaIndicator::CManaIndicator(gPanelList &list) : GfxCompImage(list,
|
||||
Rect16(x, y, xSize, ySize),
|
||||
nullptr,
|
||||
0,
|
||||
@ -1263,7 +1263,7 @@ CHealthIndicator::CHealthIndicator(AppFunc *cmd) {
|
||||
// health controls for the trio view
|
||||
// deallocated with panel
|
||||
for (i = 0; i < numControls; i++) {
|
||||
starBtns[i] = new gCompImage(*trioControls,
|
||||
starBtns[i] = new GfxCompImage(*trioControls,
|
||||
Rect16(starXPos,
|
||||
starYPos + starYOffset * i,
|
||||
starXSize,
|
||||
@ -1276,7 +1276,7 @@ CHealthIndicator::CHealthIndicator(AppFunc *cmd) {
|
||||
|
||||
|
||||
// image control for the star border/frame trio mode
|
||||
new gCompImage(*trioControls,
|
||||
new GfxCompImage(*trioControls,
|
||||
Rect16(frameXPos,
|
||||
frameYPos + starYOffset * i,
|
||||
frameXSize,
|
||||
@ -1289,7 +1289,7 @@ CHealthIndicator::CHealthIndicator(AppFunc *cmd) {
|
||||
}
|
||||
// health control for individual mode
|
||||
// deallocated with panel
|
||||
indivStarBtn = new gCompImage(*indivControls,
|
||||
indivStarBtn = new GfxCompImage(*indivControls,
|
||||
Rect16(starXPos,
|
||||
starYPos,
|
||||
starXSize,
|
||||
@ -1301,7 +1301,7 @@ CHealthIndicator::CHealthIndicator(AppFunc *cmd) {
|
||||
cmd);
|
||||
|
||||
// image control for the star border/frame indiv mode
|
||||
new gCompImage(*indivControls,
|
||||
new GfxCompImage(*indivControls,
|
||||
Rect16(frameXPos,
|
||||
frameYPos,
|
||||
frameXSize,
|
||||
@ -1328,7 +1328,7 @@ CHealthIndicator::~CHealthIndicator(void) {
|
||||
|
||||
// Recalculate and update the health star for a particular brother
|
||||
|
||||
void CHealthIndicator::updateStar(gCompImage *starCtl, int32 bro, int32 baseVitality, int32 curVitality) {
|
||||
void CHealthIndicator::updateStar(GfxCompImage *starCtl, int32 bro, int32 baseVitality, int32 curVitality) {
|
||||
assert(baseVitality >= 0);
|
||||
|
||||
int16 maxStar, imageIndex;
|
||||
@ -1607,20 +1607,20 @@ void SetupUserControls(void) {
|
||||
|
||||
// setup stand alone controls
|
||||
|
||||
optBtn = new gCompButton(*playControls, optBtnRect, optBtnImag, numBtnImages, 0, cmdOptions);
|
||||
optBtn = new GfxCompButton(*playControls, optBtnRect, optBtnImag, numBtnImages, 0, cmdOptions);
|
||||
|
||||
enchDisp = new gEnchantmentDisplay(*playControls, 0);
|
||||
|
||||
// setup the trio user cntl buttons
|
||||
for (n = 0; n < kNumViews; n++) {
|
||||
// portrait button
|
||||
portBtns[n] = new gMultCompButton(*trioControls, views[n][index++],
|
||||
portBtns[n] = new GfxMultCompButton(*trioControls, views[n][index++],
|
||||
portImag[n], numPortImages, 0, false, brotherIDs[n], cmdPortrait);
|
||||
|
||||
portBtns[n]->setMousePoll(true);
|
||||
|
||||
// aggressive button
|
||||
aggressBtns[n] = new gOwnerSelCompButton(*trioControls, views[n][index++],
|
||||
aggressBtns[n] = new GfxOwnerSelCompButton(*trioControls, views[n][index++],
|
||||
aggressImag, numBtnImages, brotherIDs[n], cmdAggressive);
|
||||
|
||||
// name plates that go under the portraits
|
||||
@ -1628,19 +1628,19 @@ void SetupUserControls(void) {
|
||||
armorImag, brotherIDs[n], cmdArmor);
|
||||
|
||||
// center on brother
|
||||
centerBtns[n] = new gOwnerSelCompButton(*trioControls, views[n][index++],
|
||||
centerBtns[n] = new GfxOwnerSelCompButton(*trioControls, views[n][index++],
|
||||
centerImag, numBtnImages, brotherIDs[n], cmdCenter);
|
||||
|
||||
// banding
|
||||
bandingBtns[n] = new gOwnerSelCompButton(*trioControls, views[n][index++],
|
||||
bandingBtns[n] = new GfxOwnerSelCompButton(*trioControls, views[n][index++],
|
||||
bandingImag, numBtnImages, brotherIDs[n], cmdBand);
|
||||
|
||||
// name plates that go under the portraits
|
||||
namePlates[n] = new gCompImage(*trioControls, views[n][index++],
|
||||
namePlates[n] = new GfxCompImage(*trioControls, views[n][index++],
|
||||
namePlateImages[n], 0, nullptr);
|
||||
|
||||
// the frames for the name plates
|
||||
namePlateFrames[n] = new gCompImage(*trioControls, views[n][index++],
|
||||
namePlateFrames[n] = new GfxCompImage(*trioControls, views[n][index++],
|
||||
namePlateFrameImag, 0, nullptr);
|
||||
|
||||
index = 0;
|
||||
@ -1649,30 +1649,30 @@ void SetupUserControls(void) {
|
||||
// individual control buttons
|
||||
|
||||
// portrait button
|
||||
indivPortBtn = new gMultCompButton(*indivControls, views[0][index++],
|
||||
indivPortBtn = new GfxMultCompButton(*indivControls, views[0][index++],
|
||||
portImag[0], numPortImages, 0, false, uiIndiv, cmdPortrait);
|
||||
indivPortBtn->setMousePoll(true);
|
||||
|
||||
// aggressive button
|
||||
indivAggressBtn = new gOwnerSelCompButton(*indivControls, views[0][index++],
|
||||
indivAggressBtn = new GfxOwnerSelCompButton(*indivControls, views[0][index++],
|
||||
aggressImag, numBtnImages, uiIndiv, cmdAggressive);
|
||||
|
||||
indivArmorInd = new gArmorIndicator(*indivControls, views[0][index++],
|
||||
armorImag, uiIndiv, cmdArmor);
|
||||
// center on brother
|
||||
indivCenterBtn = new gOwnerSelCompButton(*indivControls, views[0][index++],
|
||||
indivCenterBtn = new GfxOwnerSelCompButton(*indivControls, views[0][index++],
|
||||
centerImag, numBtnImages, uiIndiv, cmdCenter);
|
||||
|
||||
// banding
|
||||
indivBandingBtn = new gOwnerSelCompButton(*indivControls, views[0][index++],
|
||||
indivBandingBtn = new GfxOwnerSelCompButton(*indivControls, views[0][index++],
|
||||
bandingImag, numBtnImages, uiIndiv, cmdBand);
|
||||
|
||||
// name plates that go under the portraits
|
||||
indivNamePlate = new gCompImage(*indivControls, views[0][index++],
|
||||
indivNamePlate = new GfxCompImage(*indivControls, views[0][index++],
|
||||
namePlateImages[0], 0, nullptr);
|
||||
|
||||
// the frames for the name plates
|
||||
indivNamePlateFrame = new gCompImage(*indivControls, views[0][index++],
|
||||
indivNamePlateFrame = new GfxCompImage(*indivControls, views[0][index++],
|
||||
namePlateFrameImag, 0, nullptr);
|
||||
|
||||
// setup the portrait object
|
||||
@ -1683,15 +1683,15 @@ void SetupUserControls(void) {
|
||||
|
||||
|
||||
// mental container button
|
||||
menConBtn = new gCompButton(*indivControls, menConBtnRect, menConBtnImag, numBtnImages, uiIndiv, cmdBrain);
|
||||
menConBtn = new GfxCompButton(*indivControls, menConBtnRect, menConBtnImag, numBtnImages, uiIndiv, cmdBrain);
|
||||
|
||||
// brother selection buttons >>> need to replace these with sticky buttons
|
||||
julBtn = new gOwnerSelCompButton(*indivControls, julBtnRect, julBtnImag, numBtnImages, uiJulian, cmdBroChange);
|
||||
phiBtn = new gOwnerSelCompButton(*indivControls, phiBtnRect, phiBtnImag, numBtnImages, uiPhillip, cmdBroChange);
|
||||
kevBtn = new gOwnerSelCompButton(*indivControls, kevBtnRect, kevBtnImag, numBtnImages, uiKevin, cmdBroChange);
|
||||
julBtn = new GfxOwnerSelCompButton(*indivControls, julBtnRect, julBtnImag, numBtnImages, uiJulian, cmdBroChange);
|
||||
phiBtn = new GfxOwnerSelCompButton(*indivControls, phiBtnRect, phiBtnImag, numBtnImages, uiPhillip, cmdBroChange);
|
||||
kevBtn = new GfxOwnerSelCompButton(*indivControls, kevBtnRect, kevBtnImag, numBtnImages, uiKevin, cmdBroChange);
|
||||
|
||||
// frame for brother buttons
|
||||
broBtnFrame = new gCompImage(*indivControls, broBtnRect, broBtnFrameImag, uiIndiv, nullptr);
|
||||
broBtnFrame = new GfxCompImage(*indivControls, broBtnRect, broBtnFrameImag, uiIndiv, nullptr);
|
||||
|
||||
// make the mana indicator
|
||||
ManaIndicator = new CManaIndicator(*indivControls);
|
||||
@ -2156,7 +2156,7 @@ APPFUNC(cmdPortrait) {
|
||||
|
||||
case gEventMouseMove:
|
||||
|
||||
if (ev.value == gCompImage::leave) {
|
||||
if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(nullptr);
|
||||
g_vm->_mouseInfo->setDoable(true);
|
||||
break;
|
||||
@ -2232,12 +2232,12 @@ APPFUNC(cmdAggressive) {
|
||||
// }
|
||||
// else setAggression( transBroID, !wasAggressive );
|
||||
} else if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value == gCompImage::enter) {
|
||||
if (ev.value == GfxCompImage::enter) {
|
||||
// set the text in the cursor
|
||||
g_vm->_mouseInfo->setText(isAggressive(transBroID)
|
||||
? ON_AGRESS
|
||||
: OFF_AGRESS);
|
||||
} else if (ev.value == gCompImage::leave) {
|
||||
} else if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(nullptr);
|
||||
}
|
||||
}
|
||||
@ -2265,7 +2265,7 @@ APPFUNC( cmdJump )
|
||||
APPFUNC(cmdArmor) {
|
||||
if (ev.eventType == gEventMouseMove) {
|
||||
|
||||
if (ev.value == gCompImage::enter) {
|
||||
if (ev.value == GfxCompImage::enter) {
|
||||
gArmorIndicator *gai = (gArmorIndicator *)ev.panel;
|
||||
char buf[128];
|
||||
|
||||
@ -2282,7 +2282,7 @@ APPFUNC(cmdArmor) {
|
||||
// set the text in the cursor
|
||||
g_vm->_mouseInfo->setText(buf);
|
||||
}
|
||||
} else if (ev.value == gCompImage::leave) {
|
||||
} else if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(nullptr);
|
||||
}
|
||||
}
|
||||
@ -2297,12 +2297,12 @@ APPFUNC(cmdCenter) {
|
||||
else setCenterBrother(transBroID);
|
||||
}
|
||||
if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value == gCompImage::enter) {
|
||||
if (ev.value == GfxCompImage::enter) {
|
||||
// set the text in the cursor
|
||||
g_vm->_mouseInfo->setText(getCenterActorPlayerID() == transBroID
|
||||
? ON_CENTER
|
||||
: OFF_CENTER);
|
||||
} else if (ev.value == gCompImage::leave) {
|
||||
} else if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(nullptr);
|
||||
}
|
||||
}
|
||||
@ -2331,12 +2331,12 @@ APPFUNC(cmdBand) {
|
||||
// }
|
||||
// else setBanded( transBroID, !wasBanded );
|
||||
} else if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value == gCompImage::enter) {
|
||||
if (ev.value == GfxCompImage::enter) {
|
||||
// set the text in the cursor
|
||||
g_vm->_mouseInfo->setText(isBanded(transBroID)
|
||||
? ON_BANDED
|
||||
: OFF_BANDED);
|
||||
} else if (ev.value == gCompImage::leave) {
|
||||
} else if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(nullptr);
|
||||
}
|
||||
}
|
||||
@ -2347,8 +2347,8 @@ APPFUNC(cmdOptions) {
|
||||
OptionsDialog();
|
||||
//openOptionsPanel();
|
||||
} else if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value == gCompImage::enter) g_vm->_mouseInfo->setText(OPTIONS_PANEL);
|
||||
else if (ev.value == gCompImage::leave) g_vm->_mouseInfo->setText(nullptr);
|
||||
if (ev.value == GfxCompImage::enter) g_vm->_mouseInfo->setText(OPTIONS_PANEL);
|
||||
else if (ev.value == GfxCompImage::leave) g_vm->_mouseInfo->setText(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2367,7 +2367,7 @@ APPFUNC(cmdBroChange) {
|
||||
|
||||
uint16 panID = ev.panel->id;
|
||||
|
||||
if (ev.value == gCompImage::enter) {
|
||||
if (ev.value == GfxCompImage::enter) {
|
||||
// working buffer
|
||||
char buf[bufSize];
|
||||
char state[stateBufSize];
|
||||
@ -2388,7 +2388,7 @@ APPFUNC(cmdBroChange) {
|
||||
}
|
||||
// set the text in the cursor
|
||||
g_vm->_mouseInfo->setText(buf);
|
||||
} else if (ev.value == gCompImage::leave) {
|
||||
} else if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(nullptr);
|
||||
}
|
||||
}
|
||||
@ -2398,12 +2398,12 @@ APPFUNC(cmdHealthStar) {
|
||||
uint16 transBroID = translatePanID(ev.panel->id);
|
||||
|
||||
if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value == gCompImage::leave) {
|
||||
if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ev.value == gCompImage::enter) {
|
||||
if (ev.value == GfxCompImage::enter) {
|
||||
ev.panel->setMousePoll(true);
|
||||
}
|
||||
|
||||
@ -2423,7 +2423,7 @@ APPFUNC(cmdMassInd) {
|
||||
GameObject *containerObject = nullptr;
|
||||
|
||||
if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value == gCompImage::enter) {
|
||||
if (ev.value == GfxCompImage::enter) {
|
||||
const int bufSize = 40;
|
||||
int curWeight;
|
||||
uint16 baseWeight;
|
||||
@ -2449,7 +2449,7 @@ APPFUNC(cmdMassInd) {
|
||||
g_vm->_mouseInfo->setText(buf);
|
||||
} else
|
||||
g_vm->_mouseInfo->setText(UNK_WEIGHT_HINT);
|
||||
} else if (ev.value == gCompImage::leave) {
|
||||
} else if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(nullptr);
|
||||
}
|
||||
}
|
||||
@ -2461,7 +2461,7 @@ APPFUNC(cmdBulkInd) {
|
||||
|
||||
|
||||
if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value == gCompImage::enter) {
|
||||
if (ev.value == GfxCompImage::enter) {
|
||||
const int bufSize = 40;
|
||||
uint16 baseBulk = 100;
|
||||
char buf[bufSize];
|
||||
@ -2487,7 +2487,7 @@ APPFUNC(cmdBulkInd) {
|
||||
g_vm->_mouseInfo->setText(buf);
|
||||
} else
|
||||
g_vm->_mouseInfo->setText(UNK_BULK_HINT);
|
||||
} else if (ev.value == gCompImage::leave) {
|
||||
} else if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(nullptr);
|
||||
}
|
||||
}
|
||||
@ -2495,7 +2495,7 @@ APPFUNC(cmdBulkInd) {
|
||||
|
||||
APPFUNC(cmdManaInd) {
|
||||
if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value != gCompImage::leave) {
|
||||
if (ev.value != GfxCompImage::leave) {
|
||||
const int BUF_SIZE = 64;
|
||||
char textBuffer[BUF_SIZE];
|
||||
int manaType = -1;
|
||||
|
@ -269,14 +269,14 @@ private:
|
||||
PortraitType currentState[kNumViews + 1];
|
||||
uint16 numButtons;
|
||||
uint16 _numViews;
|
||||
gMultCompButton **buttons;
|
||||
gMultCompButton *indivButton;
|
||||
GfxMultCompButton **buttons;
|
||||
GfxMultCompButton *indivButton;
|
||||
|
||||
void setPortrait(uint16);
|
||||
|
||||
public:
|
||||
// button array, number of buttons per view, num views
|
||||
CPortrait(gMultCompButton *[], gMultCompButton *, const uint16, uint16);
|
||||
CPortrait(GfxMultCompButton *[], GfxMultCompButton *, const uint16, uint16);
|
||||
|
||||
void ORset(uint16, PortraitType type);
|
||||
void set(uint16 brotherID, PortraitType type);
|
||||
@ -332,8 +332,8 @@ private:
|
||||
void **pieIndImag;
|
||||
|
||||
// image control buttons
|
||||
gCompImage *pieMass;
|
||||
gCompImage *pieBulk;
|
||||
GfxCompImage *pieMass;
|
||||
GfxCompImage *pieBulk;
|
||||
|
||||
|
||||
public:
|
||||
@ -363,7 +363,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class CManaIndicator : public gCompImage {
|
||||
class CManaIndicator : public GfxCompImage {
|
||||
public:
|
||||
|
||||
// sizes of the mana star images
|
||||
@ -584,8 +584,8 @@ private:
|
||||
hResContext *healthRes;
|
||||
|
||||
// buttons
|
||||
gCompImage *starBtns[numControls];
|
||||
gCompImage *indivStarBtn;
|
||||
GfxCompImage *starBtns[numControls];
|
||||
GfxCompImage *indivStarBtn;
|
||||
|
||||
// array of pointer to the star imagery
|
||||
void **starImag;
|
||||
@ -593,7 +593,7 @@ private:
|
||||
// health star frame imagery
|
||||
void *starFrameImag;
|
||||
|
||||
void updateStar(gCompImage *starCtl, int32 bro, int32 baseVitality, int32 curVitality);
|
||||
void updateStar(GfxCompImage *starCtl, int32 bro, int32 baseVitality, int32 curVitality);
|
||||
|
||||
public:
|
||||
uint16 starIDs[3];
|
||||
|
@ -4375,7 +4375,7 @@ APPFUNC(cmdBrain) {
|
||||
}
|
||||
}
|
||||
} else if (ev.eventType == gEventMouseMove) {
|
||||
if (ev.value == gCompImage::leave) {
|
||||
if (ev.value == GfxCompImage::leave) {
|
||||
g_vm->_mouseInfo->setText(nullptr);
|
||||
} else { //if (ev.value == gCompImage::enter)
|
||||
// set the text in the cursor
|
||||
|
@ -534,7 +534,7 @@ static StaticWindow messageDecorations[kNumMessagePanels] = {
|
||||
|
||||
|
||||
// pointer to the auto aggression button
|
||||
gOwnerSelCompButton *autoAggressBtn,
|
||||
GfxOwnerSelCompButton *autoAggressBtn,
|
||||
*autoWeaponBtn,
|
||||
*nightBtn,
|
||||
*speechTextBtn;
|
||||
@ -696,17 +696,17 @@ int16 FileDialog(int16 fileProcess) {
|
||||
win = new ModalWindow(saveLoadWindowRect, 0, nullptr);
|
||||
|
||||
// make the quit button
|
||||
new gCompButton(*win, *saveLoadButtonRects[0], pushBtnIm, numBtnImages, btnStrings[stringIndex][0], pal, 0, cmdDialogQuit);
|
||||
new GfxCompButton(*win, *saveLoadButtonRects[0], pushBtnIm, numBtnImages, btnStrings[stringIndex][0], pal, 0, cmdDialogQuit);
|
||||
//t->accelKey=0x1B;
|
||||
|
||||
// make the Save/Load button
|
||||
new gCompButton(*win, *saveLoadButtonRects[1], pushBtnIm, numBtnImages, btnStrings[stringIndex][1], pal, fileProcess, fileCommands[fileProcess]);
|
||||
new GfxCompButton(*win, *saveLoadButtonRects[1], pushBtnIm, numBtnImages, btnStrings[stringIndex][1], pal, fileProcess, fileCommands[fileProcess]);
|
||||
//t->accelKey=0x0D;
|
||||
// make the up arrow
|
||||
new gCompButton(*win, *saveLoadButtonRects[2], arrowUpIm, numBtnImages, 0, cmdSaveDialogUp);
|
||||
new GfxCompButton(*win, *saveLoadButtonRects[2], arrowUpIm, numBtnImages, 0, cmdSaveDialogUp);
|
||||
//t->accelKey=33+0x80;
|
||||
// make the down arrow
|
||||
new gCompButton(*win, *saveLoadButtonRects[3], arrowDnIm, numBtnImages, 0, cmdSaveDialogDown);
|
||||
new GfxCompButton(*win, *saveLoadButtonRects[3], arrowDnIm, numBtnImages, 0, cmdSaveDialogDown);
|
||||
//t->accelKey=34+0x80;
|
||||
// attach the title
|
||||
new CPlaqText(*win, *saveLoadTextRects[0], textStrings[stringIndex][0], &Plate18Font, 0, pal, 0, nullptr);
|
||||
@ -842,60 +842,60 @@ int16 OptionsDialog(bool disableSaveResume) {
|
||||
|
||||
// create the window
|
||||
win = new ModalWindow(optionsWindowRect, 0, nullptr);
|
||||
gCompButton *t;
|
||||
GfxCompButton *t;
|
||||
|
||||
// buttons
|
||||
if (!disableSaveResume) {
|
||||
t = new gCompButton(*win, *optionsButtonRects[0],
|
||||
t = new GfxCompButton(*win, *optionsButtonRects[0],
|
||||
dialogPushImag, numBtnImages, btnStrings[0], pal, 0, cmdDialogQuit);
|
||||
t->accelKey = 0x1B;
|
||||
|
||||
t = new gCompButton(*win, *optionsButtonRects[1],
|
||||
t = new GfxCompButton(*win, *optionsButtonRects[1],
|
||||
dialogPushImag, numBtnImages, btnStrings[1], pal, 0, cmdOptionsSaveGame); // make the quit button
|
||||
t->accelKey = 'S';
|
||||
} else {
|
||||
t = new gCompButton(*win, *optionsButtonRects[1],
|
||||
t = new GfxCompButton(*win, *optionsButtonRects[1],
|
||||
dialogPushImag, numBtnImages, OPTN_DIALOG_BUTTON6, pal, 0, cmdOptionsNewGame);
|
||||
t->accelKey = 'N';
|
||||
}
|
||||
|
||||
t = new gCompButton(*win, *optionsButtonRects[2],
|
||||
t = new GfxCompButton(*win, *optionsButtonRects[2],
|
||||
dialogPushImag, numBtnImages, btnStrings[2], pal, 0, cmdOptionsLoadGame); // make the quit button
|
||||
t->accelKey = 'L';
|
||||
|
||||
t = new gCompButton(*win, *optionsButtonRects[3],
|
||||
t = new GfxCompButton(*win, *optionsButtonRects[3],
|
||||
dialogPushImag, numBtnImages, btnStrings[3], pal, 0, cmdQuitGame);
|
||||
t->accelKey = 'Q';
|
||||
|
||||
t = new gCompButton(*win, *optionsButtonRects[4],
|
||||
t = new GfxCompButton(*win, *optionsButtonRects[4],
|
||||
dialogPushImag, numBtnImages, btnStrings[4], pal, 0, cmdCredits);
|
||||
t->accelKey = 'C';
|
||||
|
||||
autoAggressBtn = new gOwnerSelCompButton(*win, *optionsButtonRects[5],
|
||||
autoAggressBtn = new GfxOwnerSelCompButton(*win, *optionsButtonRects[5],
|
||||
checkImag, numBtnImages, 0, cmdAutoAggression);
|
||||
autoAggressBtn->select(isAutoAggressionSet());
|
||||
|
||||
autoWeaponBtn = new gOwnerSelCompButton(*win, *optionsButtonRects[6],
|
||||
autoWeaponBtn = new GfxOwnerSelCompButton(*win, *optionsButtonRects[6],
|
||||
checkImag, numBtnImages, 0, cmdAutoWeapon);
|
||||
autoWeaponBtn->select(isAutoWeaponSet());
|
||||
|
||||
speechTextBtn = new gOwnerSelCompButton(*win, *optionsButtonRects[7],
|
||||
speechTextBtn = new GfxOwnerSelCompButton(*win, *optionsButtonRects[7],
|
||||
checkImag, numBtnImages, 0, cmdSpeechText);
|
||||
speechTextBtn->select(g_vm->_speechText);
|
||||
|
||||
nightBtn = new gOwnerSelCompButton(*win, *optionsButtonRects[8],
|
||||
nightBtn = new GfxOwnerSelCompButton(*win, *optionsButtonRects[8],
|
||||
checkImag, numBtnImages, 0, cmdNight);
|
||||
nightBtn->select(g_vm->_showNight);
|
||||
|
||||
new gSlider(*win, optTopSliderRect, optTopFaceRect, 0,
|
||||
new GfxSlider(*win, optTopSliderRect, optTopFaceRect, 0,
|
||||
Audio::Mixer::kMaxMixerVolume, slideFaceImag, numSlideFace, ConfMan.getInt("sfx_volume"),
|
||||
0, cmdSetSoundVolume);
|
||||
|
||||
new gSlider(*win, optMidSliderRect, optMidFaceRect, 0,
|
||||
new GfxSlider(*win, optMidSliderRect, optMidFaceRect, 0,
|
||||
Audio::Mixer::kMaxMixerVolume, slideFaceImag, numSlideFace, ConfMan.getInt("speech_volume"),
|
||||
0, cmdSetSpeechVolume);
|
||||
|
||||
new gSlider(*win, optBotSliderRect, optBotFaceRect, 0,
|
||||
new GfxSlider(*win, optBotSliderRect, optBotFaceRect, 0,
|
||||
Audio::Mixer::kMaxMixerVolume, slideFaceImag, numSlideFace, ConfMan.getInt("music_volume"),
|
||||
0, cmdSetMIDIVolume);
|
||||
|
||||
@ -1077,25 +1077,25 @@ int16 userDialog(const char *title, const char *msg, const char *bMsg1,
|
||||
udrInfo.result = -1;
|
||||
udrInfo.running = true;
|
||||
|
||||
gCompButton *t;
|
||||
GfxCompButton *t;
|
||||
|
||||
// button one
|
||||
if (numBtns >= 1) {
|
||||
t = new gCompButton(*udWin, messageButtonRects[0],
|
||||
t = new GfxCompButton(*udWin, messageButtonRects[0],
|
||||
udDialogPushImag, numBtnImages, btnMsg1, pal, 10, cmdDialogQuit);
|
||||
t->accel = k1;
|
||||
}
|
||||
|
||||
// button two
|
||||
if (numBtns >= 2) {
|
||||
t = new gCompButton(*udWin, messageButtonRects[1],
|
||||
t = new GfxCompButton(*udWin, messageButtonRects[1],
|
||||
udDialogPushImag, numBtnImages, btnMsg2, pal, 11, cmdDialogQuit);
|
||||
t->accel = k2;
|
||||
}
|
||||
|
||||
// button three
|
||||
if (numBtns >= 3) {
|
||||
t = new gCompButton(*udWin, messageButtonRects[2],
|
||||
t = new GfxCompButton(*udWin, messageButtonRects[2],
|
||||
udDialogPushImag, numBtnImages, btnMsg3, pal, 12, cmdDialogQuit);
|
||||
t->accel = k3;
|
||||
}
|
||||
@ -1192,25 +1192,25 @@ int16 userDialog(const char *title, const char *msg, const char *bMsg1,
|
||||
// create the window
|
||||
win = new ModalWindow(messageWindowRect, 0, nullptr);
|
||||
|
||||
gCompButton *t;
|
||||
GfxCompButton *t;
|
||||
|
||||
// button one
|
||||
if (numBtns >= 1) {
|
||||
t = new gCompButton(*win, *messageButtonRects[0],
|
||||
t = new GfxCompButton(*win, *messageButtonRects[0],
|
||||
dialogPushImag, numBtnImages, btnMsg1, pal, 10, cmdDialogQuit);
|
||||
t->accelKey = k1;
|
||||
}
|
||||
|
||||
// button two
|
||||
if (numBtns >= 2) {
|
||||
t = new gCompButton(*win, *messageButtonRects[1],
|
||||
t = new GfxCompButton(*win, *messageButtonRects[1],
|
||||
dialogPushImag, numBtnImages, btnMsg2, pal, 11, cmdDialogQuit);
|
||||
t->accelKey = k2;
|
||||
}
|
||||
|
||||
// button three
|
||||
if (numBtns >= 3) {
|
||||
t = new gCompButton(*win, *messageButtonRects[2],
|
||||
t = new GfxCompButton(*win, *messageButtonRects[2],
|
||||
dialogPushImag, numBtnImages, btnMsg3, pal, 12, cmdDialogQuit);
|
||||
t->accelKey = k3;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user