lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Lua Programming Help (L)

Reply
Thread Tools Display Modes
  #1  
Unread 09-14-2010, 09:55 PM
Dworgdir Dworgdir is offline
The Undefeated
 
Join Date: Sep 2010
Posts: 5
ItemControl:SetOpacity bugged?

First of all, sorry for my poor english...

Well... im working on a addon that when something happens i got to fade a ItemControl component... but looks like it doesnt work at all.


When i try to execute:

local backpack = Turbine.Gameplay.LocalPlayer():GetBackpack();
local myItem = Turbine.UI.Lotro.ItemControl(backpack:GetItem(1));
myItem:SetOpacity(0);

And i add myItem to the screen.. the opacity is always 1. If i do myItem:SetVisible(false) it doesnt appear... so looks like the opacity is bugged...

Any info on this situation?
Reply With Quote
  #2  
Unread 09-15-2010, 12:21 AM
ForsakenArcher ForsakenArcher is offline
The Wary
 
Join Date: Sep 2010
Posts: 3
You need to parent the item control to a window.

window = Turbine.UI.Lotro.Window();
window:SetPosition( 200, 200 );
window:SetSize( 200, 200 );
window:SetText( "Test Window" );
window:SetVisible( true );

local player = Turbine.Gameplay.LocalPlayer();
local backpack = player:GetBackpack();
local item = backpack:GetItem( 1 );

itemControl = Turbine.UI.Lotro.ItemControl();
itemControl:SetParent( window );
itemControl:SetPosition( 50, 50 );
itemControl:SetItem( item );
Reply With Quote
  #3  
Unread 09-15-2010, 06:41 AM
Dworgdir Dworgdir is offline
The Undefeated
 
Join Date: Sep 2010
Posts: 5
Thanks for the answer. I'll try as soon as i can.

Im working on a bag addon, and this is the only thing i didnt manage to do. A important part of the bag is the possibility of searching a item on it. When the searched item is found i trying to set the Opacity of all ItemControls to 0.5 and the search results ones with 1.0 to highlight them.

My ItemControl component is on a ListBox, and this ListBox is on a Window, with their parents set as follow:

ItemControl --> ListBox
ListBox --> Window

When i put the opacity on the window it works... but i need only to set the opacity to the ItemControl and not all the window. Its strange cause i can set all the properties on the ItemControl but the Opacity doesnt work at all. I think the "Item" icon is put on top of ItemControl so im just setting the Opacity on the ItemControl and not on the Item icon itself...

I mean, if i put a background color on ItemControl it just colorizes the back and not the icon (its correct, of course)... im just starting to think this is the case with opacity...

Ill keep your guys updated on any news on this issue;

Thanks!
Reply With Quote
  #4  
Unread 09-15-2010, 06:45 PM
Dworgdir Dworgdir is offline
The Undefeated
 
Join Date: Sep 2010
Posts: 5
Well,

The code you provided ForsakenArcher keeps the same situation. The item icon RECEIVE the Opacity value but doesnt SHOW it.

Anyone got any advice on this?

Thanks!
Reply With Quote
  #5  
Unread 09-16-2010, 10:31 PM
ForsakenArcher ForsakenArcher is offline
The Wary
 
Join Date: Sep 2010
Posts: 3
2nd note: SetOpacity only works on Top Level elements. This means Window, GoldWindow, and for underlying reasons I cannot get into QuickslotDisplay.
Reply With Quote
  #6  
Unread 09-17-2010, 08:27 AM
Dworgdir Dworgdir is offline
The Undefeated
 
Join Date: Sep 2010
Posts: 5
This limitation is intended or its just not implemented on the current version of LOTRO?

I managed to do a workaround because of this limitation, but i'll really love to see the opacity on visible components implemented on future.


I think my addon is almost ready to be uploaded. Its a inventory addon, with counters, search function and the possibility of division. I mean: you can create a new bag for ingots, so when you press your inventory key the ingots you have on the inventory all appear on your ingot bag! You configure anything to be put on the bag, almost like ArkInventory (WoW Addon) but less flexible.

Im playing with it on for 2-3 days, and looks almost stable. Well, ill keep your guys updated. I started with TheOneBag as base, and now i think the code is nearly unrecognizable

I work as a Usability Engineer, so i enjoy a lot playing with ui

Ah, ForsakenArcher: your guys did a great job implementing Lua on LOTRO. Im eager to see what kinds of plugins the community will create on the near future.
Reply With Quote
Reply



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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
contents of listboxes, bugged? Mirarkitty General Authoring Discussion (L) 0 02-13-2010 12:38 PM
eorlingas bugged? mavhendricks Interface Help (L) 0 07-08-2008 01:08 PM


All times are GMT -5. The time now is 03:34 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui