#include <widgets.h>
Public Member Functions | |
FEButton (GraphicsInteractionManager *gim, const OIS::KeyCode keyCode, const std::set< OIS::KeyCode > *modifierKeys, const OIS::MouseButtonID oisMouseButtonId, std::string name="FEButton", FastEcslent::CommandFactory *command=NULL, Widget *aParent=0, Ogre::Vector2 defaultPos=Ogre::Vector2::NEGATIVE_UNIT_X, Ogre::Vector2 defaultSize=DEFAULT_LABEL_SIZE, std::string material=DEFAULT_PANEL_MATERIAL, std::string desc="BLANK", Ogre::GuiMetricsMode defaultMode=Ogre::GMM_RELATIVE) | |
~FEButton () | |
virtual void | handleMouseEvent (const OIS::MouseEvent &args) |
virtual void | handleKeyEvent () |
virtual void | show () |
virtual void | hide () |
bool | processButtonFirstEvent (bool buttonActivated) |
bool | processButtonSecondEvent (bool buttonActivated) |
FEButton (GraphicsInteractionManager *gim, const std::set< OIS::KeyCode > *modifierKeys, const OIS::MouseButtonID oisMouseButtonId, std::string name="FEButton", Widget *aParent=0, Ogre::ColourValue color=Ogre::ColourValue::Red, Ogre::Vector2 defaultPos=Ogre::Vector2::NEGATIVE_UNIT_X, Ogre::Vector2 defaultSize=DEFAULT_LABEL_SIZE, bool(*pClickFunction)()=NULL, std::string material=DEFAULT_PANEL_MATERIAL, std::string="BLANK", Ogre::GuiMetricsMode defaultMode=Ogre::GMM_RELATIVE) | |
~FEButton () | |
virtual void | handleMouseEvent (const OIS::MouseEvent &args) |
virtual void | show () |
virtual void | hide () |
FEButton (GraphicsInteractionManager *gim, const std::set< OIS::KeyCode > *modifierKeys, const OIS::MouseButtonID oisMouseButtonId, std::string name="FEButton", Widget *aParent=0, Ogre::ColourValue color=Ogre::ColourValue::Red, Ogre::Vector2 defaultPos=Ogre::Vector2::NEGATIVE_UNIT_X, Ogre::Vector2 defaultSize=DEFAULT_LABEL_SIZE, bool(*pClickFunction)()=NULL, std::string material=DEFAULT_PANEL_MATERIAL, std::string="BLANK", Ogre::GuiMetricsMode defaultMode=Ogre::GMM_RELATIVE) | |
~FEButton () | |
virtual void | handleMouseEvent (const OIS::MouseEvent &args) |
virtual void | show () |
virtual void | hide () |
FEButton (GraphicsInteractionManager *gim, const std::set< OIS::KeyCode > *modifierKeys, const OIS::MouseButtonID oisMouseButtonId, std::string name="FEButton", Widget *aParent=0, Ogre::ColourValue color=Ogre::ColourValue::Red, Ogre::Vector2 defaultPos=Ogre::Vector2::NEGATIVE_UNIT_X, Ogre::Vector2 defaultSize=DEFAULT_LABEL_SIZE, bool(*pClickFunction)()=NULL, std::string material=DEFAULT_PANEL_MATERIAL, std::string="BLANK", Ogre::GuiMetricsMode defaultMode=Ogre::GMM_RELATIVE) | |
~FEButton () | |
virtual void | handleMouseEvent (const OIS::MouseEvent &args) |
virtual void | show () |
virtual void | hide () |
FEButton (GraphicsInteractionManager *gim, const std::set< OIS::KeyCode > *modifierKeys, const OIS::MouseButtonID oisMouseButtonId, std::string name="FEButton", Widget *aParent=0, Ogre::ColourValue color=Ogre::ColourValue::Red, Ogre::Vector2 defaultPos=Ogre::Vector2::NEGATIVE_UNIT_X, Ogre::Vector2 defaultSize=DEFAULT_LABEL_SIZE, bool(*pClickFunction)()=NULL, std::string material=DEFAULT_PANEL_MATERIAL, std::string="BLANK", Ogre::GuiMetricsMode defaultMode=Ogre::GMM_RELATIVE) | |
~FEButton () | |
virtual void | handleMouseEvent (const OIS::MouseEvent &args) |
virtual void | show () |
virtual void | hide () |
Public Attributes | |
FastEcslent::CommandFactory * | commandFactory |
bool | pressed |
bool | enabled |
bool(* | pClickFunction )() |
Definition at line 293 of file widgets.h.
OgreGFX::FEButton::FEButton | ( | GraphicsInteractionManager * | gim, | |
const OIS::KeyCode | keyCode, | |||
const std::set< OIS::KeyCode > * | modifierKeys, | |||
const OIS::MouseButtonID | oisMouseButtonId, | |||
std::string | name = "FEButton" , |
|||
FastEcslent::CommandFactory * | command = NULL , |
|||
Widget * | aParent = 0 , |
|||
Ogre::Vector2 | defaultPos = Ogre::Vector2::NEGATIVE_UNIT_X , |
|||
Ogre::Vector2 | defaultSize = DEFAULT_LABEL_SIZE , |
|||
std::string | material = DEFAULT_PANEL_MATERIAL , |
|||
std::string | desc = "BLANK" , |
|||
Ogre::GuiMetricsMode | defaultMode = Ogre::GMM_RELATIVE | |||
) |
Constructor for a Button widget, which displays some text. Clicking on the text causes a function to be called to perform some task.
gim | a pointer to the global Graphics Interaction Manager, to display widget. | |
modifierKeys | Pointer to a configuration of keyboard keys that must all be pressed for the button handler to be called. | |
oisMouseButtonId | The ID of the mouse button that must be pressed for the button handler to be called. | |
name | Name of the button | |
command | CommandFactory that produces a command when the button is clicked | |
aParent | A pointer to the parent node, if any (null if this is a root element, or pointer to another widget if this is a child of that widget). Defaults to NULL. | |
defaultPos | Upper-right corner position of the widget, in absolute coordinates if this is a parent node, or relative to the parent node if this is a child node. | |
defaultSize | length and height of the widget. | |
material | Texture name to use for button image | |
desc | Description for button displayed in button help window | |
defaultMode | Mode for how size/position are interpreted (relative/absolute) |
Definition at line 311 of file widgets.cpp.
OgreGFX::FEButton::~FEButton | ( | ) |
OgreGFX::FEButton::FEButton | ( | GraphicsInteractionManager * | gim, | |
const std::set< OIS::KeyCode > * | modifierKeys, | |||
const OIS::MouseButtonID | oisMouseButtonId, | |||
std::string | name = "FEButton" , |
|||
Widget * | aParent = 0 , |
|||
Ogre::ColourValue | color = Ogre::ColourValue::Red , |
|||
Ogre::Vector2 | defaultPos = Ogre::Vector2::NEGATIVE_UNIT_X , |
|||
Ogre::Vector2 | defaultSize = DEFAULT_LABEL_SIZE , |
|||
bool(*)() | pClickFunction = NULL , |
|||
std::string | material = DEFAULT_PANEL_MATERIAL , |
|||
std::string | desc = "BLANK" , |
|||
Ogre::GuiMetricsMode | defaultMode = Ogre::GMM_RELATIVE | |||
) |
Constructor for a Button widget, which displays some text. Clicking on the text causes a function to be called to perform some task.
gim | a pointer to the global Graphics Interaction Manager, to display widget. | |
modifierKeys | Pointer to a configuration of keyboard keys that must all be pressed for the button handler to be called. | |
oisMouseButtonId | The ID of the mouse button that must be pressed for the button handler to be called. | |
caption | The text to display in the panel | |
aParent | A pointer to the parent node, if any (null if this is a root element, or pointer to another widget if this is a child of that widget). Defaults to NULL. | |
color | The color of the displayed text. Defaults to red | |
defaultPos | Upper-right corner position of the widget, in absolute coordinates if this is a parent node, or relative to the parent node if this is a child node. | |
defaultSize | length and height of the widget. | |
pClickFunction | Pointer to a function, which is called when the button handler is called. |
Definition at line 285 of file widgets.cpp.
OgreGFX::FEButton::~FEButton | ( | ) |
OgreGFX::FEButton::FEButton | ( | GraphicsInteractionManager * | gim, | |
const std::set< OIS::KeyCode > * | modifierKeys, | |||
const OIS::MouseButtonID | oisMouseButtonId, | |||
std::string | name = "FEButton" , |
|||
Widget * | aParent = 0 , |
|||
Ogre::ColourValue | color = Ogre::ColourValue::Red , |
|||
Ogre::Vector2 | defaultPos = Ogre::Vector2::NEGATIVE_UNIT_X , |
|||
Ogre::Vector2 | defaultSize = DEFAULT_LABEL_SIZE , |
|||
bool(*)() | pClickFunction = NULL , |
|||
std::string | material = DEFAULT_PANEL_MATERIAL , |
|||
std::string | = "BLANK" , |
|||
Ogre::GuiMetricsMode | defaultMode = Ogre::GMM_RELATIVE | |||
) |
Constructor for a Button widget, which displays some text. Clicking on the text causes a function to be called to perform some task.
gim | a pointer to the global Graphics Interaction Manager, to display widget. | |
modifierKeys | Pointer to a configuration of keyboard keys that must all be pressed for the button handler to be called. | |
oisMouseButtonId | The ID of the mouse button that must be pressed for the button handler to be called. | |
caption | The text to display in the panel | |
aParent | A pointer to the parent node, if any (null if this is a root element, or pointer to another widget if this is a child of that widget). Defaults to NULL. | |
color | The color of the displayed text. Defaults to red | |
defaultPos | Upper-right corner position of the widget, in absolute coordinates if this is a parent node, or relative to the parent node if this is a child node. | |
defaultSize | length and height of the widget. | |
pClickFunction | Pointer to a function, which is called when the button handler is called. |
OgreGFX::FEButton::~FEButton | ( | ) |
OgreGFX::FEButton::FEButton | ( | GraphicsInteractionManager * | gim, | |
const std::set< OIS::KeyCode > * | modifierKeys, | |||
const OIS::MouseButtonID | oisMouseButtonId, | |||
std::string | name = "FEButton" , |
|||
Widget * | aParent = 0 , |
|||
Ogre::ColourValue | color = Ogre::ColourValue::Red , |
|||
Ogre::Vector2 | defaultPos = Ogre::Vector2::NEGATIVE_UNIT_X , |
|||
Ogre::Vector2 | defaultSize = DEFAULT_LABEL_SIZE , |
|||
bool(*)() | pClickFunction = NULL , |
|||
std::string | material = DEFAULT_PANEL_MATERIAL , |
|||
std::string | = "BLANK" , |
|||
Ogre::GuiMetricsMode | defaultMode = Ogre::GMM_RELATIVE | |||
) |
Constructor for a Button widget, which displays some text. Clicking on the text causes a function to be called to perform some task.
gim | a pointer to the global Graphics Interaction Manager, to display widget. | |
modifierKeys | Pointer to a configuration of keyboard keys that must all be pressed for the button handler to be called. | |
oisMouseButtonId | The ID of the mouse button that must be pressed for the button handler to be called. | |
caption | The text to display in the panel | |
aParent | A pointer to the parent node, if any (null if this is a root element, or pointer to another widget if this is a child of that widget). Defaults to NULL. | |
color | The color of the displayed text. Defaults to red | |
defaultPos | Upper-right corner position of the widget, in absolute coordinates if this is a parent node, or relative to the parent node if this is a child node. | |
defaultSize | length and height of the widget. | |
pClickFunction | Pointer to a function, which is called when the button handler is called. |
OgreGFX::FEButton::~FEButton | ( | ) |
OgreGFX::FEButton::FEButton | ( | GraphicsInteractionManager * | gim, | |
const std::set< OIS::KeyCode > * | modifierKeys, | |||
const OIS::MouseButtonID | oisMouseButtonId, | |||
std::string | name = "FEButton" , |
|||
Widget * | aParent = 0 , |
|||
Ogre::ColourValue | color = Ogre::ColourValue::Red , |
|||
Ogre::Vector2 | defaultPos = Ogre::Vector2::NEGATIVE_UNIT_X , |
|||
Ogre::Vector2 | defaultSize = DEFAULT_LABEL_SIZE , |
|||
bool(*)() | pClickFunction = NULL , |
|||
std::string | material = DEFAULT_PANEL_MATERIAL , |
|||
std::string | = "BLANK" , |
|||
Ogre::GuiMetricsMode | defaultMode = Ogre::GMM_RELATIVE | |||
) |
Constructor for a Button widget, which displays some text. Clicking on the text causes a function to be called to perform some task.
gim | a pointer to the global Graphics Interaction Manager, to display widget. | |
modifierKeys | Pointer to a configuration of keyboard keys that must all be pressed for the button handler to be called. | |
oisMouseButtonId | The ID of the mouse button that must be pressed for the button handler to be called. | |
caption | The text to display in the panel | |
aParent | A pointer to the parent node, if any (null if this is a root element, or pointer to another widget if this is a child of that widget). Defaults to NULL. | |
color | The color of the displayed text. Defaults to red | |
defaultPos | Upper-right corner position of the widget, in absolute coordinates if this is a parent node, or relative to the parent node if this is a child node. | |
defaultSize | length and height of the widget. | |
pClickFunction | Pointer to a function, which is called when the button handler is called. |
OgreGFX::FEButton::~FEButton | ( | ) |
void OgreGFX::FEButton::handleMouseEvent | ( | const OIS::MouseEvent & | args | ) | [virtual] |
Stores if the button is available to be clicked or not. If false, clicking the button does not result in the associated function being called.
Mouse handler called when a mouse event occurs.
args | Information about the mouse state (mouse button, cursor position, etc). |
Reimplemented from OgreGFX::MouseHandler.
Reimplemented in OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, and OgreGFX::FEMarineButton.
Definition at line 368 of file widgets.cpp.
References FastEcslent::Both, commandFactory, OgreGFX::Widget::cursonInMe(), enabled, OgreGFX::UIMgr::entIndexUnderMouse(), OgreGFX::Widget::gfx, FastEcslent::NENTITYTYPES, FastEcslent::None, processButtonFirstEvent(), processButtonSecondEvent(), FastEcslent::CommandFactory::requiredTarget, FastEcslent::TargetEntity, FastEcslent::CommandFactory::targetEntityType, and OgreGFX::GraphicsInteractionManager::uiMgr.
Referenced by OgreGFX::UIMgr::handleSingleSelection().
void OgreGFX::FEButton::handleKeyEvent | ( | ) | [virtual] |
Reimplemented from OgreGFX::KeyHandler.
Definition at line 331 of file widgets.cpp.
References commandFactory, enabled, FastEcslent::None, processButtonFirstEvent(), processButtonSecondEvent(), and FastEcslent::CommandFactory::requiredTarget.
void OgreGFX::FEButton::show | ( | ) | [virtual] |
the height of each separator element
Reimplemented from OgreGFX::FEPanel.
Definition at line 382 of file widgets.cpp.
void OgreGFX::FEButton::hide | ( | ) | [virtual] |
Hides the widget and all sub-elements.
Reimplemented from OgreGFX::FEPanel.
Definition at line 391 of file widgets.cpp.
References enabled.
bool OgreGFX::FEButton::processButtonFirstEvent | ( | bool | buttonActivated | ) |
Definition at line 340 of file widgets.cpp.
References OgreGFX::UIMgr::buttonActive, commandFactory, OgreGFX::UIMgr::CreateGhostUnderMouse(), OgreGFX::Widget::gfx, FastEcslent::None, FastEcslent::CommandFactory::previewMeshName, FastEcslent::CommandFactory::requiredTarget, and OgreGFX::GraphicsInteractionManager::uiMgr.
Referenced by handleKeyEvent(), and handleMouseEvent().
bool OgreGFX::FEButton::processButtonSecondEvent | ( | bool | buttonActivated | ) |
Definition at line 354 of file widgets.cpp.
References FastEcslent::addCommandForEnt(), OgreGFX::UIMgr::buttonActive, OgreGFX::UIMgr::ChangeGhostTextureRBGA(), commandFactory, OgreGFX::Widget::gfx, OgreGFX::UIMgr::ghostUnderMouse, OgreGFX::GraphicsInteractionManager::uiMgr, and OgreGFX::UIMgr::waitingGhosts.
Referenced by handleKeyEvent(), and handleMouseEvent().
virtual void OgreGFX::FEButton::handleMouseEvent | ( | const OIS::MouseEvent & | args | ) | [virtual] |
Stores if the button is available to be clicked or not. If false, clicking the button does not result in the associated function being called.
Mouse handler called when a mouse event occurs.
args | Information about the mouse state (mouse button, cursor position, etc). |
Reimplemented from OgreGFX::MouseHandler.
Reimplemented in OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, and OgreGFX::FEMarineButton.
virtual void OgreGFX::FEButton::show | ( | ) | [virtual] |
the height of each separator element
Reimplemented from OgreGFX::FEPanel.
virtual void OgreGFX::FEButton::hide | ( | ) | [virtual] |
virtual void OgreGFX::FEButton::handleMouseEvent | ( | const OIS::MouseEvent & | args | ) | [virtual] |
Stores if the button is available to be clicked or not. If false, clicking the button does not result in the associated function being called.
Mouse handler called when a mouse event occurs.
args | Information about the mouse state (mouse button, cursor position, etc). |
Reimplemented from OgreGFX::MouseHandler.
Reimplemented in OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, and OgreGFX::FEMarineButton.
virtual void OgreGFX::FEButton::show | ( | ) | [virtual] |
the height of each separator element
Reimplemented from OgreGFX::FEPanel.
virtual void OgreGFX::FEButton::hide | ( | ) | [virtual] |
virtual void OgreGFX::FEButton::handleMouseEvent | ( | const OIS::MouseEvent & | args | ) | [virtual] |
Stores if the button is available to be clicked or not. If false, clicking the button does not result in the associated function being called.
Mouse handler called when a mouse event occurs.
args | Information about the mouse state (mouse button, cursor position, etc). |
Reimplemented from OgreGFX::MouseHandler.
Reimplemented in OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, and OgreGFX::FEMarineButton.
virtual void OgreGFX::FEButton::show | ( | ) | [virtual] |
the height of each separator element
Reimplemented from OgreGFX::FEPanel.
virtual void OgreGFX::FEButton::hide | ( | ) | [virtual] |
virtual void OgreGFX::FEButton::handleMouseEvent | ( | const OIS::MouseEvent & | args | ) | [virtual] |
Stores if the button is available to be clicked or not. If false, clicking the button does not result in the associated function being called.
Mouse handler called when a mouse event occurs.
args | Information about the mouse state (mouse button, cursor position, etc). |
Reimplemented from OgreGFX::MouseHandler.
Reimplemented in OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, OgreGFX::FEMarineButton, OgreGFX::FESCVButton, and OgreGFX::FEMarineButton.
virtual void OgreGFX::FEButton::show | ( | ) | [virtual] |
the height of each separator element
Reimplemented from OgreGFX::FEPanel.
virtual void OgreGFX::FEButton::hide | ( | ) | [virtual] |
Definition at line 319 of file widgets.h.
Referenced by handleKeyEvent(), handleMouseEvent(), processButtonFirstEvent(), processButtonSecondEvent(), and ~FEButton().
Stores if the button has been clicked since last update
Definition at line 321 of file widgets.h.
Referenced by handleKeyEvent(), OgreGFX::FEMarineButton::handleMouseEvent(), OgreGFX::FESCVButton::handleMouseEvent(), handleMouseEvent(), hide(), and show().
bool(* OgreGFX::FEButton::pClickFunction)() | ( | ) |