Hi to you all. After i start with my questions, let me wish you all an Happy New Year.
Now, with my questions. I'm using Nick's Health Bar v2.0.
Everything is good, i've changed the colour and a couple of things, not much. Now, i have a GUI framework, explained on another topic, and it as frames around all miniwindows.
I think this is the code for the frames:
-- make a miniwindow under the text
if WindowCreate (background_window, -- window ID
left-4,
top-4,
right - left + 8, -- width
bottom - top + 8, -- depth
12, -- center it (ignored anyway)
3, -- draw underneath (1) + absolute location (2)
0x000000) ~= eOK then
-- problem creating the window. Not sure why this happens, but it some
-- players have encountered a depth of -3, which causes the plugin to crash.
return
end -- if
-- load the top border image
if WindowLoadImage (background_window, "border_top", GetInfo (66) .. "images/layout/border_top.png") == eOK then
check (WindowDrawImage (background_window, "border_top", 0, 0, 0, 0, 1)) -- draw it
else -- the file is missing
Note( "File '" .. GetInfo (66) .. "images/layout/border_top.png' is missing.")
end -- if
-- load the bottom border image
if WindowLoadImage (background_window, "border_bottom", GetInfo (66) .. "images/layout/border_bottom.png") == eOK then
check (WindowDrawImage (background_window, "border_bottom", 0, bottom-top-3, 0, 0, 1)) -- draw it
else -- the file is missing
Note( "File '" .. GetInfo (66) .. "images/layout/border_top.png' is missing.")
end -- if
-- load the left border image
if WindowLoadImage (background_window, "border_left", GetInfo (66) .. "images/layout/border_left.png") == eOK then
check (WindowDrawImage (background_window, "border_left", 0, 0, 0, 0, 1)) -- draw it
else -- the file is missing
Note( "File '" .. GetInfo (66) .. "images/layout/border_left.png' is missing.")
end -- if
-- load the right border image
if WindowLoadImage (background_window, "border_right", GetInfo (66) .. "images/layout/border_right.png") == eOK then
check (WindowDrawImage (background_window, "border_right", right-left-3, 0, 0, 0, 1)) -- draw it
else -- the file is missing
Note( "File '" .. GetInfo (66) .. "images/layout/border_right.png' is missing.")
end -- if
-- show the window
WindowShow (background_window, true)
How can i had that to Nick's Health Bar?
http://www.gammon.com.au/forum/?id=9270&reply=51#reply51
And after that, how can i make it static, in one place, cause of the frames?
Thank you all. |