Thread Tools Display Modes
08/22/15, 10:53 AM   #1
Lodur
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 108
Is there a way to use inheritance to extend a ZO control?

I am specifically looking for a way to extend ZO_MenuBar.

http://esodata.uesp.net/100011/src/l...r.lua.html#548

The thing is the that the 'class' is file local:
Code:
local MenuBar = ZO_Object:Subclass()
And is created by creating from virtual:
Code:
local menuBar = CreateControlFromVirtual("testBar", GuiRoot, "ZO_MenuBarTemplate")

Unfortunately this seems to me to really hide the code to the point I can not use it as a base 'class' to a menu bar that is multi select.

Is there a known way of subclassing a type like this?

-Thanks
  Reply With Quote
08/22/15, 02:23 PM   #2
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
You can get the class from an existing object, e.g.
Lua Code:
  1. MenuBarClass = getmetatable(ZO_MainMenuCategoryBar.m_object)
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Is there a way to use inheritance to extend a ZO control?


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