Allow setting CGUISize properties directly
Previously, modifying individual CGUISize properties (left, top, right,
bottom) via JavaScript had no effect unless the entire size object was
copied, modified, and reassigned—resulting in verbose and error-prone
code.
This update introduces proper JavaScript property accessors, enabling
direct reading and writing of CGUISize members. The result is a more
intuitive and scriptable API.
Key Changes:
- Implemented JavaScript get/set accessors for each CGUISize property,
directly interacting with the native object.
- Retained support for string assignments to CGUISize
- Maintained the GUISize JS object for backward compatibility, also
marked as deprecated.
- Improved CGUISimpleSetting<CGUISize> to allow partial updates via
direct property access.
- allow assigning size from object with pixel and percent values
You can now assign size using an object with properties like:
size = {
left: number, right: number, top: number, bottom: number,
rleft: number, rright: number, rtop: number, rbottom: number
}
- One or more properties can be specified, the missing properties with
fill as zero.
- Assignment triggers an immediate update event.
Delayed Setting Notifications:
- Introduced a mechanism for delayed setting notifications, currently
only used in CGUISimpleSetting<CGUISize>, to avoid redundant
recalculations.
- Ensured that getComputedSize triggers any pending delayed
notifications before returning the size.
This change significantly enhances the developer experience and brings
the behavior in line with typical expectations for direct property
manipulation in JavaScript.
2025-06-04 14:22:34 -07:00
|
|
|
/* Copyright (C) 2025 Wildfire Games.
|
2023-12-02 16:30:12 -08:00
|
|
|
* This file is part of 0 A.D.
|
2009-04-18 10:00:33 -07:00
|
|
|
*
|
2023-12-02 16:30:12 -08:00
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
2009-04-18 10:00:33 -07:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
2023-12-02 16:30:12 -08:00
|
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
2009-04-18 10:00:33 -07:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2023-12-02 16:30:12 -08:00
|
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
2009-04-18 10:00:33 -07:00
|
|
|
*/
|
|
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
/*
|
2017-08-28 03:27:36 -07:00
|
|
|
* The base class of an object.
|
|
|
|
|
* All objects are derived from this class.
|
|
|
|
|
* It's an abstract data type, so it can't be used per se.
|
|
|
|
|
* Also contains a Dummy object which is used for completely blank objects.
|
|
|
|
|
*/
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2007-05-07 09:33:24 -07:00
|
|
|
#ifndef INCLUDED_IGUIOBJECT
|
|
|
|
|
#define INCLUDED_IGUIOBJECT
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2021-05-06 01:22:37 -07:00
|
|
|
#include "gui/CGUISetting.h"
|
2025-06-19 15:06:41 -07:00
|
|
|
#include "gui/SGUIMessage.h"
|
2021-05-06 01:22:37 -07:00
|
|
|
#include "gui/SettingTypes/CGUIHotkey.h"
|
2019-10-02 02:44:00 -07:00
|
|
|
#include "gui/SettingTypes/CGUISize.h"
|
2025-06-19 15:06:41 -07:00
|
|
|
#include "lib/code_annotation.h"
|
|
|
|
|
#include "lib/input.h"
|
|
|
|
|
#include "maths/Rect.h"
|
2021-05-12 06:48:55 -07:00
|
|
|
#include "ps/CStr.h"
|
2005-04-07 02:13:10 -07:00
|
|
|
|
2025-06-19 15:06:41 -07:00
|
|
|
#include <js/RootingAPI.h>
|
|
|
|
|
#include <js/TypeDecls.h>
|
2019-09-20 06:11:18 -07:00
|
|
|
#include <map>
|
2025-06-19 15:06:41 -07:00
|
|
|
#include <memory>
|
2015-08-21 10:08:41 -07:00
|
|
|
#include <vector>
|
2004-07-08 08:23:47 -07:00
|
|
|
|
2021-05-28 09:35:57 -07:00
|
|
|
class CCanvas2D;
|
2019-10-01 05:46:55 -07:00
|
|
|
class CGUI;
|
2021-04-09 11:01:47 -07:00
|
|
|
class IGUIProxyObject;
|
2025-06-19 15:06:41 -07:00
|
|
|
class JSObject;
|
|
|
|
|
class JSTracer;
|
2025-06-19 15:06:41 -07:00
|
|
|
class XMBData;
|
|
|
|
|
class XMBElement;
|
|
|
|
|
namespace JS { class HandleValueArray; }
|
2025-06-19 15:06:41 -07:00
|
|
|
struct SDL_Event_;
|
2020-11-21 09:49:06 -08:00
|
|
|
|
2019-10-01 05:46:55 -07:00
|
|
|
#define GUI_OBJECT(obj) \
|
|
|
|
|
public: \
|
2025-06-11 12:12:13 -07:00
|
|
|
static std::unique_ptr<IGUIObject> ConstructObject(CGUI& pGUI) \
|
|
|
|
|
{ return std::make_unique<obj>(pGUI); }
|
2019-10-01 05:46:55 -07:00
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
/**
|
|
|
|
|
* GUI object such as a button or an input-box.
|
|
|
|
|
* Abstract data type !
|
|
|
|
|
*/
|
|
|
|
|
class IGUIObject
|
|
|
|
|
{
|
|
|
|
|
friend class CGUI;
|
2024-10-19 11:17:30 -07:00
|
|
|
friend class CGUIObjectEventBroadcaster;
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2021-05-06 01:22:37 -07:00
|
|
|
// For triggering message update handlers.
|
|
|
|
|
friend class IGUISetting;
|
|
|
|
|
|
2004-07-08 08:23:47 -07:00
|
|
|
// Allow getProperty to access things like GetParent()
|
2020-11-21 09:49:06 -08:00
|
|
|
template <typename T>
|
|
|
|
|
friend class JSI_GUIProxy;
|
2004-07-08 08:23:47 -07:00
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
public:
|
Use NONCOPYABLE for most GUI classes and structs to have the compiler indicate unintended copies, refs 3028551b91 / D2163.
That is CChartData, CGUIList, CGUISeries, COListColumn, GUITooltip,
SGUIMessage, SSpriteCall, STextCall, SFeedback, IGUISetting,
CGUISetting, GUI, IGUIObject, IGUIScrollBar.
Drop copying GetSetting and SetSetting template functions for CGUIList,
CGUISeries, CClientArea, CGUIString.
Stop copying COListColumn.
Drop copying GUI<CClientArea>::GetSetting call in
IGUIObject::UpdateCachedSize() and four copying
GUI<CGUIString>::GetSetting calls in SetupText() functions.
Delete unused GUIRenderer IGLState class from 849f50a500 obsolete since
1f5b8f1c9a.
Differential Revision: https://code.wildfiregames.com/D2164
This was SVN commit r22638.
2019-08-09 17:04:17 -07:00
|
|
|
NONCOPYABLE(IGUIObject);
|
|
|
|
|
|
2025-08-10 13:25:40 -07:00
|
|
|
// IGUIObjects must not be moved in memory: SpiderMonkey keeps a pointer to
|
|
|
|
|
// them in order to trace script handlers during GCs (see Set/UnsetScriptHandlers())
|
|
|
|
|
IGUIObject(IGUIObject&&) = delete;
|
|
|
|
|
IGUIObject& operator=(IGUIObject&&) = delete;
|
|
|
|
|
|
2019-08-21 03:12:33 -07:00
|
|
|
IGUIObject(CGUI& pGUI);
|
2003-11-23 18:18:41 -08:00
|
|
|
virtual ~IGUIObject();
|
2004-07-08 08:23:47 -07:00
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
/**
|
|
|
|
|
* This function checks if the mouse is hovering the
|
|
|
|
|
* rectangle that the base setting "size" makes.
|
|
|
|
|
* Although it is virtual, so one could derive
|
|
|
|
|
* an object from CButton, which changes only this
|
|
|
|
|
* to checking the circle that "size" makes.
|
|
|
|
|
*
|
2019-10-05 02:58:31 -07:00
|
|
|
* This function also returns true if there is a different
|
|
|
|
|
* GUI object shown on top of this one.
|
2003-11-23 18:18:41 -08:00
|
|
|
*/
|
2019-08-22 16:51:10 -07:00
|
|
|
virtual bool IsMouseOver() const;
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2019-10-05 02:58:31 -07:00
|
|
|
/**
|
|
|
|
|
* This function returns true if the mouse is hovering
|
|
|
|
|
* over this GUI object and if this GUI object is the
|
|
|
|
|
* topmost object in that screen location.
|
|
|
|
|
* For example when hovering dropdown list items, the
|
|
|
|
|
* buttons beneath the list won't return true here.
|
|
|
|
|
*/
|
|
|
|
|
virtual bool IsMouseHovering() const { return m_MouseHovering; }
|
|
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
//--------------------------------------------------------
|
|
|
|
|
/** @name Leaf Functions */
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
|
//@{
|
|
|
|
|
|
|
|
|
|
/// Get object name, name is unique
|
2006-07-20 07:37:58 -07:00
|
|
|
const CStr& GetName() const { return m_Name; }
|
2003-11-23 18:18:41 -08:00
|
|
|
|
|
|
|
|
/// Get object name
|
2004-06-18 07:07:06 -07:00
|
|
|
void SetName(const CStr& Name) { m_Name = Name; }
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2004-08-30 19:09:58 -07:00
|
|
|
// Get Presentable name.
|
|
|
|
|
// Will change all internally set names to something like "<unnamed object>"
|
|
|
|
|
CStr GetPresentableName() const;
|
|
|
|
|
|
2019-08-21 06:22:25 -07:00
|
|
|
/**
|
|
|
|
|
* Return all child objects of the current object.
|
2015-08-21 10:08:41 -07:00
|
|
|
*/
|
2019-08-22 16:51:10 -07:00
|
|
|
const std::vector<IGUIObject*>& GetChildren() const { return m_Children; }
|
2003-11-23 18:18:41 -08:00
|
|
|
|
|
|
|
|
//@}
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
|
/** @name Settings Management */
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
|
//@{
|
|
|
|
|
|
2019-09-30 07:08:14 -07:00
|
|
|
/**
|
2021-05-06 01:22:37 -07:00
|
|
|
* Registers the given setting with the GUI object.
|
2019-09-30 07:08:14 -07:00
|
|
|
* Enable XML and JS to modify the given variable.
|
|
|
|
|
*/
|
2021-05-06 01:22:37 -07:00
|
|
|
void RegisterSetting(const CStr& Name, IGUISetting* setting);
|
|
|
|
|
void ReregisterSetting(const CStr& Name, IGUISetting* setting);
|
2019-09-30 07:08:14 -07:00
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
/**
|
2019-08-03 19:20:08 -07:00
|
|
|
* Returns whether there is a setting with the given name registered.
|
2003-11-23 18:18:41 -08:00
|
|
|
*
|
|
|
|
|
* @param Setting setting name
|
|
|
|
|
* @return True if settings exist.
|
|
|
|
|
*/
|
2004-06-18 07:07:06 -07:00
|
|
|
bool SettingExists(const CStr& Setting) const;
|
2015-08-21 10:08:41 -07:00
|
|
|
|
Move static GUI<>::SetSetting operating on IGUIObject to a member IGUIObject::SetSetting.
Remove PSERROR codes from SetSetting (let std::map throw an out_of_range
if a caller wants to Set a setting that doesn't exist without having
checked with SettingExists, equal to GetSetting from 92b6cdfeab).
That also simplifies std::function SetSettingWrap construct from
0a7d0ecdde to void IGUIObject::SettingChanged.
Don't trigger debug_warn or exceptions in GUITooltip::ShowTooltip if the
XML author specified wrong tooltip input, and dodge another
dynamic_cast.
Rename existing IGUIObject::SetSetting to
IGUIObject::SetSettingFromString and comment that it is purposed for
parsing XML files.
Remove SetSetting default value, so that authors are made aware
explicitly of the need to decide the function broadcasting a message,
refs d87057b1c0, 719f2d7967, ...
Change const bool& SkipMessage to const bool SendMessage, so that a
positive value relates to a positive action.
Clean AddSettings whitespace and integer types.
Differential Revision: https://code.wildfiregames.com/D2231
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
Comments By: Philip on IRC on 2010-07-24 on GUIUtil being ugly, in case
that one counts
This was SVN commit r22796.
2019-08-28 04:21:11 -07:00
|
|
|
/**
|
|
|
|
|
* Set a setting by string, regardless of what type it is.
|
|
|
|
|
* Used to parse setting values from XML files.
|
|
|
|
|
* For example a CRect(10,10,20,20) is created from "10 10 20 20".
|
2021-05-06 01:22:37 -07:00
|
|
|
* @return false if the setting does not exist or the conversion fails, otherwise true.
|
Move static GUI<>::SetSetting operating on IGUIObject to a member IGUIObject::SetSetting.
Remove PSERROR codes from SetSetting (let std::map throw an out_of_range
if a caller wants to Set a setting that doesn't exist without having
checked with SettingExists, equal to GetSetting from 92b6cdfeab).
That also simplifies std::function SetSettingWrap construct from
0a7d0ecdde to void IGUIObject::SettingChanged.
Don't trigger debug_warn or exceptions in GUITooltip::ShowTooltip if the
XML author specified wrong tooltip input, and dodge another
dynamic_cast.
Rename existing IGUIObject::SetSetting to
IGUIObject::SetSettingFromString and comment that it is purposed for
parsing XML files.
Remove SetSetting default value, so that authors are made aware
explicitly of the need to decide the function broadcasting a message,
refs d87057b1c0, 719f2d7967, ...
Change const bool& SkipMessage to const bool SendMessage, so that a
positive value relates to a positive action.
Clean AddSettings whitespace and integer types.
Differential Revision: https://code.wildfiregames.com/D2231
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
Comments By: Philip on IRC on 2010-07-24 on GUIUtil being ugly, in case
that one counts
This was SVN commit r22796.
2019-08-28 04:21:11 -07:00
|
|
|
*/
|
|
|
|
|
bool SetSettingFromString(const CStr& Setting, const CStrW& Value, const bool SendMessage);
|
|
|
|
|
|
2019-09-30 07:08:14 -07:00
|
|
|
/**
|
|
|
|
|
* Returns whether this object is set to be hidden or ghost.
|
|
|
|
|
*/
|
|
|
|
|
bool IsEnabled() const;
|
|
|
|
|
|
2019-08-21 06:22:25 -07:00
|
|
|
/**
|
|
|
|
|
* Returns whether this is object is set to be hidden.
|
|
|
|
|
*/
|
2019-08-22 16:51:10 -07:00
|
|
|
bool IsHidden() const;
|
2019-08-21 06:22:25 -07:00
|
|
|
|
2021-05-06 01:22:37 -07:00
|
|
|
void SetHidden(bool hidden) { m_Hidden.Set(hidden, true); }
|
|
|
|
|
|
2019-08-21 06:22:25 -07:00
|
|
|
/**
|
|
|
|
|
* Returns whether this object is set to be hidden or ghost.
|
|
|
|
|
*/
|
2019-08-22 16:51:10 -07:00
|
|
|
bool IsHiddenOrGhost() const;
|
2019-08-21 06:22:25 -07:00
|
|
|
|
2019-09-30 07:08:14 -07:00
|
|
|
/**
|
|
|
|
|
* Retrieves the configured sound filename from the given setting name and plays that once.
|
|
|
|
|
*/
|
|
|
|
|
void PlaySound(const CStrW& soundPath) const;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Send event to this GUI object (HandleMessage and ScriptEvent)
|
|
|
|
|
*
|
|
|
|
|
* @param type Type of GUI message to be handled
|
2020-01-15 08:00:37 -08:00
|
|
|
* @param eventName String representation of event name
|
2019-09-30 07:08:14 -07:00
|
|
|
* @return IN_HANDLED if event was handled, or IN_PASS if skipped
|
|
|
|
|
*/
|
2020-01-15 08:00:37 -08:00
|
|
|
InReaction SendEvent(EGUIMessageType type, const CStr& eventName);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Same as SendEvent, but passes mouse coordinates and button state as an argument.
|
|
|
|
|
*/
|
|
|
|
|
InReaction SendMouseEvent(EGUIMessageType type, const CStr& eventName);
|
2019-09-30 07:08:14 -07:00
|
|
|
|
2003-11-24 09:13:37 -08:00
|
|
|
/**
|
|
|
|
|
* All sizes are relative to resolution, and the calculation
|
|
|
|
|
* is not wanted in real time, therefore it is cached, update
|
|
|
|
|
* the cached size with this function.
|
|
|
|
|
*/
|
2010-04-19 12:43:05 -07:00
|
|
|
virtual void UpdateCachedSize();
|
2003-11-24 09:13:37 -08:00
|
|
|
|
2021-04-09 11:01:47 -07:00
|
|
|
/**
|
|
|
|
|
* Updates and returns the size of the object.
|
|
|
|
|
*/
|
2024-10-19 11:17:30 -07:00
|
|
|
virtual CRect GetComputedSize();
|
2021-04-09 11:01:47 -07:00
|
|
|
|
2021-05-01 05:38:05 -07:00
|
|
|
virtual const CStrW& GetTooltipText() const { return m_Tooltip; }
|
|
|
|
|
virtual const CStr& GetTooltipStyle() const { return m_TooltipStyle; }
|
|
|
|
|
|
2019-07-27 19:39:52 -07:00
|
|
|
/**
|
|
|
|
|
* Reset internal state of this object.
|
|
|
|
|
*/
|
|
|
|
|
virtual void ResetStates();
|
|
|
|
|
|
2004-07-08 08:23:47 -07:00
|
|
|
/**
|
|
|
|
|
* Set the script handler for a particular object-specific action
|
|
|
|
|
*
|
2020-01-15 08:00:37 -08:00
|
|
|
* @param eventName Name of action
|
2004-07-08 08:23:47 -07:00
|
|
|
* @param Code Javascript code to execute when the action occurs
|
|
|
|
|
* @param pGUI GUI instance to associate the script with
|
|
|
|
|
*/
|
2020-01-15 08:00:37 -08:00
|
|
|
void RegisterScriptHandler(const CStr& eventName, const CStr& Code, CGUI& pGUI);
|
2015-08-21 10:08:41 -07:00
|
|
|
|
2019-08-02 05:18:30 -07:00
|
|
|
/**
|
2020-11-21 09:49:06 -08:00
|
|
|
* Retrieves the JSObject representing this GUI object.
|
2019-08-02 05:18:30 -07:00
|
|
|
*/
|
2020-11-21 09:49:06 -08:00
|
|
|
JSObject* GetJSObject();
|
2019-08-02 05:18:30 -07:00
|
|
|
|
2024-10-19 11:17:30 -07:00
|
|
|
virtual const std::vector<IGUIObject*>& GetVisibleChildren() const { return m_Children; }
|
|
|
|
|
void SetIsInsideBoundaries(bool& isInsideBoundaries) { m_IsInsideBoundaries = isInsideBoundaries; }
|
|
|
|
|
bool IsHiddenOrGhostOrOutOfBoundaries() const;
|
|
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
//@}
|
|
|
|
|
protected:
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
|
/** @name Called by CGUI and friends
|
|
|
|
|
*
|
|
|
|
|
* Methods that the CGUI will call using
|
|
|
|
|
* its friendship, these should not
|
|
|
|
|
* be called by user.
|
2021-05-04 08:17:50 -07:00
|
|
|
* TODO: this comment is old and the following interface should be cleaned up.
|
2003-11-23 18:18:41 -08:00
|
|
|
*/
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
|
//@{
|
|
|
|
|
|
2010-08-11 14:04:09 -07:00
|
|
|
public:
|
Let players remap hotkeys in-game, fix default hotkeys being qwerty-specific.
- Provide a "Hotkey" screen to let players remap hotkeys in-game using a
convenient setup.
- Make all .cfg hotkeys refer to scancodes (i.e. position on the
keyboard), so that default hotkeys now translate correctly for AZERTY,
QWERTZ and other layouts.
- 'BackSpace' is now an alias for 'Delete', and works for killing units.
This fixes #1917, as macs don't have a proper delete key and would need
to use Fn+Del otherwise. This shifts "timewarp" to Shift+BackSpace.
Functionally, this switches hotkeys to scancodes, as that makes more
sense (they are combinations of key positions, not actual text output).
SDL includes are cleaned and key names are reused.
Fixes #2850, Fixes #2604, Refs #1810, Fixes #1917.
Follows work in 3d7784d2af.
Various diffs tested by: Angen, Stan, Freagarach
Comments by: Nescio
Differential Revision: https://code.wildfiregames.com/D2814
This was SVN commit r24215.
2020-11-19 01:27:26 -08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called on every GUI tick unless the object or one of its parent is hidden/ghost.
|
|
|
|
|
*/
|
|
|
|
|
virtual void Tick() {};
|
|
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
/**
|
|
|
|
|
* This function is called with different messages
|
|
|
|
|
* for instance when the mouse enters the object.
|
|
|
|
|
*
|
2003-12-26 22:26:03 -08:00
|
|
|
* @param Message GUI Message
|
2003-11-23 18:18:41 -08:00
|
|
|
*/
|
2025-06-03 23:10:15 -07:00
|
|
|
virtual void HandleMessage(SGUIMessage&) {}
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2019-08-21 06:22:25 -07:00
|
|
|
/**
|
|
|
|
|
* Calls an IGUIObject member function recursively on this object and its children.
|
|
|
|
|
* Aborts recursion at IGUIObjects that have the isRestricted function return true.
|
|
|
|
|
* The arguments of the callback function must be references.
|
|
|
|
|
*/
|
|
|
|
|
template<typename... Args>
|
2019-08-22 16:51:10 -07:00
|
|
|
void RecurseObject(bool(IGUIObject::*isRestricted)() const, void(IGUIObject::*callbackFunction)(Args... args), Args&&... args)
|
2019-08-21 06:22:25 -07:00
|
|
|
{
|
2019-09-18 13:51:45 -07:00
|
|
|
if (!IsBaseObject())
|
2019-08-21 06:22:25 -07:00
|
|
|
{
|
|
|
|
|
if (isRestricted && (this->*isRestricted)())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
(this->*callbackFunction)(args...);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (IGUIObject* const& obj : m_Children)
|
|
|
|
|
obj->RecurseObject(isRestricted, callbackFunction, args...);
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-19 11:17:30 -07:00
|
|
|
virtual void DrawInArea(CCanvas2D& canvas, CRect& area);
|
|
|
|
|
|
Allow setting CGUISize properties directly
Previously, modifying individual CGUISize properties (left, top, right,
bottom) via JavaScript had no effect unless the entire size object was
copied, modified, and reassigned—resulting in verbose and error-prone
code.
This update introduces proper JavaScript property accessors, enabling
direct reading and writing of CGUISize members. The result is a more
intuitive and scriptable API.
Key Changes:
- Implemented JavaScript get/set accessors for each CGUISize property,
directly interacting with the native object.
- Retained support for string assignments to CGUISize
- Maintained the GUISize JS object for backward compatibility, also
marked as deprecated.
- Improved CGUISimpleSetting<CGUISize> to allow partial updates via
direct property access.
- allow assigning size from object with pixel and percent values
You can now assign size using an object with properties like:
size = {
left: number, right: number, top: number, bottom: number,
rleft: number, rright: number, rtop: number, rbottom: number
}
- One or more properties can be specified, the missing properties with
fill as zero.
- Assignment triggers an immediate update event.
Delayed Setting Notifications:
- Introduced a mechanism for delayed setting notifications, currently
only used in CGUISimpleSetting<CGUISize>, to avoid redundant
recalculations.
- Ensured that getComputedSize triggers any pending delayed
notifications before returning the size.
This change significantly enhances the developer experience and brings
the behavior in line with typical expectations for direct property
manipulation in JavaScript.
2025-06-04 14:22:34 -07:00
|
|
|
virtual void DispatchDelayedSettingChanges();
|
|
|
|
|
|
2010-08-11 14:04:09 -07:00
|
|
|
protected:
|
2003-11-23 18:18:41 -08:00
|
|
|
/**
|
|
|
|
|
* Draws the object.
|
|
|
|
|
*/
|
2021-05-28 09:35:57 -07:00
|
|
|
virtual void Draw(CCanvas2D& canvas) = 0;
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2004-10-14 03:09:26 -07:00
|
|
|
/**
|
Let players remap hotkeys in-game, fix default hotkeys being qwerty-specific.
- Provide a "Hotkey" screen to let players remap hotkeys in-game using a
convenient setup.
- Make all .cfg hotkeys refer to scancodes (i.e. position on the
keyboard), so that default hotkeys now translate correctly for AZERTY,
QWERTZ and other layouts.
- 'BackSpace' is now an alias for 'Delete', and works for killing units.
This fixes #1917, as macs don't have a proper delete key and would need
to use Fn+Del otherwise. This shifts "timewarp" to Shift+BackSpace.
Functionally, this switches hotkeys to scancodes, as that makes more
sense (they are combinations of key positions, not actual text output).
SDL includes are cleaned and key names are reused.
Fixes #2850, Fixes #2604, Refs #1810, Fixes #1917.
Follows work in 3d7784d2af.
Various diffs tested by: Angen, Stan, Freagarach
Comments by: Nescio
Differential Revision: https://code.wildfiregames.com/D2814
This was SVN commit r24215.
2020-11-19 01:27:26 -08:00
|
|
|
* Some objects need to be able to pre-emptively process SDL_Event_.
|
|
|
|
|
*
|
|
|
|
|
* Only the object with focus will have this function called.
|
|
|
|
|
*
|
|
|
|
|
* Returns either IN_PASS or IN_HANDLED. If IN_HANDLED, then
|
|
|
|
|
* the event won't be passed on and processed by other handlers.
|
|
|
|
|
*/
|
2025-06-03 23:10:15 -07:00
|
|
|
virtual InReaction PreemptEvent(const SDL_Event_*) { return IN_PASS; }
|
Let players remap hotkeys in-game, fix default hotkeys being qwerty-specific.
- Provide a "Hotkey" screen to let players remap hotkeys in-game using a
convenient setup.
- Make all .cfg hotkeys refer to scancodes (i.e. position on the
keyboard), so that default hotkeys now translate correctly for AZERTY,
QWERTZ and other layouts.
- 'BackSpace' is now an alias for 'Delete', and works for killing units.
This fixes #1917, as macs don't have a proper delete key and would need
to use Fn+Del otherwise. This shifts "timewarp" to Shift+BackSpace.
Functionally, this switches hotkeys to scancodes, as that makes more
sense (they are combinations of key positions, not actual text output).
SDL includes are cleaned and key names are reused.
Fixes #2850, Fixes #2604, Refs #1810, Fixes #1917.
Follows work in 3d7784d2af.
Various diffs tested by: Angen, Stan, Freagarach
Comments by: Nescio
Differential Revision: https://code.wildfiregames.com/D2814
This was SVN commit r24215.
2020-11-19 01:27:26 -08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Some objects need to handle the text-related SDL_Event_ manually.
|
2004-10-14 03:09:26 -07:00
|
|
|
* For instance the input box.
|
|
|
|
|
*
|
|
|
|
|
* Only the object with focus will have this function called.
|
|
|
|
|
*
|
2005-10-20 10:44:56 -07:00
|
|
|
* Returns either IN_PASS or IN_HANDLED. If IN_HANDLED, then
|
2004-10-14 03:09:26 -07:00
|
|
|
* the key won't be passed on and processed by other handlers.
|
|
|
|
|
* This is used for keys that the GUI uses.
|
|
|
|
|
*/
|
2025-06-03 23:10:15 -07:00
|
|
|
virtual InReaction ManuallyHandleKeys(const SDL_Event_*) { return IN_PASS; }
|
2004-10-14 03:09:26 -07:00
|
|
|
|
2003-12-26 22:26:03 -08:00
|
|
|
/**
|
2020-11-26 18:30:42 -08:00
|
|
|
* Applies the given style to the object.
|
|
|
|
|
*
|
|
|
|
|
* Returns false if the style is not recognised (and thus has
|
|
|
|
|
* not been applied).
|
2003-12-26 22:26:03 -08:00
|
|
|
*/
|
2020-11-26 18:30:42 -08:00
|
|
|
bool ApplyStyle(const CStr& StyleName);
|
2003-12-26 22:26:03 -08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns not the Z value, but the actual buffered Z value, i.e. if it's
|
|
|
|
|
* defined relative, then it will check its parent's Z value and add
|
|
|
|
|
* the relativity.
|
|
|
|
|
*
|
|
|
|
|
* @return Actual Z value on the screen.
|
|
|
|
|
*/
|
2004-05-28 21:06:50 -07:00
|
|
|
virtual float GetBufferedZ() const;
|
2003-12-26 22:26:03 -08:00
|
|
|
|
2021-05-04 08:17:50 -07:00
|
|
|
/**
|
|
|
|
|
* Add an object to the hierarchy.
|
|
|
|
|
*/
|
|
|
|
|
void RegisterChild(IGUIObject* child);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Remove an object from the hierarchy.
|
|
|
|
|
*/
|
|
|
|
|
void UnregisterChild(IGUIObject* child);
|
|
|
|
|
|
2011-04-28 13:42:11 -07:00
|
|
|
/**
|
|
|
|
|
* Set parent of this object
|
|
|
|
|
*/
|
2015-08-21 10:08:41 -07:00
|
|
|
void SetParent(IGUIObject* pParent) { m_pParent = pParent; }
|
|
|
|
|
|
2010-08-11 14:04:09 -07:00
|
|
|
public:
|
2019-07-27 19:39:52 -07:00
|
|
|
|
2019-08-21 03:12:33 -07:00
|
|
|
CGUI& GetGUI() { return m_pGUI; }
|
|
|
|
|
const CGUI& GetGUI() const { return m_pGUI; }
|
2010-08-13 06:50:03 -07:00
|
|
|
|
2004-10-14 03:09:26 -07:00
|
|
|
/**
|
|
|
|
|
* Take focus!
|
|
|
|
|
*/
|
|
|
|
|
void SetFocus();
|
|
|
|
|
|
2021-04-09 11:01:47 -07:00
|
|
|
/**
|
|
|
|
|
* Release focus.
|
|
|
|
|
*/
|
|
|
|
|
void ReleaseFocus();
|
|
|
|
|
|
2010-08-11 14:04:09 -07:00
|
|
|
protected:
|
2004-10-14 03:09:26 -07:00
|
|
|
/**
|
|
|
|
|
* Check if object is focused.
|
|
|
|
|
*/
|
|
|
|
|
bool IsFocused() const;
|
|
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
/**
|
|
|
|
|
* <b>NOTE!</b> This will not just return m_pParent, when that is
|
|
|
|
|
* need use it! There is one exception to it, when the parent is
|
|
|
|
|
* the top-node (the object that isn't a real object), this
|
2019-09-22 16:28:25 -07:00
|
|
|
* will return nullptr, so that the top-node's children are
|
2003-11-23 18:18:41 -08:00
|
|
|
* seemingly parentless.
|
|
|
|
|
*
|
|
|
|
|
* @return Pointer to parent
|
|
|
|
|
*/
|
2015-08-21 10:08:41 -07:00
|
|
|
IGUIObject* GetParent() const;
|
2003-12-26 22:26:03 -08:00
|
|
|
|
2005-04-07 02:13:10 -07:00
|
|
|
/**
|
2010-07-21 10:53:38 -07:00
|
|
|
* Handle additional children to the \<object\>-tag. In IGUIObject, this function does
|
|
|
|
|
* nothing. In CList and CDropDown, it handles the \<item\>, used to build the data.
|
2005-04-07 02:13:10 -07:00
|
|
|
*
|
|
|
|
|
* Returning false means the object doesn't recognize the child. Should be reported.
|
|
|
|
|
* Notice 'false' is default, because an object not using this function, should not
|
|
|
|
|
* have any additional children (and this function should never be called).
|
|
|
|
|
*/
|
2025-06-03 05:13:41 -07:00
|
|
|
virtual bool HandleAdditionalChildren(const XMBData& /*file*/, const XMBElement& /*child*/)
|
2015-08-21 10:08:41 -07:00
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2005-04-07 02:13:10 -07:00
|
|
|
|
Change GUI Object Setting values to be members of the IGUIObject inheriting class, rename AddSetting to RegisterSetting.
Improves performance for Draw calls by 3-5% according to a shady
benchmark.
Improves memory layout, since the values are not on the heap anymore but
in the using class.
Reduces complexity of the implementation and increases type safety.
Allows specifying default values at setting value construction time,
refs D2242.
Inspired by Vladislav introducing members that cached GetSetting values
in c016a74309/D325, refs #4039, ee38f0db37/D763, refs 4225,
a1c4c23ce4/D474, D406, which were formerly proposed to be removed in
D2241.
Differential Revision: https://code.wildfiregames.com/D2313
Tested on: clang 8.0.1, gcc 9.1.0, Jenkins vs2015
Comments By: Vladislav
This was SVN commit r23005.
2019-09-27 05:49:59 -07:00
|
|
|
/**
|
|
|
|
|
* Allow the GUI object to process after all child items were handled.
|
|
|
|
|
* Useful to avoid iterator invalidation with push_back calls.
|
|
|
|
|
*/
|
|
|
|
|
virtual void AdditionalChildrenHandled() {}
|
|
|
|
|
|
2003-11-24 09:13:37 -08:00
|
|
|
/**
|
|
|
|
|
* Cached size, real size m_Size is actually dependent on resolution
|
|
|
|
|
* and can have different *real* outcomes, this is the real outcome
|
|
|
|
|
* cached to avoid slow calculations in real time.
|
|
|
|
|
*/
|
|
|
|
|
CRect m_CachedActualSize;
|
|
|
|
|
|
2004-07-08 08:23:47 -07:00
|
|
|
/**
|
|
|
|
|
* Execute the script for a particular action.
|
|
|
|
|
* Does nothing if no script has been registered for that action.
|
2010-09-11 12:49:21 -07:00
|
|
|
* The mouse coordinates will be passed as the first argument.
|
2004-07-08 08:23:47 -07:00
|
|
|
*
|
2020-01-15 08:00:37 -08:00
|
|
|
* @param eventName Name of action
|
2004-07-08 08:23:47 -07:00
|
|
|
*/
|
2020-01-15 08:00:37 -08:00
|
|
|
void ScriptEvent(const CStr& eventName);
|
2004-07-08 08:23:47 -07:00
|
|
|
|
2020-05-10 07:01:00 -07:00
|
|
|
/**
|
|
|
|
|
* Execute the script for a particular action.
|
|
|
|
|
* Does nothing if no script has been registered for that action.
|
|
|
|
|
* The mouse coordinates will be passed as the first argument.
|
|
|
|
|
*
|
|
|
|
|
* @param eventName Name of action
|
|
|
|
|
*
|
|
|
|
|
* @return True if the script returned something truthy.
|
|
|
|
|
*/
|
|
|
|
|
bool ScriptEventWithReturn(const CStr& eventName);
|
|
|
|
|
|
2010-09-11 12:49:21 -07:00
|
|
|
/**
|
|
|
|
|
* Execute the script for a particular action.
|
|
|
|
|
* Does nothing if no script has been registered for that action.
|
|
|
|
|
*
|
2020-01-15 08:00:37 -08:00
|
|
|
* @param eventName Name of action
|
2019-07-19 14:15:04 -07:00
|
|
|
* @param paramData JS::HandleValueArray arguments to pass to the event.
|
2010-09-11 12:49:21 -07:00
|
|
|
*/
|
2020-01-15 08:00:37 -08:00
|
|
|
void ScriptEvent(const CStr& eventName, const JS::HandleValueArray& paramData);
|
2010-09-11 12:49:21 -07:00
|
|
|
|
2020-05-10 07:01:00 -07:00
|
|
|
/**
|
|
|
|
|
* Execute the script for a particular action.
|
|
|
|
|
* Does nothing if no script has been registered for that action.
|
|
|
|
|
*
|
|
|
|
|
* @param eventName Name of action
|
|
|
|
|
* @param paramData JS::HandleValueArray arguments to pass to the event.
|
|
|
|
|
*
|
|
|
|
|
* @return True if the script returned something truthy.
|
|
|
|
|
*/
|
|
|
|
|
bool ScriptEventWithReturn(const CStr& eventName, const JS::HandleValueArray& paramData);
|
|
|
|
|
|
2019-10-28 04:35:04 -07:00
|
|
|
/**
|
|
|
|
|
* Assigns a JS function to the event name.
|
|
|
|
|
*/
|
2020-01-15 08:00:37 -08:00
|
|
|
void SetScriptHandler(const CStr& eventName, JS::HandleObject Function);
|
2004-07-08 08:23:47 -07:00
|
|
|
|
2019-10-28 04:35:04 -07:00
|
|
|
/**
|
|
|
|
|
* Deletes an event handler assigned to the given name, if such a handler exists.
|
|
|
|
|
*/
|
2020-01-15 08:00:37 -08:00
|
|
|
void UnsetScriptHandler(const CStr& eventName);
|
2019-10-28 04:35:04 -07:00
|
|
|
|
2012-05-02 15:57:35 -07:00
|
|
|
/**
|
|
|
|
|
* Inputes the object that is currently hovered, this function
|
|
|
|
|
* updates this object accordingly (i.e. if it's the object
|
|
|
|
|
* being inputted one thing happens, and not, another).
|
|
|
|
|
*
|
2019-09-22 16:28:25 -07:00
|
|
|
* @param pMouseOver Object that is currently hovered, can be nullptr too!
|
2012-05-02 15:57:35 -07:00
|
|
|
*/
|
2015-08-21 10:08:41 -07:00
|
|
|
void UpdateMouseOver(IGUIObject* const& pMouseOver);
|
2012-05-02 15:57:35 -07:00
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
//@}
|
|
|
|
|
private:
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
|
/** @name Internal functions */
|
|
|
|
|
//--------------------------------------------------------
|
|
|
|
|
//@{
|
2015-08-21 10:08:41 -07:00
|
|
|
|
2019-09-30 07:08:14 -07:00
|
|
|
/**
|
|
|
|
|
* Creates the JS object representing this page upon first use.
|
2021-04-09 11:01:47 -07:00
|
|
|
* This function (and its derived versions) are defined in the GUIProxy implementation file for convenience.
|
2019-09-30 07:08:14 -07:00
|
|
|
*/
|
2020-11-21 09:49:06 -08:00
|
|
|
virtual void CreateJSObject();
|
2019-09-30 07:08:14 -07:00
|
|
|
|
Move static GUI<>::SetSetting operating on IGUIObject to a member IGUIObject::SetSetting.
Remove PSERROR codes from SetSetting (let std::map throw an out_of_range
if a caller wants to Set a setting that doesn't exist without having
checked with SettingExists, equal to GetSetting from 92b6cdfeab).
That also simplifies std::function SetSettingWrap construct from
0a7d0ecdde to void IGUIObject::SettingChanged.
Don't trigger debug_warn or exceptions in GUITooltip::ShowTooltip if the
XML author specified wrong tooltip input, and dodge another
dynamic_cast.
Rename existing IGUIObject::SetSetting to
IGUIObject::SetSettingFromString and comment that it is purposed for
parsing XML files.
Remove SetSetting default value, so that authors are made aware
explicitly of the need to decide the function broadcasting a message,
refs d87057b1c0, 719f2d7967, ...
Change const bool& SkipMessage to const bool SendMessage, so that a
positive value relates to a positive action.
Clean AddSettings whitespace and integer types.
Differential Revision: https://code.wildfiregames.com/D2231
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
Comments By: Philip on IRC on 2010-07-24 on GUIUtil being ugly, in case
that one counts
This was SVN commit r22796.
2019-08-28 04:21:11 -07:00
|
|
|
/**
|
|
|
|
|
* Updates some internal data depending on the setting changed.
|
|
|
|
|
*/
|
|
|
|
|
void SettingChanged(const CStr& Setting, const bool SendMessage);
|
|
|
|
|
|
2003-11-23 18:18:41 -08:00
|
|
|
/**
|
|
|
|
|
* Inputs a reference pointer, checks if the new inputted object
|
|
|
|
|
* if hovered, if so, then check if this's Z value is greater
|
|
|
|
|
* than the inputted object... If so then the object is closer
|
|
|
|
|
* and we'll replace the pointer with this.
|
2019-09-22 16:28:25 -07:00
|
|
|
* Also Notice input can be nullptr, which means the Z value demand
|
|
|
|
|
* is out. NOTICE you can't input nullptr as const so you'll have
|
|
|
|
|
* to set an object to nullptr.
|
2003-11-23 18:18:41 -08:00
|
|
|
*
|
|
|
|
|
* @param pObject Object pointer, can be either the old one, or
|
|
|
|
|
* the new one.
|
|
|
|
|
*/
|
2015-08-21 10:08:41 -07:00
|
|
|
void ChooseMouseOverAndClosest(IGUIObject*& pObject);
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2019-09-18 13:51:45 -07:00
|
|
|
/**
|
|
|
|
|
* Returns whether this is the object all other objects are descendants of.
|
|
|
|
|
*/
|
|
|
|
|
bool IsBaseObject() const;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns whether this object is a child of the base object.
|
|
|
|
|
*/
|
2005-07-20 16:49:39 -07:00
|
|
|
bool IsRootObject() const;
|
|
|
|
|
|
2015-08-21 10:08:41 -07:00
|
|
|
static void Trace(JSTracer* trc, void* data)
|
2015-01-24 06:46:52 -08:00
|
|
|
{
|
|
|
|
|
reinterpret_cast<IGUIObject*>(data)->TraceMember(trc);
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-21 10:08:41 -07:00
|
|
|
void TraceMember(JSTracer* trc);
|
2015-01-24 06:46:52 -08:00
|
|
|
|
2019-09-22 16:28:25 -07:00
|
|
|
// Variables
|
2003-11-23 18:18:41 -08:00
|
|
|
protected:
|
2020-01-15 08:00:37 -08:00
|
|
|
static const CStr EventNameMouseEnter;
|
|
|
|
|
static const CStr EventNameMouseMove;
|
|
|
|
|
static const CStr EventNameMouseLeave;
|
|
|
|
|
|
2004-10-14 03:09:26 -07:00
|
|
|
// Name of object
|
2019-09-22 16:28:25 -07:00
|
|
|
CStr m_Name;
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2019-09-22 16:28:25 -07:00
|
|
|
// Constructed on the heap, will be destroyed along with the the CGUI
|
2019-10-01 05:46:55 -07:00
|
|
|
std::vector<IGUIObject*> m_Children;
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2004-10-14 03:09:26 -07:00
|
|
|
// Pointer to parent
|
2019-09-22 16:28:25 -07:00
|
|
|
IGUIObject* m_pParent;
|
2014-03-07 14:43:57 -08:00
|
|
|
|
2006-01-21 03:07:25 -08:00
|
|
|
//This represents the last click time for each mouse button
|
|
|
|
|
double m_LastClickTime[6];
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2003-11-30 23:06:55 -08:00
|
|
|
/**
|
2019-10-05 02:58:31 -07:00
|
|
|
* This variable is true if the mouse is hovering this object and
|
|
|
|
|
* this object is the topmost object shown in this location.
|
2003-11-30 23:06:55 -08:00
|
|
|
*/
|
2019-09-22 16:28:25 -07:00
|
|
|
bool m_MouseHovering;
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2004-05-28 21:06:50 -07:00
|
|
|
/**
|
|
|
|
|
* Settings pool, all an object's settings are located here
|
|
|
|
|
*/
|
2019-08-03 19:20:08 -07:00
|
|
|
std::map<CStr, IGUISetting*> m_Settings;
|
2003-11-23 18:18:41 -08:00
|
|
|
|
2004-10-14 03:09:26 -07:00
|
|
|
// An object can't function stand alone
|
2019-08-21 03:12:33 -07:00
|
|
|
CGUI& m_pGUI;
|
2005-03-30 14:33:10 -08:00
|
|
|
|
|
|
|
|
// Internal storage for registered script handlers.
|
2019-09-22 16:28:25 -07:00
|
|
|
std::map<CStr, JS::Heap<JSObject*> > m_ScriptHandlers;
|
2015-08-21 10:08:41 -07:00
|
|
|
|
2021-04-09 11:01:47 -07:00
|
|
|
// Cached JSObject representing this GUI object.
|
|
|
|
|
std::unique_ptr<IGUIProxyObject> m_JSObject;
|
Change GUI Object Setting values to be members of the IGUIObject inheriting class, rename AddSetting to RegisterSetting.
Improves performance for Draw calls by 3-5% according to a shady
benchmark.
Improves memory layout, since the values are not on the heap anymore but
in the using class.
Reduces complexity of the implementation and increases type safety.
Allows specifying default values at setting value construction time,
refs D2242.
Inspired by Vladislav introducing members that cached GetSetting values
in c016a74309/D325, refs #4039, ee38f0db37/D763, refs 4225,
a1c4c23ce4/D474, D406, which were formerly proposed to be removed in
D2241.
Differential Revision: https://code.wildfiregames.com/D2313
Tested on: clang 8.0.1, gcc 9.1.0, Jenkins vs2015
Comments By: Vladislav
This was SVN commit r23005.
2019-09-27 05:49:59 -07:00
|
|
|
|
2024-10-19 11:17:30 -07:00
|
|
|
CRect m_VisibleArea;
|
|
|
|
|
bool m_IsInsideBoundaries = true;
|
|
|
|
|
|
2021-05-06 01:22:37 -07:00
|
|
|
CGUISimpleSetting<bool> m_Enabled;
|
|
|
|
|
CGUISimpleSetting<bool> m_Hidden;
|
|
|
|
|
CGUISimpleSetting<CGUISize> m_Size;
|
|
|
|
|
CGUISimpleSetting<CStr> m_Style;
|
|
|
|
|
CGUIHotkey m_Hotkey;
|
|
|
|
|
CGUISimpleSetting<float> m_Z;
|
|
|
|
|
CGUISimpleSetting<bool> m_Absolute;
|
|
|
|
|
CGUISimpleSetting<bool> m_Ghost;
|
|
|
|
|
CGUISimpleSetting<float> m_AspectRatio;
|
|
|
|
|
CGUISimpleSetting<CStrW> m_Tooltip;
|
|
|
|
|
CGUISimpleSetting<CStr> m_TooltipStyle;
|
2003-11-23 18:18:41 -08:00
|
|
|
};
|
|
|
|
|
|
2015-08-21 10:08:41 -07:00
|
|
|
#endif // INCLUDED_IGUIOBJECT
|