Page 3 of 5

Re: Released: Quick Action Bar

Posted: Thu Jun 06, 2013 1:50 pm
by Drakkan
EDIT: I get this mode worked, unfortunately it completely disabled all grimwigedts dialogues I am using in my dungeon. I suppose I need add something somewhere so both will be working ? Could you give me some hint pls ?

thanks for working on this mode !

EDIT2 - got it worked, need to place this in my init.lua

cloneObject{
name = "party",
baseObject = "party",
onDrawGui = function(g)
if ( qb_script ~= nil and qb_script.onDrawGui ~= nil ) then
qb_script.onDrawGui(g);
end
gw._drawGUI(g)
end,
}

thanks to Marco Mastropaolo for this !

Re: Released: Quick Action Bar

Posted: Thu Jun 06, 2013 5:18 pm
by Komag
After more playing I have another request - right click on buttons

So I'm glad it properly disappears on holding RMB, but I'm so used to using right-click to attack and use items, that it would be nice for it to work for the quick-bar too instead of just left-click.

I was thinking maybe you could have a counter that adds up real fast, and only if it goes over some number then it would not register as a right-click but as a RMB holding. But now that I think about it, that's actually probably not even necessary, just add RMB in for the clicks and it should work fine.

On the other hand, if you click RMB for just a moment the bar does disappear for a moment, so if right-click is enabled then it might look better not to hide the bar unless RMB is held for longer than, say, 0.3 seconds.

EDIT - or it could be like the main game HUD, where if you press RMB when selecting an item it doesn't start the free look, as that only happens when you press RMB somewhere outside the HUD

EDIT - actually, the blink of the quick bar every time I attack or do a spell is pretty annoying now that I'm playing for quite a while

Re: Released: Quick Action Bar

Posted: Mon Jun 10, 2013 12:01 am
by JohnWordsworth
Hey Komag, will fix that unrealised consequence very soon :). Might not be until I'm back home in a couple of days, but it's an easy fix. If the mouse moves more than a few pixels while being right clicked, then get rid of the bar - otherwise, leave it as is.

Re: Released: Quick Action Bar

Posted: Fri Jun 14, 2013 4:31 am
by JohnWordsworth
Quick Action Bar Updated - I've updated the quick action bar so that right clicking is much more like the rest of the UI now. In short, right clicking on a button won't hide the QuickBar, but right clicking and using mouse look will hide the action bar.

Long version: It's not possible to tell whether we're in mouse look mode directly, but I've got a pretty good estimate. In mouse look mode, the mouseX and mouseY readings actually turn into 'deltas' instead of absolute positions. So, if we read a right click and a mouseX or mouseY value of zero or below then we assume your are in mouse look mode. The two negative side effects are; 1. If you right click and move the mouse really quickly in the +x, +y direction (down right), the bar doesn't disappear until the user stops moving the mouse (or moves it in another direction) for a single frame. 2. Right clicking on a button and then moving the mouse to a screen edge where X or Y = 0 will cause the QuickBar to disappear. However, this mechanism feels natural and works pretty well I think.

Naturally, the only change this update is the script - just copy and paste the new script into the script entity and you've updated :).

Re: Released: Quick Action Bar

Posted: Fri Jun 14, 2013 4:39 am
by msyblade
Hahaha, the previous Komag post is epic. "Triple Edit -Now that I think about it. . ."

Re: Released: Quick Action Bar

Posted: Sat Jun 15, 2013 1:39 pm
by Komag
the files on Nexus seems to be mixed up a bit like last time, the regular download for 1.0.1 is just the sample dungeon again

Re: Released: Quick Action Bar

Posted: Sun Jun 16, 2013 2:53 am
by JohnWordsworth
Doh! Sorry - I must've clicked on the wrong file to upload.

I've uploaded version 1.0.2, which simply adds an 'autoexec()' method which means that the quickbar will 'self install' if you are using the Framework (but it doesn't require it), so you don't have to manually edit the party onDrawGui hook.

Hopefully the new uploads are correct now (sample dungeon and integration package). Unfortunately, there are no "normal servers" available to download from at the moment, so I can't test it. I was more careful this time around though. :)

Re: Released: Quick Action Bar

Posted: Sat Sep 07, 2013 9:31 pm
by Komag
Hey John, I'm finally getting around to checking on this again and working to properly integrate in Master Quest for the past few hours.

Most Important Point: This is AWESOME! After test playing with it again for a while, I absolutely love it, very very nice. :D :mrgreen:

I feel very close to ready to be done (and fix a few other issue with my mod) and do my big update, but I have just a couple remaining issues that I'm hoping you can help with:


[ISSUE 1]

Is there any chance you could reconsider making the hot keys assignable during gameplay?

I know it would take some work, but I think it would be so much better to allow the player to set the keys on the fly than to have to try to guess what will work for them (with each mod author either leaving them default or changing them differently). I personally find the default hot keys too far away from my fingers to be useful, but I dare not set them to keys close to my gameplay keys because people are likely to have slightly altered their playing keys and I'm too likely to overlap them by chance.

I think my old idea would work well: Have a tiny "set hotkey" button on the bar (maybe taking part of the drag section), and when the player clicks it, the script asks for each hotkey one at a time, and detects which key the player hits next, recording new hotkeys. If a new graphical button is too much, even just a new permanent hotkey for setting the other hotkeys would be nice, such as "m" or "/" being the one big permanent hotkey used to set the rest. (next to . and ,)

I fear the coding is far beyond me :)


[ISSUE 2]

I would really like to be able to right-click on the buttons on the bar and have them work (currently only left click works). I spend most of the game right-clicking the character weapons, and it would feel more natural to also be able to right click parts of the quick bar as well. (Your previous solution to other right-clicks not always making the quick bar blink works very well, good job on that.)

I'll look into it some more and see if I can't adjust this myself. EDIT - I've combed it over, trying to understand the mouseDown and g.button stuff, but I can't figure it out well enough. Does the main gui "button(id, x,...)" command only work with left clicks? Anyway, this just makes me all the more impressed with what you're able to do!


[ISSUE 3]

My only other small gripe is that the graphics of it still seem a little too bright compared to the champions HUDs, and thus sort of catch my vision a bit more than I would like. Maybe just a quick brush through photoshop to darken the bright spots or something like that.


PS - The main QuickBar v1-0-2 download on Nexus is still just an exact copy of the sample dungeon file, still missing an easy way to know how to handle it. I suspect this might explain why not enough authors are using it yet. I had to again open up the sample dungeon, manually copy/paste the script code from the lua entity, and then paste it into my dungeon again (with my adjustments such as my scaled potions, and my hotkeys).

Re: Released: Quick Action Bar

Posted: Sat Sep 07, 2013 11:21 pm
by JohnWordsworth
Hey Komag, a bit busy for the next day or two - but I'll see what I can do on Tuesday :p.

Issue 1 - Should be able to get this in there.
Issue 2 - I have a feeling that Gui buttons only allow left clicks, but I'll investigate.
Issue 3 - Will add a 'thin' layer of grunge to the textures.

Thanks for the feedback and kind words. Had forgotten about the 1-0-2 download. WIll resolve when I publish this updated version!

Re: Released: Quick Action Bar

Posted: Sun Sep 08, 2013 12:05 am
by Komag
Awesome, I'll wait for that update then! :)

PS - if "button(...)" only takes left click, would it be possible to check for mouseDown(2) for only the first frame of it being down and check the XY and manually match it to the correct locations? Maybe that's too much bother though