Buttons (quick bars)?

Rob
Site Admin
Posts: 1353
Joined: Sat Sep 25, 2010 6:52 am

Buttons (quick bars)?

Post by Rob » Mon Feb 24, 2020 11:56 am

I'm thinking of adding a feature to Mojo that lets users create buttons and panels of buttons inside the game window. You could make additional quickbars this way. You could use your own artwork (jpg files, etc.) for the buttons.

Anything you do with a hotkey, you could do by clicking on the game with the mouse.

HotkeyNet has this feature. If I do it again in Mojo, I'd like to do it better.

Any thoughts about how this should be implemented?
Author of Mojo

alnmike
Posts: 61
Joined: Sat Sep 10, 2011 7:46 pm

Re: Buttons (quick bars)?

Post by alnmike » Tue Feb 25, 2020 9:37 am

Honestly I'd love the option for outside the game window too but understand how that would be harder to use for most people. A button for different hot keys instead of remembering the 6 keys you have to press to do something specific :)
Google "streamdeck".

But additional quickbars would be sick. Any way to tie into (read, not change) the existing quickbar icons and handle it the same way current dragging works?

Or copy another quickbar that you set up? Example: make quickbar 1 6 how you want mojos, log out. Then copy it in mojo, position when you log back in. Now you can change 1 6 back to whatever you want and keep mojos how it was copied. Should be quicker for you that way since everything should already be in the ini file. (though don't know how icon pictures are handled in the ini, or if it's just a lookup table that points to a lookup table that has the icons)


Edit: in addition to the way you want hot keys for scripts.
Could treat each hot key as a separate file in a folder structure. Like how current scripts can use #include.
But just name the #included files a specific way. "Hotbar1.txt" for example.

Rob
Site Admin
Posts: 1353
Joined: Sat Sep 25, 2010 6:52 am

Re: Buttons (quick bars)?

Post by Rob » Tue Feb 25, 2020 2:28 pm

