Go Back   Heroes of Newerth Forums > Community Contributions > Modifications > User Interface Mods

Reply
 
Thread Tools Display Modes
Old 02-13-2010, 02:07 AM   #1
[ToX]AsiaPingPong
Geometer's Bane 
Join Date: Aug 2009
Movable Frames v1.32

This mod allows users to conveniently and intuitively resize interface objects.
This mod does nothing by itself; other mods must be explicitly programmed to use it.
When using this mod, any customizations you make will automatically be saved.


Contents:
____1. Download
____2. Customization guide
____3. Modding guide
____4. To-do list
____5. Changelog

Download:
Requires HoN Mod Manager

v1.32: movf.honmod
Code:
Older versions:
v1.22: movf.honmod
v1.1: movf.honmod
v1.0: movf.honmod
v0.9: movf.honmod
v0.8: movf.honmod
v0.7: movf.honmod
v0.6: movf.honmod
v0.5: movf.honmod
v0.4: movf.honmod
Customization guide:
Opening the system
Simply click the "Movable frames" button in the game's options.
It will appear here:

Note - you can access this options panel ingame by pressing f6.


Customizing a frame:
Here's an example interface:

Now after clicking the "movable frames" button, it will look like this:

To select a frame, simply click one of the boxes.

Now, simply drag the center of the box to move the frame.
If the frame is resizable, handles will appear. Use these handles to resize the frame.
Some frames must maintain the ratio between width/height. These frames will only have four handles, as opposed to the normal eight.

Hold SHIFT to maintain aspect ratio.
Hold CONTROL to "fine-tune" the move/resize process. This will dramatically reduce mouse sensitivity and allow you to make pixel-by-pixel adjustments. This will also override frames snapping to eachother.

Using the menu:
As you have noticed, there is a menu that appears when you are customizing frames.
This menu has a list of every frame.
You can select a frame by clicking it in the list.
Also, you can hide/show a frame by clicking the "visible" checkbox.
To reset a frame to defaults, click it's "reset" button.

At the bottom of the list, there is an additional checkbox/reset button. These will apply the changes to all frames.

Multiselecting:
You can select more than one frame at a time.
There are two ways of selecting additional frames:
-Hold shift and click another frame
-Click and drag the mouse around several frames, then release.
-Hold shift and click the name of the frame in the menu

Once you have more than one frame selected, a large dragbox will appear that will allow you to move and resize all of the selected frames at the same time.

Note: This large dragbox will only be resizable if ALL of the selected frames are resizable. Likewise, if any of the selected frames must maintain aspect ratio, the large dragbox will maintain aspect ratio.

Modding guide:
In order to use Movable Frames in your mod, you must specify a requirement tag in your mod.xml
Code:
<requirement name="Movable Frames"/>
For each element that you wish to make movable/resizable, you must create an instance of "movf_frame"
It can be placed anywhere.

Here is a list of attributes: (underlined attributes are optional) (the values listed here are the defaults)
Code:
<instance
	name="movf_frame"			
	id="exampleframe"		Name of the ui element that you wish to move/resize
	textid="Example Frame"		Name that the user sees
	visible="true"			Whether the frame is visible by default
	resizable="false"		Whether the frame can be resized
	maintainratio="false"		Whether to maintain the aspect ratio
	minwidth="0"			Specified as a float. This is the minimum width the frame can be, relative to the original size.
	minheight="0"			Specified as a float. This is the minimum height the frame can be, relative to the original size.
	maxwidth="0"			Specified as a float. This is the maximum width the frame can be, relative to the original size.
	maxheight="0"			Specified as a float. This is the maximum height the frame can be, relative to the original size.
	constraintoscreen="false"	Whether the frame is bounded by the screen edges.
	snap="false"			Whether the frame can snap to other frames.
	snapto="false"			Whether other frames can snap to this frame.
	margin="0h"			Margin for use with snapping.
	collapsemargins="false"		If true, the greatest margin between two frames will be used. Otherwise, the sum of the margins is used.
	overridepos="false"		If true, use this instance to specify the default position of the frame, rather than the ui element itself.
	x=""				*
	y=""				*
	width=""			*
	height=""			*
	align=""			*
	valign=""			*
	onupdate=""			**
/>
*Only used when "overridepos" is true.
**This allows you to specify code to execute when the frame is being moved/resized. Everytime a user modifies a frame, the onupdate code will be executed.

Also, when a frame is updated, it is refreshed. Ie. if you have a frame named "examplepanel", it will do RefreshWidget('examplepanel') when the frame is updated.

