#include <hud.h>
|
bool | calculateScreenPos (const v3s16 &camera_offset, HudElement *e, v2s32 *pos) |
|
void | drawStatbar (v2s32 pos, u16 corner, u16 drawdir, const std::string &texture, const std::string &bgtexture, s32 count, s32 maxcount, v2s32 offset, v2s32 size=v2s32()) |
|
void | drawItems (v2s32 screen_pos, v2s32 screen_offset, s32 itemcount, v2f alignment, s32 inv_offset, InventoryList *mainlist, u16 selectitem, u16 direction, bool is_hotbar) |
|
void | drawItem (const ItemStack &item, const core::rect< s32 > &rect, bool selected) |
|
void | drawCompassTranslate (HudElement *e, video::ITexture *texture, const core::rect< s32 > &rect, int way) |
|
void | drawCompassRotate (HudElement *e, video::ITexture *texture, const core::rect< s32 > &rect, int way) |
|
◆ anonymous enum
Enumerator |
---|
HIGHLIGHT_BOX | |
HIGHLIGHT_HALO | |
HIGHLIGHT_NONE | |
◆ BlockBoundsMode
Enumerator |
---|
BLOCK_BOUNDS_OFF | |
BLOCK_BOUNDS_CURRENT | |
BLOCK_BOUNDS_NEAR | |
◆ Hud()
References client, crosshair_argb, driver, g_settings, Settings::get(), RenderingEngine::get_video_driver(), Settings::getBool(), Settings::getS16(), Settings::getS32(), IShaderSource::getShader(), IShaderSource::getShaderInfo(), ITextureSource::getTextureForMesh(), Settings::getV3F(), hbar_colors, HIGHLIGHT_BOX, HIGHLIGHT_HALO, HIGHLIGHT_NONE, inventory, ITextureSource::isKnownSourceImage(), m_block_bounds_material, m_halo_boxes, m_mode, m_rotation_mesh_buffer, m_selection_boxes, m_selection_material, ShaderInfo::material, myround(), player, rangelim, readScalingSetting(), Settings::registerChangedCallback(), selectionbox_argb, setting_changed_callback(), TILE_MATERIAL_ALPHA, tsrc, use_crosshair_image, and use_object_crosshair_image.
◆ ~Hud()
◆ calculateScreenPos()
◆ disableBlockBounds()
void Hud::disableBlockBounds |
( |
| ) |
|
◆ drawBlockBounds()
void Hud::drawBlockBounds |
( |
| ) |
|
References BLOCK_BOUNDS_NEAR, BLOCK_BOUNDS_OFF, BS, driver, g_settings, LocalPlayer::getStandingNodePos(), Settings::getU16(), intToFloat(), m_block_bounds_material, m_block_bounds_mode, MAP_BLOCKSIZE, player, and rangelim.
Referenced by Draw3D::run().
◆ drawCompassRotate()
void Hud::drawCompassRotate |
( |
HudElement * | e, |
|
|
video::ITexture * | texture, |
|
|
const core::rect< s32 > & | rect, |
|
|
int | way ) |
|
private |
◆ drawCompassTranslate()
void Hud::drawCompassTranslate |
( |
HudElement * | e, |
|
|
video::ITexture * | texture, |
|
|
const core::rect< s32 > & | rect, |
|
|
int | way ) |
|
private |
◆ drawCrosshair()
void Hud::drawCrosshair |
( |
| ) |
|
References crosshair_argb, CROSSHAIR_LINE_SIZE, draw2DImageFilterScaled(), driver, ITextureSource::getTexture(), m_displaycenter, m_scale_factor, OBJECT_CROSSHAIR_LINE_SIZE, pointing_at_object, tsrc, use_crosshair_image, and use_object_crosshair_image.
Referenced by DrawHUD::run().
◆ drawHotbar()
void Hud::drawHotbar |
( |
const v2s32 & | pos, |
|
|
const v2f & | offset, |
|
|
u16 | direction, |
|
|
const v2f & | align ) |
References dir(), drawItems(), g_settings, g_touchcontrols, Settings::getFloat(), Inventory::getList(), Player::getMaxHotbarItemcount(), Player::getWieldIndex(), RenderingEngine::getWindowSize(), inventory, m_hotbar_imagesize, m_padding, player, and TouchControls::resetHotbarRects().
Referenced by drawLuaElements().
◆ drawItem()
void Hud::drawItem |
( |
const ItemStack & | item, |
|
|
const core::rect< s32 > & | rect, |
|
|
bool | selected ) |
|
private |
References draw2DImageFilterScaled(), drawItemStack(), driver, g_fontengine, FontEngine::getFont(), ITextureSource::getTexture(), hbar_colors, hotbar_selected_image, IT_ROT_NONE, IT_ROT_SELECTED, m_padding, tsrc, use_hotbar_image, and use_hotbar_selected_image.
Referenced by drawItems().
◆ drawItems()
void Hud::drawItems |
( |
v2s32 | screen_pos, |
|
|
v2s32 | screen_offset, |
|
|
s32 | itemcount, |
|
|
v2f | alignment, |
|
|
s32 | inv_offset, |
|
|
InventoryList * | mainlist, |
|
|
u16 | selectitem, |
|
|
u16 | direction, |
|
|
bool | is_hotbar ) |
|
private |
References draw2DImageFilterScaled(), drawItem(), driver, g_touchcontrols, InventoryList::getItem(), InventoryList::getSize(), ITextureSource::getTexture(), hbar_colors, hotbar_image, LocalPlayer::hotbar_image, hotbar_selected_image, LocalPlayer::hotbar_selected_image, HUD_DIR_BOTTOM_TOP, HUD_DIR_RIGHT_LEFT, HUD_DIR_TOP_BOTTOM, m_hotbar_imagesize, m_padding, m_scale_factor, player, TouchControls::registerHotbarRect(), tsrc, use_hotbar_image, and use_hotbar_selected_image.
Referenced by drawHotbar(), and drawLuaElements().
◆ drawLuaElements()
void Hud::drawLuaElements |
( |
const v3s16 & | camera_offset | ) |
|
References BS, EnrichedString::c_str(), calculateScreenPos(), irr::gui::CGUITTFont::draw(), draw2DImageFilterScaled(), drawCompassRotate(), drawCompassTranslate(), drawHotbar(), drawItems(), drawStatbar(), driver, FM_Mono, FM_Unspecified, g_fontengine, FontEngine::getDefaultFontSize(), FontEngine::getFont(), Player::getHud(), Inventory::getList(), EnrichedString::getNextLine(), LocalPlayer::getPosition(), FontEngine::getTextHeight(), ITextureSource::getTexture(), HUD_COMPASS_ROTATE, HUD_COMPASS_ROTATE_REVERSE, HUD_COMPASS_TRANSLATE, HUD_COMPASS_TRANSLATE_REVERSE, HUD_CORNER_UPPER, HUD_ELEM_COMPASS, HUD_ELEM_HOTBAR, HUD_ELEM_IMAGE, HUD_ELEM_IMAGE_WAYPOINT, HUD_ELEM_INVENTORY, HUD_ELEM_MINIMAP, HUD_ELEM_STATBAR, HUD_ELEM_TEXT, HUD_ELEM_WAYPOINT, HUD_FLAG_HOTBAR_VISIBLE, HUD_FLAG_MINIMAP_VISIBLE, Player::hud_flags, HUD_STYLE_BOLD, HUD_STYLE_ITALIC, HUD_STYLE_MONO, infostream, inventory, m_hud_scaling, m_scale_factor, m_screensize, LocalPlayer::maxHudId(), player, EnrichedString::size(), tsrc, unescape_string(), unescape_translate(), utf8_to_wide(), warningstream, and HudElement::z_index.
Referenced by DrawHUD::run().
◆ drawSelectionMesh()
void Hud::drawSelectionMesh |
( |
| ) |
|
References driver, HIGHLIGHT_BOX, HIGHLIGHT_HALO, HIGHLIGHT_NONE, m_mode, m_selected_face_normal, m_selection_boxes, m_selection_material, m_selection_mesh, m_selection_mesh_color, m_selection_pos_with_offset, m_selection_rotation, MYMIN, selectionbox_argb, setMeshColor(), and setMeshColorByNormal().
Referenced by Draw3D::run().
◆ drawStatbar()
void Hud::drawStatbar |
( |
v2s32 | pos, |
|
|
u16 | corner, |
|
|
u16 | drawdir, |
|
|
const std::string & | texture, |
|
|
const std::string & | bgtexture, |
|
|
s32 | count, |
|
|
s32 | maxcount, |
|
|
v2s32 | offset, |
|
|
v2s32 | size = v2s32() ) |
|
private |
◆ getSelectionBoxes()
std::vector< aabb3f > * Hud::getSelectionBoxes |
( |
| ) |
|
|
inline |
◆ getSelectionPos()
v3f Hud::getSelectionPos |
( |
| ) |
const |
|
inline |
◆ getSelectionRotation()
v3f Hud::getSelectionRotation |
( |
| ) |
const |
|
inline |
◆ hasElementOfType()
◆ readScalingSetting()
void Hud::readScalingSetting |
( |
| ) |
|
◆ resizeHotbar()
void Hud::resizeHotbar |
( |
| ) |
|
◆ setSelectedFaceNormal()
void Hud::setSelectedFaceNormal |
( |
const v3f & | face_normal | ) |
|
|
inline |
◆ setSelectionMeshColor()
void Hud::setSelectionMeshColor |
( |
const video::SColor & | color | ) |
|
|
inline |
◆ setSelectionPos()
void Hud::setSelectionPos |
( |
const v3f & | pos, |
|
|
const v3s16 & | camera_offset ) |
◆ setSelectionRotation()
void Hud::setSelectionRotation |
( |
v3f | rotation | ) |
|
|
inline |
◆ toggleBlockBounds()
◆ updateSelectionMesh()
void Hud::updateSelectionMesh |
( |
const v3s16 & | camera_offset | ) |
|
◆ client
◆ crosshair_argb
video::SColor Hud::crosshair_argb |
◆ driver
video::IVideoDriver* Hud::driver = nullptr |
|
private |
◆ hbar_colors
video::SColor Hud::hbar_colors[4] |
|
private |
◆ hotbar_image
std::string Hud::hotbar_image = "" |
◆ hotbar_selected_image
std::string Hud::hotbar_selected_image = "" |
◆ inventory
◆ m_block_bounds_material
video::SMaterial Hud::m_block_bounds_material |
|
private |
◆ m_block_bounds_mode
◆ m_camera_offset
v3s16 Hud::m_camera_offset |
|
private |
◆ m_displaycenter
v2s32 Hud::m_displaycenter |
|
private |
◆ m_halo_boxes
std::vector<aabb3f> Hud::m_halo_boxes |
|
private |
◆ m_hotbar_imagesize
s32 Hud::m_hotbar_imagesize |
|
private |
◆ m_hud_scaling
◆ []
◆ m_padding
◆ m_rotation_mesh_buffer
irr_ptr<scene::SMeshBuffer> Hud::m_rotation_mesh_buffer |
|
private |
◆ m_scale_factor
float Hud::m_scale_factor |
|
private |
◆ m_screensize
◆ m_selected_face_normal
v3f Hud::m_selected_face_normal |
|
private |
◆ m_selection_boxes
std::vector<aabb3f> Hud::m_selection_boxes |
|
private |
◆ m_selection_material
video::SMaterial Hud::m_selection_material |
|
private |
◆ m_selection_mesh
scene::IMesh* Hud::m_selection_mesh = nullptr |
|
private |
◆ m_selection_mesh_color
video::SColor Hud::m_selection_mesh_color |
|
private |
◆ m_selection_pos
◆ m_selection_pos_with_offset
v3f Hud::m_selection_pos_with_offset |
|
private |
◆ m_selection_rotation
v3f Hud::m_selection_rotation |
|
private |
◆ player
◆ pointing_at_object
bool Hud::pointing_at_object = false |
◆ selectionbox_argb
video::SColor Hud::selectionbox_argb |
◆ tsrc
◆ use_crosshair_image
bool Hud::use_crosshair_image = false |
◆ use_hotbar_image
bool Hud::use_hotbar_image = false |
◆ use_hotbar_selected_image
bool Hud::use_hotbar_selected_image = false |
◆ use_object_crosshair_image
bool Hud::use_object_crosshair_image = false |
The documentation for this class was generated from the following files: