Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Miniwindows ➜ Health Bar and Frames

Health Bar and Frames

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Halig   Portugal  (123 posts)  Bio
Date Fri 01 Jan 2016 04:45 PM (UTC)
Message
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.
Top

Posted by Halig   Portugal  (123 posts)  Bio
Date Reply #1 on Fri 01 Jan 2016 07:52 PM (UTC)
Message
Ok, done it. Thank you.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


9,784 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.