Other templates:
movf_label creates a label that will scale the size of its text with the size of the label. The text will always fit.
Code:
<instance
	name="movf_label"
	fontmin="some int"		The minimum size of the font of the label.
	fontmax="some int"		The maximum size of the font of the label.
	Any label attribute can be used.
/>
To-do list
Code:
-Add functionality for the spectator interface in addition to the game interface.
-Snap to grid.
Changelog
Code:
v1.32
-Updated for HoN v1.0.0
v1.31
-The button in options is now greyed-out if you do not have a game active.
v1.30
-Updated for FE2
v1.22
-Allowed modders to specify an onrefresh="" in movf_label.
v1.21
-Re-added the frame for the menu button. (It was unintentionally removed in v1.2)
v1.2
-Multiselection!!
-Saving fixed?
-added new attributes to movf_label
-removed onevaluate, onposition, and onresize from movf_frame (sorry, had to be done to get multiselect to work)
-Constraintoscreen attribute removed. Instead, there is now a checkbox that allows you to constrain the current selection to the screen.
v1.1
-Hopefully fixed another saving bug.
v1.0
-Some technicality changes. I needed to change some variable names.
v0.9
-Possible fixed crash bug
v0.8
-Fixed save bug
v0.7
-Added a confirmation dialog to reset all
-Possibly fixed save bug
-Re-added some code that was accidentally deleted in the previous version
v0.6
-Fixed some issues with vertical stacking
-Added a quick access button to the ingame interface
v0.5
-movf_label added
v0.4
-Initial public release

Last edited by AsiaPingPong; 05-12-2010 at 09:59 PM.
AsiaPingPong is offline   Reply With Quote
Old 02-13-2010, 02:10 AM   #2
[VnB]song_tinh
Pre-Purchased
Join Date: Aug 2009
You are so pro AsiaPingPong
Can you make Channeling Bar has Icon and Custom Colors ?
__________________

Vietnamese Community: http://vnb.garena.com/

Last edited by song_tinh; 02-13-2010 at 02:14 AM.
song_tinh is offline   Reply With Quote
Old 02-13-2010, 02:15 AM   #3
MaxGhost
Pre-Purchased Alchemist's Bones Geometer's Bane 
Join Date: Jul 2009
Location: Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
Nice work! Can't wait for an updated MiniUI with this. Good work!
__________________
MaxGhost is offline   Reply With Quote
Old 02-13-2010, 03:57 AM   #4
Delfofthebla
Pre-Purchased Helm of the Black Legion 
Join Date: Aug 2009
Location: USA
Nice work AsiaPingPong. Can't wait to see other mods make use of this.
Delfofthebla is offline   Reply With Quote
Old 02-13-2010, 06:45 AM   #5
P83x
Join Date: Oct 2009
i just don't get it what frags mean and what it does!! (i am from germany)
P83x is offline   Reply With Quote
Old 02-13-2010, 07:56 AM   #6
riddie
Join Date: Nov 2009
Quote:
Originally Posted by P83x View Post
i just don't get it what frags mean and what it does!! (i am from germany)
What do frags have to do with that?
__________________
Player Names - Displays player names, level, health and mana as a percent along with their healthbars.
Player Names Lite - Just one calorie.

"Tempers are wearing thin. Let's just hope some robot doesn't kill everybody."
riddie is offline   Reply With Quote
Old 02-13-2010, 09:11 AM   #7
P83x
Join Date: Oct 2009
frame sry! i mean frame not frag
P83x is offline   Reply With Quote
Old 02-13-2010, 05:28 PM   #8
[CARE]Sephinator
Pre-Purchased Alchemist's Bones 
Join Date: Sep 2009
Location: Sweden
Quote:
Originally Posted by P83x View Post
frame sry! i mean frame not frag
This is a frame.
__________________
Quote:
Originally Posted by IRC
20:11:48 | Sephinator: I got a small window.
20:11:53 | Sephinator: I hate clouds.
20:13:59 | SoundWizard: I hate sephiroth wannabes
20:14:35 | @Warchamp7: i c wut u did
Current Project: HoW40K - UI/FX Coder
Sephinator is offline   Reply With Quote
Old 02-13-2010, 06:21 PM   #9
[NL]arnold_swe
Join Date: Aug 2009
Location: Sweden
This is awesome !!

Downloading now

EDIT: I had little trouble getting this to work but i finally understood ^^ NICE WORK BTW
__________________
AutoVoter, !BloodyBORDERSs!, PingPongRacket & [W.I.P]RockON - Pebbles Soundmod
By Arnold_swe
__________________

WOLOLO Saves the DAY!

