mirror of https://github.com/stella-emu/stella.git
Fixed yet more positioning issues. Everything seems to be working fine
in OpenGL mode now, and I think I've finally finished the major UI stuff there. Now for software mode. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1578 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
5b4f9f3781
commit
829375de34
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: ContextMenu.cxx,v 1.8 2008-12-24 01:20:06 stephena Exp $
|
// $Id: ContextMenu.cxx,v 1.9 2008-12-28 00:23:21 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -86,12 +86,9 @@ void ContextMenu::addItems(const StringMap& items)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void ContextMenu::show(uInt32 x, uInt32 y, int item)
|
void ContextMenu::show(uInt32 x, uInt32 y, int item)
|
||||||
{
|
{
|
||||||
// Make sure position is set *after* the dialog is added, since the surface
|
|
||||||
// may not exist before then
|
|
||||||
parent().addDialog(this);
|
|
||||||
_xorig = x;
|
_xorig = x;
|
||||||
_yorig = y;
|
_yorig = y;
|
||||||
center();
|
parent().addDialog(this);
|
||||||
setSelected(item);
|
setSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: InputTextDialog.cxx,v 1.25 2008-12-25 23:05:16 stephena Exp $
|
// $Id: InputTextDialog.cxx,v 1.26 2008-12-28 00:23:21 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -101,23 +101,17 @@ InputTextDialog::~InputTextDialog()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void InputTextDialog::show()
|
void InputTextDialog::show()
|
||||||
{
|
{
|
||||||
// Make sure position is set *after* the dialog is added, since the surface
|
|
||||||
// may not exist before then
|
|
||||||
myEnableCenter = true;
|
myEnableCenter = true;
|
||||||
parent().addDialog(this);
|
parent().addDialog(this);
|
||||||
center();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void InputTextDialog::show(uInt32 x, uInt32 y)
|
void InputTextDialog::show(uInt32 x, uInt32 y)
|
||||||
{
|
{
|
||||||
// Make sure position is set *after* the dialog is added, since the surface
|
|
||||||
// may not exist before then
|
|
||||||
myEnableCenter = false;
|
|
||||||
parent().addDialog(this);
|
|
||||||
myXOrig = x;
|
myXOrig = x;
|
||||||
myYOrig = y;
|
myYOrig = y;
|
||||||
center();
|
myEnableCenter = false;
|
||||||
|
parent().addDialog(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: PopUpWidget.cxx,v 1.43 2008-12-24 01:20:06 stephena Exp $
|
// $Id: PopUpWidget.cxx,v 1.44 2008-12-28 00:23:21 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -106,6 +106,14 @@ bool PopUpWidget::handleEvent(Event::Type e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void PopUpWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||||
|
{
|
||||||
|
// Make sure the new entry is shown if it's changed
|
||||||
|
if(cmd == kCMenuItemSelectedCmd)
|
||||||
|
dialog().setDirty();
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void PopUpWidget::drawWidget(bool hilite)
|
void PopUpWidget::drawWidget(bool hilite)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: PopUpWidget.hxx,v 1.22 2008-07-25 12:41:41 stephena Exp $
|
// $Id: PopUpWidget.hxx,v 1.23 2008-12-28 00:23:21 stephena Exp $
|
||||||
//
|
//
|
||||||
// Based on code from ScummVM - Scumm Interpreter
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -68,6 +68,7 @@ class PopUpWidget : public Widget, public CommandSender
|
||||||
protected:
|
protected:
|
||||||
void handleMouseDown(int x, int y, int button, int clickCount);
|
void handleMouseDown(int x, int y, int button, int clickCount);
|
||||||
bool handleEvent(Event::Type e);
|
bool handleEvent(Event::Type e);
|
||||||
|
void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||||
void drawWidget(bool hilite);
|
void drawWidget(bool hilite);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue