Thread Tools Display Modes
08-14-11, 04:52 AM   #1
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
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?
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **
  Reply With Quote
08-14-11, 05:19 AM   #2
Cripsii
A Black Drake
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 82
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
  Reply With Quote
08-14-11, 02:05 PM   #3
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
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.
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **
  Reply With Quote
08-15-11, 04:40 AM   #4
Cripsii
A Black Drake
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 82
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..)
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Support » OpenRDX: Feature Requests » Lock / Unlock Desktop Slash

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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