alnmike wrote:
Tue Feb 25, 2020 9:37 am
Honestly I'd love the option for outside the game window too but understand how that would be harder to use for most people.
HKN works that way but if I remember correctly (haven't looked at this in about a decade) there are some technical issues when that kind of panel is positioned on top of DAOC because DAOC's window is a DirectX window and outside-the-game button panels cannot be drawn on DAOC's DirectX surfaces. You said "option" and of course as an option it would be good for the user, but then I would have to do both and that's a lot more work.
alnmike wrote:
Tue Feb 25, 2020 9:37 am
Google "streamdeck".
I did but I don't understand why you want me to look at it. Isn't Streamdeck's UI an external piece of hardware? Here we're talking about a UI that Mojo draws on the user's screen.
alnmike wrote:
Tue Feb 25, 2020 9:37 am
Any way to tie into (read, not change) the existing quickbar icons...
This is easy to do because quickbars are stored in Mythic's INI files so Mojo can easily read them. However if I do that, my code would be fragile, because if Broadsword changes INI files my code might break.
alnmike wrote:
Tue Feb 25, 2020 9:37 am
and handle it the same way current dragging works?
Everything that Mojo draws is draggable.
alnmike wrote:
Tue Feb 25, 2020 9:37 am
Or copy another quickbar that you set up? Example: make quickbar 1 6 how you want mojos, log out. Then copy it in mojo, position when you log back in. Now you can change 1 6 back to whatever you want and keep mojos how it was copied. Should be quicker for you that way since everything should already be in the ini file. (though don't know how icon pictures are handled in the ini, or if it's just a lookup table that points to a lookup table that has the icons)
The pictures are no problem, but I can't remember how the action (the event that happens when you click the quickbar slot) is stored in the INI file. If that event is stored as an id number that gets sent to the server in a packet, I might have to violate the EUALA in order to implement this, and I'm reluctant to do that.
alnmike wrote:
Tue Feb 25, 2020 9:37 am
Could treat each hot key as a separate file in a folder structure. Like how current scripts can use #include.
But just name the #included files a specific way. "Hotbar1.txt" for example.
Yep, absolutely. In addition I would probably implement this in a declarative way, which is programmer jargon meaning, "The user writes a description of what the thing looks like in the script instead of telling Mojo step by step how to put the thing together." As part of that I would probably give the user the ability to name things. For example, the user could define a panel or button and give them names. Then, in other parts of the script, the user could simply refer to those names instead of retyping it. Most programming languages work this way but I didn't build it into Mojo's script language because the user is able to refer to a hotkey by its trigger. In other words, if you've defined a hotkey that gets triggered by Shift F1, you can refer to it as "Shift F1", so names weren't necessary.
Author of Mojo

alnmike
Posts: 61
Joined: Sat Sep 10, 2011 7:46 pm

Re: Buttons (quick bars)?

Post by alnmike » Tue Feb 25, 2020 3:09 pm

Only thing I meant by streamdeck was a bunch of buttons arranged. Would be awesome to have 20ish buttons just sitting in a corner of my 2nd monitor, etc.. But if hkn can already do this, would be easy to unload random stuff to hkn and just keep the playability scripts on MOJO which handles it much better.

Rob
Site Admin
Posts: 1353
Joined: Sat Sep 25, 2010 6:52 am

Re: Buttons (quick bars)?

Post by Rob » Tue Feb 25, 2020 3:45 pm

Oh I see. I'm pretty sure HKN can do this but been so long since I looked at it, I might not remember. I think buttons were the last feature I put into HKN, then I lost interest, and I never wrote instructions for that feature. But all the individual commands like "CreateButton" are documented on HKN's site. Btw I re-opened HKN's forum last night. It was closed for several years.
Author of Mojo

Rob
Site Admin
Posts: 1353
Joined: Sat Sep 25, 2010 6:52 am

Re: Buttons (quick bars)?

Post by Rob » Thu Mar 05, 2020 3:18 am

I added buttons to the program in build 291. You can drag them outside or on top of the game window. They are much easier to create and use than HKN's buttons. Whatever you want them to do, you have to describe yourself in a hotkey script. They do not know anything about INI files. I added a Tile keyword to make it easy to use DAOC's icons.

Go here for instructions.

Image

Image

Image
Author of Mojo

Koxicain
Posts: 22
Joined: Fri Feb 16, 2018 10:27 am

Re: Buttons (quick bars)?

Post by Koxicain » Mon Apr 27, 2020 8:31 am

Hey Rob,
Just noticed you've updated a lot of features to mojo and im really happy to see it.
The buttons is an amazing feature and something i will use a lot!

However a lovely feature for this bar is to be able to change the Opacity.
For instance i use a healers helper and would love to layer it over it but still be able to see
the cube.

Would also be cool to have a Left Click / Right Click action. If you right click on the icon it does another action compared to a left click.

Rob
Site Admin
Posts: 1353
Joined: Sat Sep 25, 2010 6:52 am

Re: Buttons (quick bars)?

Post by Rob » Mon Apr 27, 2020 10:41 am

Those are both great ideas. I'll think about adding them. Thanks.
Author of Mojo

Rob
Site Admin
Posts: 1353
Joined: Sat Sep 25, 2010 6:52 am

Re: Buttons (quick bars)?

Post by Rob » Tue Apr 28, 2020 11:48 am

I added alpha (opacity) in build 295 which is now on the server.

I'm holding off on right-click because I can't figure out a simple extension to the existing syntax. Also, it occurs to me that maybe I should implement not only left and right click but alt/shift/ctrl/right/left click and all 16 combinations. And maybe the buttons should change visibly when the modifier keys go up and down. I probably won't do all that, but in case I do, I want to think carefully about the syntax to make sure it's not only powerful but also simple and easy to write and understand. If you have any suggestions, let me know.

Thanks again.
Author of Mojo

Koxicain
Posts: 22
Joined: Fri Feb 16, 2018 10:27 am

Re: Buttons (quick bars)?

Post by Koxicain » Tue Apr 28, 2020 3:14 pm

Sweet!

That is actually a really good idea, gives you so many options with 1 button.
Im thinking about having it over my Cube and i could have Demezz target, Heal, Cure disease, Rez etc. Which clears up a lot of space on the QB for other stuff.

I think its a great idea.

If i come up with more i will ofc keep you posted.
Im going to test the opacity etc now :D

Koxicain
Posts: 22
Joined: Fri Feb 16, 2018 10:27 am

Re: Buttons (quick bars)?

Post by Koxicain » Tue Apr 28, 2020 3:23 pm

Could the text have its own transparancy aswell?
I would love to have text visible while bacground is transparent

Rob
Site Admin
Posts: 1353
Joined: Sat Sep 25, 2010 6:52 am

Re: Buttons (quick bars)?

Post by Rob » Tue Apr 28, 2020 4:05 pm

I think it's possible but not sure because these panels are implemented as plain old "Windows Windows" that weren't designed originally for modern graphics. I'll have to experiment to see whether it's possible.
Author of Mojo

Rob
Site Admin
Posts: 1353
Joined: Sat Sep 25, 2010 6:52 am

Re: Buttons (quick bars)?

Post by Rob » Thu Apr 30, 2020 7:21 pm

Transparent panels (only button text is visible) are implemented in build 296. Syntax:

Code: Select all

Panel
{
   ButtonLabelsOnly ( true )
   ...
}
Also, you can right click the top of a panel to toggle this on.

This may not be exactly what you asked for but it's pretty close.
Author of Mojo

Koxicain
Posts: 22
Joined: Fri Feb 16, 2018 10:27 am

Re: Buttons (quick bars)?

Post by Koxicain » Sat May 02, 2020 1:38 pm

Sweeet!
I will test it out tonight ! :D

Koxicain
Posts: 22
Joined: Fri Feb 16, 2018 10:27 am

Re: Buttons (quick bars)?

Post by Koxicain » Sat May 02, 2020 10:13 pm

Noticed 1 issue so far, but iguess its because its a window on top of DAoC.
I have my Mousebutton 4 bound to be /face and that wont work if my mouse is hovering over the panel.
It could ofc easily get fixed by adding it to a Hotkey in Mojo.

Rob
Site Admin
Posts: 1353
Joined: Sat Sep 25, 2010 6:52 am

Re: Buttons (quick bars)?

Post by Rob » Mon May 04, 2020 5:41 pm

Koxicain wrote:
Sat May 02, 2020 10:13 pm
Noticed 1 issue so far, but iguess its because its a window on top of DAoC.
I have my Mousebutton 4 bound to be /face and that wont work if my mouse is hovering over the panel.
It could ofc easily get fixed by adding it to a Hotkey in Mojo.
I managed to get this to work at least partially in today's build (298) but my mouse has only 3 buttons so my testing was limited.
Author of Mojo

Koxicain
Posts: 22
Joined: Fri Feb 16, 2018 10:27 am

Re: Buttons (quick bars)?

Post by Koxicain » Sat May 16, 2020 8:00 pm

With the new build it is now taking you out of DAoC :/
so it is not working properly anymore

Koxicain
Posts: 22
Joined: Fri Feb 16, 2018 10:27 am

Re: Buttons (quick bars)?

Post by Koxicain » Sat May 16, 2020 8:06 pm

Or maybe not seemed like it just glitched out for a run. There might be some movement keys interrupting it when clicking

Rob
Site Admin
Posts: 1353
Joined: Sat Sep 25, 2010 6:52 am

Re: Buttons (quick bars)?

Post by Rob » Sat May 16, 2020 9:43 pm

Thanks for telling me. If you can pin down what causes the problem exactly, that would help me fix it. Ideally, if you can identify a particular hotkey that makes it happen, I could probably fix it right away.
Author of Mojo

Koxicain
Posts: 22
Joined: Fri Feb 16, 2018 10:27 am

Re: Buttons (quick bars)?

Post by Koxicain » Wed May 20, 2020 6:10 am

I think it was because of a Slash command.
When i move with arrow keys / q,e etc. And spam click the window.
It only happened to me once. Could also be that i use mouseclick 4 and 5 above it.
I will keep testing and if i get some issue i will report it right away in more detail :)

Im currently experiencing an issue DAoC is not allowing me to send hotkeys through the game to OBS. I then tried to setup a passthrough hotkey in the panel but unfortunately doesnt work either.
Do you have a fix for this?

Post Reply