From ec9f4b2875ebd025e212559522a98a59f6796e85 Mon Sep 17 00:00:00 2001 From: BlockMen Date: Wed, 15 Jul 2015 01:16:52 +0200 Subject: Add hud.swap_statbar(), fixes BlockMen/hunger#2 --- API.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'API.txt') diff --git a/API.txt b/API.txt index caeaf90..371cdfd 100644 --- a/API.txt +++ b/API.txt @@ -1,13 +1,18 @@ -function hud.register(name, def) +hud.register(name, def) -- name: statbar name (health, air, hunger, armor already used by default) -- def: (see below) hud.change_item(player, name, def) -- player: player object - -- name: statbar name (health, air, hunger, armor already used by default) + -- name: statbar name -- def: table containing new values -- currently supported: number, text and offset +hud.swap_statbar(player, name1, name2) -- swaps position and offset of statbar with name1 with statbar with name2 + -- player: player object + -- name1: statbar name + -- name2: statbar name + hud.remove_item(player, name) HUD item definition -- cgit v1.2.3