How to change color of HUD?

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

How to change color of HUD?

by amadin » Tue Jul 28, 2015 20:54

How to change color of HUD background and buttons on server side in inventory?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: How to change color of HUD?

by Krock » Tue Jul 28, 2015 21:14

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_joinplayer(function(player)
   player:hud_set_hotbar_image("gui_hotbar.png")
   player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
end)

See https://github.com/minetest/minetest/bl ... 2524-L2532
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

Re: How to change color of HUD?

by amadin » Wed Jul 29, 2015 12:37

Krock wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_joinplayer(function(player)
   player:hud_set_hotbar_image("gui_hotbar.png")
   player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
end)

See https://github.com/minetest/minetest/bl ... 2524-L2532

It is not help me, maybe because i use inventory plus mod?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: How to change color of HUD?

by Krock » Wed Jul 29, 2015 13:53

amadin wrote:It is not help me, maybe because i use inventory plus mod?

Add "default" and "inventory_plus" to your depends.txt, so your code gets executed after those.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

amadin
Member
 
Posts: 471
Joined: Tue Jun 16, 2015 16:23
GitHub: Amadin

Re: How to change color of HUD?

by amadin » Wed Jul 29, 2015 14:23

Krock wrote:
amadin wrote:It is not help me, maybe because i use inventory plus mod?

Add "default" and "inventory_plus" to your depends.txt, so your code gets executed after those.

I just try to change bachground in inventory plus mod, nothing else. I'm not mod developer. What i do wrong?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- register_on_joinplayer
minetest.register_on_joinplayer(function(player)
        player:hud_set_hotbar_image("gui_formbg.png")
        player:hud_set_hotbar_selected_image("gui_formbg.png")
   if minetest.setting_getbool("inventory_craft_small") then
      player:get_inventory():set_width("craft", 2)
      player:get_inventory():set_size("craft", 2*2)
   else
      player:get_inventory():set_width("craft", 3)
      player:get_inventory():set_size("craft", 3*3)
   end

   inventory_plus.register_button(player,"craft","Craft")
   if minetest.setting_getbool("creative_mode") then
      inventory_plus.register_button(player,"creative_prev","Creative")
   end
   minetest.after(1,function()
      inventory_plus.set_inventory_formspec(player,inventory_plus.get_formspec(player, inventory_plus.default))
   end)
   
   
end)
 


Return to Minetest General

Who is online

Users browsing this forum: Bing [Bot] and 22 guests

cron