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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Miniwindow Layout

Miniwindow Layout

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


Posted by Gesslar   (24 posts)  [Biography] bio
Date Thu 16 Feb 2012 05:15 PM (UTC)
Message
Grrr, this is driving me banonkers, but maybe someone might know the answer.

I want to have this kind of layout, where all 3 are at the bottom of the screen. They would be two plugins. one has the top 3 bars and the other has the bottom bar.

Top three = HP_bar, SP_bar, EP_bar
Bottom = XP_bar


========== ========== ========== 
================================


What's happening right now is that when I create the top three bars, then create the bottom bar, SP_bar disappears.

I think it has to do with something to do with the fact that they are using the same position. But I thought that they would stack, instead of overwrite.

Any suggestions?
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #1 on Thu 16 Feb 2012 07:53 PM (UTC)

Amended on Thu 16 Feb 2012 07:55 PM (UTC) by Twisol

Message
You're exactly right on what the problem is: miniwindows don't stack, they overlap. You'll need to manually position the upper gauges to offset them from the bottom.

It sure would be cool if you could use CSS to build your layout:
row {
  width: 100%;
  position: fixed;
}

row#xp-gauges {
  bottom: 0px;
  height: 20px;
}

row#other-gauges {
  bottom: 20px;
  height: 20px;
}

It could probably be done in MUSHclient, though it'd take a while...

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Fri 17 Feb 2012 04:24 AM (UTC)
Message
You can manually position them. For example the upper one could find out where the other two are and put itself on top of them.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Dontarion   USA  (62 posts)  [Biography] bio
Date Reply #3 on Wed 22 Feb 2012 04:57 PM (UTC)
Message
This is how I handle my single prompt bar. Granted it's not two lines but I think you'll get the picture.

			--health bar
			bar_offset = 5
			health_left_offset = bar_offset
			mana_left_offset = bar_offset*3+151
			top_offset = 6
			bar_width = 150
			bar_height = 20
			
			WindowRectOp("promptw", 2, health_left_offset, top_offset, bar_width+1, bar_height+1, ColourNameToRGB("silver"), ColourNameToRGB("silver"))
			
			if health > 0 then
			WindowRectOp("promptw", 2, health_left_offset + 1, top_offset + 1, bar_width*(health/max_health), bar_height, ColourNameToRGB(health_font_colour), ColourNameToRGB("silver"))
			end
			
			-- Mana bar
			WindowRectOp("promptw", 2, mana_left_offset, top_offset, mana_left_offset+bar_width+1, bar_height+1, ColourNameToRGB("silver"), ColourNameToRGB("silver"))
			if mana > 0 then
			WindowRectOp("promptw", 2, mana_left_offset + 1, top_offset + 1, mana_left_offset+(bar_width*(mana/max_mana)), bar_height, ColourNameToRGB(mana_font_colour), ColourNameToRGB("silver"))		
			end
			
			--WindowText("promptw", "pwf", health .. ", ", left_offset, top_offset, 0, 0, ColourNameToRGB(health_font_colour), 0) -- health
			--left_offset = left_offset + string.len(health .. ", ")*font_width_offset
			--WindowText("promptw", "pwf", mana .. ", ", left_offset, top_offset, 0, 0, ColourNameToRGB(mana_font_colour), 0) -- mana
			left_offset = mana_left_offset + bar_width + 1 + bar_offset
			WindowText("promptw", "pwf", endurance .. ", ", left_offset, top_offset, 0, 0, ColourNameToRGB(endurance_font_colour), 0) -- endurance
			left_offset = left_offset + string.len(endurance .. ", ")*font_width_offset
			WindowText("promptw", "pwf", willpower .. " ", left_offset, top_offset, 0, 0, ColourNameToRGB(willpower_font_colour), 0) -- willpower
			left_offset = left_offset + string.len(willpower .. " ")*font_width_offset
[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.


14,825 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 HostDash]