Quantcast Load image - LoTROInterface
VGInterface.com
Search Downloads


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

Reply
Thread Tools Display Modes
  #1  
Unread 08-30-2011, 04:49 AM
Zero Zero is offline
The Wary
 
Join Date: Aug 2011
Posts: 2
Load image

Hey guys

Ive got a problem.
I want to load and show an image on the screen
I cant use Image.load("") and i dont want to create a button
Only a image. Can someone help me?
Reply With Quote
  #2  
Unread 08-30-2011, 01:41 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 220
The image has to be either a .jpg or .tga file and must be in a folder under the Plugins folder (we can only reference paths relative to the Plugins folder). To display the image, you have a number of choices - you can display it as the background of a Window control, or any of the child controls of a Window control. You assign the image to be displayed by passing the relative path to the :SetBackground() method of the window or control. If it's a child control, depending on how you want it to interact with the other controls and it's parent you may also have to use then :SetBlendMode() method of the control. I would suggest researching the Turbine LUA API or downloading a couple of plugins and seeing how other authors have displayed images. The Turbine samples have some good basic examples of displaying images. Links to the Turbine API documentation and samples are here:
http://forums.lotro.com/showthread.p...amples-updated!
Reply With Quote
  #3  
Unread 09-01-2011, 06:10 AM
Zero Zero is offline
The Wary
 
Join Date: Aug 2011
Posts: 2
thx its work

but is there any posibility to change priority?
because my image covers the tollbar...
i hope u understand me xD
Reply With Quote
  #4  
Unread 09-02-2011, 11:01 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 220
We only have partial control of the ZOrder (the order of the layering of Windows/Controls that are displayed). You can use the :SetZOrder() method to set an order relative to other Lua windows with higher values displaying in front of lower values. However, we have somewhat limited control with how our windows order in relation to the built-in UI elements.
SetZOrder(-1) will force a Lua window to stay always behind the Turbine UI elements (similar to HWND_BOTTOM in the Windows SetWindowPos API function except the window will stay at the bottom of the ZOrder regardless of focus and you can assign lower values which are valid relative to other Lua windows).
SetZOrder(0) will display the Lua window initially in front of most UI elements but it will be subject to falling behind any UI element that gets focus - for instance, you display your window and then open the inventory, the bags will display over your window until the user clicks on your window to bring it to front. The built-in toolbar doesn't seem to behave like a standard UI element since it seems to stay behind Lua windows when SetZOrder(0) is used.
SetZOrder(1) or any higher value will force the Lua window to stay in front of all Turbine UI elements regardless of focus (similar to HWND_TOPMOST in SetWindowPos terminology except you can assign higher values which are valid relative to other Lua windows).

Basically, windows with the same ZOrder will layer based on focus within their assigned layer of ZOrder and most of the built-in UI elements are treated as ZOrder=0. So windows with ZOrder=-2 will always be behind all elements with a higher ZOrder, but within those windows, the one that gets focus will be in front of the others of the same ZOrder. Similarly windows with ZOrder=5 will be in front of all windows with ZOrder<5 but behind all windows with ZOrder>5.

Note, using SetZOrder on a control will order the control relative to other controls on the same window, but the window's ZOrder determines whether the entire window (and it's controls) is in front of or behind another window.

Also, using SetStretchMode() will allow a control to draw outside the bounds of it's parent (think Owner in Windows terms), sometimes overlaying elements that it should not - this appears to be a bug but since SetStretchMode() is an undocumented method, there has been no response from Turbine whether this is indeed a bug.

Last edited by Garan : 09-02-2011 at 11:13 PM.
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gimp image pasting Dominar Graphics modification help (L) 6 08-26-2008 01:44 PM
New UI Issue... Background Image... AncientWolf XML modification help (L) 5 06-23-2007 11:11 AM
Making a Bottom Bar image Busser Graphics modification help (L) 4 05-23-2007 02:17 AM
Image Size? Hmmm... Taffu Graphics modification help (L) 11 04-02-2007 07:09 AM
Image scaling question witnezz Graphics modification help (L) 1 02-25-2007 05:54 PM


All times are GMT -5. The time now is 03:29 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | VGInterface | LoTROInterface | MMOInterface | Swtorui