From ec3a95cea62a969d149bccdb725163bc800e6137 Mon Sep 17 00:00:00 2001 From: Zughy <4279489-marco_a@users.noreply.gitlab.com> Date: Wed, 8 Jul 2020 11:37:19 +0200 Subject: [PATCH] Description + teeny tiny fix --- _en/players/hud.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_en/players/hud.md b/_en/players/hud.md index c17dfe9..0a757c1 100644 --- a/_en/players/hud.md +++ b/_en/players/hud.md @@ -3,6 +3,7 @@ title: HUD layout: default root: ../.. idx: 4.6 +description: Learn how to display HUD elements redirect_from: /en/chapters/hud.html --- @@ -225,7 +226,7 @@ There is one problem however, it won't update when the stats change. ## Changing an Element -You can use the ID returned by the hud_add method to update it or remove it later. +You can use the ID returned by the `hud_add` method to update it or remove it later. ```lua local idx = player:hud_add({ @@ -239,7 +240,7 @@ player:hud_remove(idx) ``` The `hud_change` method takes the element ID, the property to change, and the new -value. The above call changes the `text` property from "Hello World" to "Test". +value. The above call changes the `text` property from "Hello World" to "New text". This means that doing the `hud_change` immediately after the `hud_add` is functionally equivalent to the following, in a rather inefficient way: