[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Miniwindows
. . -> [Subject]  Health Bar and Frames
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Health Bar and Frames

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


Posted by Halig   Portugal  (123 posts)  [Biography] 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.
[Go to top] top

Posted by Halig   Portugal  (123 posts)  [Biography] bio
Date Reply #1 on Fri 01 Jan 2016 07:52 PM (UTC)
Message
Ok, done it. Thank you.
[Go to top] 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.


1,894 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]