43#define DD_MAX_SCREWPROP 6
44#define DD_MAX_AEROENGINE 6
46#define DD_MAX_GEOMETRIC_ANIMATIONS 10
240 char*
getChar(
int key) {
return key <
data.size() ?
data[key].data.value_char :
nullptr; };
243 void setBool(
int key,
bool val) {
if (key <
data.size())
data[key].data.value_bool = val; };
244 void setInt(
int key,
int val) {
if (key <
data.size())
data[key].data.value_int = val; };
245 void setFloat(
int key,
float val) {
if (key <
data.size())
data[key].data.value_float = val; };
313 void applyUiScaleRecursive(MyGUI::Widget* parent, MyGUI::IntSize parent_orig_size, MyGUI::IntSize parent_new_size);
369 } layoutGeometricAnimation_t;
383 } layoutGraphicalAnimation_t;
408 bool parseLink(std::string& linkArgs,
int& linkID,
char& condition,
float& conditionArgument,
const std::string&
filename,
const std::string& name);
Central state/object manager and communications hub.
#define DD_MAX_GEOMETRIC_ANIMATIONS
Self reference-counting objects, as requred by AngelScript garbage collector.
void loadLayoutInternal()
MyGUI::WindowPtr mainWidget
void applyUiScaleRecursive(MyGUI::Widget *parent, MyGUI::IntSize parent_orig_size, MyGUI::IntSize parent_new_size)
void setVisible(bool visible, bool smooth=true)
void snapshotWidgetOriginsRecursive(MyGUI::Widget *parent)
float getSmoothNumeric(int linkID, float &lastVal)
bool parseLink(std::string &linkArgs, int &linkID, char &condition, float &conditionArgument, const std::string &filename, const std::string &name)
float m_ui_scale
Also applies to pixel values of 'scale' and 'translate' animations.
void applyUiScale()
Reads cvar 'ui_scale_factor'; only affects screen dashboards (not RTT)
MyGUI::VectorWidgetPtr widgets
std::vector< layoutLink_t > controls
std::map< MyGUI::Widget *, WidgetOrigin > m_widget_origins
Unscaled coords as loaded from layout; empty for RTT dashboards.
MyGUI::IntSize m_main_origin_size
Size of mainWidget when m_widget_origins were recorded.
DashBoardManager * manager
void loadLayoutRecursive(MyGUI::WidgetPtr ptr)
void applyUiScale()
Reads cvar 'ui_scale_factor'; only affects screen dashboards (not RTT)
void setVisible(bool visibility)
bool wasDashboardRttLoaded() const
bool wasDashboardHudLoaded() const
void setFloat(int key, float val)
std::vector< dashData_t > data
void setInt(int key, int val)
std::string determineLayoutFromDashboardMod(CacheEntryPtr &entry, std::string const &basename, BitMask_t loaddashboardFlags)
int getLinkIDForName(Ogre::String &str)
void setEnabled(int key, bool val)
void setVisible3d(bool visibility)
void loadDashboardModDetails(CacheEntryPtr &entry)
int getNumLoadedRTTDashboards() const
void setChar(int key, const char *val)
std::string determineTruckLayoutFromDashboardMod(Ogre::FileInfoListPtr &filelist)
int registerCustomInput(Ogre::String name, int dataType)
void setBool(int key, bool val)
virtual ~DashBoardManager() override
std::string getLinkNameForID(DashData id)
std::vector< DashBoard * > m_dashboards
DashBoard * loadDashBoard(const std::string &filename, BitMask_t flags, RTTLayer *rttLayer)
float getNumeric(int key)
int registeredCustomInputs
RTT texture 'slot' within MyGUI system; we can only create them, not destroy, so we reuse.
@ DD_AEROENGINE_THROTTLE_4
@ DD_CUSTOM_LIGHT6
custom light 6 on
@ DD_CUSTOM_LIGHT7
custom light 7 on
@ DD_CUSTOM_LIGHT10
custom light 10 on
@ DD_CUSTOM_LIGHT2
custom light 2 on
@ DD_CUSTOM_LIGHT4
custom light 4 on
@ DD_GUISETTING_TACHO
(char) Tacho texture name - from 'guisettings' section of truck file.
@ DD_ENGINE_NUM_GEAR
current gear
@ DD_LIGHTS_LEGACY
Alias of 'sidelights'.
@ DD_GUISETTING_SPEEDO_KPH
(float) Like DD_ENGINE_SPEEDO_KPH, but if 'speedoTexture' and 'speedoMax' in 'guisettings' are set,...
@ DD_ENGINE_AUTOGEAR_STRING
string like "<current gear>/<max gear>"
@ DD_GUISETTING_HELP
(char) Help texture name - from 'guisettings' section of truck file.
@ DD_GUISETTING_TACHO_RPM
(float) Like DD_ENGINE_RPM, but if 'tachoTexture' and 'useMaxRPM' in 'guisettings' is set,...
@ DD_PARKINGBRAKE
chassis pitch
@ DD_AEROENGINE_THROTTLE_2
@ DD_CUSTOM_LIGHT9
custom light 9 on
@ DD_SIGNAL_WARNING
The warning-blink indicator is lit.
@ DD_CUSTOM_LIGHT3
custom light 3 on
@ DD_CRUISECONTROL_ACTIVE
ties locked
@ DD_SIGNAL_TURNLEFT
Left blinker is lit.
@ DD_ENGINE_SPEEDO_MPH
speedo in kilometer per hour
@ DD_ENGINE_IGNITION
turbo gauge
@ DD_CUSTOM_LIGHT8
custom light 8 on
@ DD_AEROENGINE_THROTTLE_5
@ DD_ENGINE_GEAR
clutch warning lamp
@ DD_AEROENGINE_THROTTLE_0
@ DD_LOCKED
parking brake status
@ DD_ENGINE_AUTO_GEAR
string like "P R N G"
@ DD_SIGNAL_TURNRIGHT
Right blinker is lit.
@ DD_CUSTOM_LIGHT5
custom light 5 on
@ DD_ENGINE_CLUTCH_WARNING
battery lamp
@ DD_LOW_PRESSURE
locked lamp
@ DD_ENGINE_TURBO
speedo in miles per hour
@ DD_ENGINE_CLUTCH
automatic gear
@ DD_GUISETTING_SPEEDO
(char) Speedo texture name - from 'guisettings' section of truck file.
@ DD_CUSTOM_LIGHT1
custom light 1 on
@ DD_TRACTIONCONTROL_MODE
low pressure
@ DD_AEROENGINE_THROTTLE_3
@ DD_AEROENGINE_THROTTLE_1
@ LOADDASHBOARD_RTT_TEXTURE
Will be drawn to texture. Unless STACKABLE, it prevents the default dashboard from loading.
@ LOADDASHBOARD_RENDERDASH
Will be drawn to texture in classic 'renderdash' format. Ignores STACKABLE flag.
@ LOADDASHBOARD_SCREEN_HUD
Will be drawn to screen. Unless STACKABLE, it prevents the default dashboard from loading.
@ LOADDASHBOARD_STACKABLE
Allows loading multiple dashboards at once (by default there's only one for screen and one for RTT).
char format_neg_zero[255]
Test for undesired '-0.0' on display. Only for link type "format". Empty if not applicable.
layoutGeometricAnimation_t geometricAnimations[DD_MAX_GEOMETRIC_ANIMATIONS]
MyGUI::IntSize initialSize
MyGUI::IntPoint initialPosition
MyGUI::RotatingSkin * rotImg
layoutGraphicalAnimation_t graphicalAnimation
int geometricAnimationCount
dashData_t(char type, std::string name)
char value_char[DD_MAXCHAR]