Last edited by arnold_swe; 02-13-2010 at 07:24 PM.
arnold_swe is offline   Reply With Quote
Old 02-14-2010, 01:26 AM   #10
[ToX]AsiaPingPong
Geometer's Bane 
Join Date: Aug 2009
Small update.
I added a template for a label that will scale the size of its text so that the text will always fit.
AsiaPingPong is offline   Reply With Quote
Old 02-14-2010, 03:32 AM   #11
[DAE]Tisser
Pre-Purchased Geometer's Bane Alchemist's Bones 
Join Date: Sep 2009
Very nifty!
Tisser is offline   Reply With Quote
Old 02-14-2010, 03:26 PM   #12
Kronopt
Join Date: Jul 2009
Nice!

but, about the options:



It doesn't quite fit with the rest of the options :\
Why don't you create an options menu like the others?
Kronopt is offline   Reply With Quote
Old 02-14-2010, 04:07 PM   #13
[ToX]AsiaPingPong
Geometer's Bane 
Join Date: Aug 2009
Quote:
Originally Posted by Kronopt View Post
Nice!

but, about the options:



It doesn't quite fit with the rest of the options :\
Why don't you create an options menu like the others?
Well, since the movable frames menu needs to open in the game itself, I can't put the whole menu in the game options, it wouldn't make any sense.

Personally, I think the button fits fine where it is. It fits with the rest of the "customize your mods" environment.
AsiaPingPong is offline   Reply With Quote
Old 02-14-2010, 04:28 PM   #14
Kronopt
Join Date: Jul 2009
I meant, instead of this:



Why not:



And when you click the configure button, the in-game menu pops up
Kronopt is offline   Reply With Quote
Old 02-14-2010, 04:41 PM   #15
[ToX]AsiaPingPong
Geometer's Bane 
Join Date: Aug 2009
I feel like that would get lost if you have many mods.
Movable Frames is not so much a mod itself as it is a system for customizing other mods.

I'm going to add a button to the ingame interface for easy access.
AsiaPingPong is offline   Reply With Quote
Old 02-14-2010, 05:11 PM   #16
Kronopt
Join Date: Jul 2009
One more other thing:

There is an issue with the side scroll bar in the movable frames menu.

When I select a panel by clicking on it, like when I click the hp bar, that panel's element in the list appears selected. But when this happens, the side scroll bar doesn't move. Here are some screens:



So, this is the first element of the list, the Mini Target Building.

Now, by selecting the (ex: ) Mini Chat, this happens:



Look how the side scroll bar is still on top. By clicking the top arrow, the list doesn't move. To move the list we must drag the bar or click the bottom arrow, and when we do that, the list suddenly shows its 1st element, the Mini Target Building
Kronopt is offline   Reply With Quote
Old 02-14-2010, 05:19 PM   #17
Kronopt
Join Date: Jul 2009
And, I don't know if I should post this here or on the MiniUi Thread but, the Ui didn't save the first time I changed it
Kronopt is offline   Reply With Quote
Old 02-14-2010, 05:20 PM   #18
[ToX]AsiaPingPong
Geometer's Bane 
Join Date: Aug 2009
Quote:
Originally Posted by Kronopt View Post
One more other thing:

There is an issue with the side scroll bar in the movable frames menu.

When I select a panel by clicking on it, like when I click the hp bar, that panel's element in the list appears selected. But when this happens, the side scroll bar doesn't move. Here are some screens:


So, this is the first element of the list, the Mini Target Building.

Now, by selecting the (ex: ) Mini Chat, this happens:


Look how the side scroll bar is still on top. By clicking the top arrow, the list doesn't move. To move the list we must drag the bar or click the bottom arrow, and when we do that, the list suddenly shows its 1st element, the Mini Target Building
Yeah, I know that.
This is a problem with S2's listbox.
There is no way for me to fix it, unfortunately.
AsiaPingPong is offline   Reply With Quote
Old 02-14-2010, 08:17 PM   #19
Oxrana
Pre-Purchased
Join Date: Jul 2009
My frames dont save changed positions - is it a bug from v0.6 or the problem is in MiniUi 1.2.5 ?
__________________
Come to dark side - we have cookies !
Oxrana is offline   Reply With Quote
Old 02-14-2010, 08:20 PM   #20
[ToX]AsiaPingPong
Geometer's Bane 
Join Date: Aug 2009
Quote:
Originally Posted by Oxrana View Post
My frames dont save changed positions - is it a bug from v0.6 or the problem is in MiniUi 1.2.5 ?
How are you exiting the game?
After setting the new positions, immediately close the game through the game menu. Open it up again and see if it saved correctly.

There is a problem with HoN itself, sometimes it doesn't save variables correctly (this applies to the game option also)
AsiaPingPong is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
Please read the Forum Rules & FAQ
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:03 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Login:
Pwd:
Remember Me?: