WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   OpenRDX: Feature Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=104)
-   -   Lock / Unlock Desktop Slash (https://www.wowinterface.com/forums/showthread.php?t=41158)

unlimit 08-14-11 04:52 AM

Lock / Unlock Desktop Slash
 
Code:

function RDXDK.ToggleDesktop()
        if InCombatLockdown() then
                RDX.printI(VFLI.i18n("Cannot lock/unlock desktop while in combat."));
                return;
        end
        if InCombatLockdown() then
                                local curdesk = RDXDK.GetCurrentDesktop();
                                if curdesk then
                                        RDXDK.ToggleDesktopTools(VFLFULLSCREEN_DIALOG, curdesk:_GetFrameProps("root"));
                                end
        end
end


-- /rdx unlock
RDXPM.RegisterSlashCommand("unlock", RDXDK.UnlockDesktop);

Would this be correct, or... what would I add into a script for a lock/unlock toggle autoexec script?

Cripsii 08-14-11 05:19 AM

hello!

What do you do?

A slash command for lock or unlock desktop?

/rdx unlock (for unlock dsk)
/rdx lock (for lock dsk)

I don't understand why you want to do this.

for the script:

Code:

function RDXDK.ToggleDesktop()
        if InCombatLockdown() then
                RDX.printI(VFLI.i18n("Cannot lock/unlock desktop while in combat."));
                return;
        end
        if not InCombatLockdown() then
                                local curdesk = RDXDK.GetCurrentDesktop();
                                if curdesk then
                                        RDXDK.ToggleDesktopTools(VFLFULLSCREEN_DIALOG, curdesk:_GetFrameProps("root"));
                                end
        end
end


-- /rdx unlock
RDXPM.RegisterSlashCommand("unlock", RDXDK.UnlockDesktop);

Explain your goal for this script and I'll showing how to :)

unlimit 08-14-11 02:05 PM

I don't like having the RDX main panel, OR the RDX classic button.

I'd rather just a way to lock / unlock with a slash command, or a button press.

We shouldn't be forced to keep a certain element of the UI in place when we don't want to, that's the goal of RDX: customization.

Cripsii 08-15-11 04:40 AM

Hello !

After some test:
put this script in autoexec script file and enable the autoexec package.

Code:

function RDXDK.ToggleDesktop()
  if InCombatLockdown() then
    RDX.printI(VFLI.i18n("Cannot lock/unlock desktop while in combat."));
    return;
  end
  if not InCombatLockdown() then
    local curdesk = RDXDK.GetCurrentDesktop();
    if curdesk then
      RDXDK.ToggleDesktopTools(VFLFULLSCREEN_DIALOG, curdesk:_GetFrameProps("root"));
    end
  end
end


-- /rdx toggle
RDXPM.RegisterSlashCommand("toggle", RDXDK.ToggleDesktop);

This code work!

just type "/rdx toggle"
if the desktop is lock, it's became unlocked and if is unlocked, it's became locked.
If you're in combat, nothing and pop the msg in info frame.

You can create a macro "/rdx toggle" if you click the macro the desktop unlock. But for locking you have ti type the macro in chat (the action bar is not usable when the desktop is unlock..)


All times are GMT -6. The time now is 07:29 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI