TasQuestBox.Init() or enable autorun in the systems settings at top of code.TasQuestBox.Add(name, text, icon). Each call will add one more page, you can use this function inside the Lua root or later on. --[[ TasQuestBoxV1.3 by Tasyen
A UI to display Text to players, can use quests and search in the content. suited more for slower pace.
It shows possible pages in a list clicking anything in the list will show the text for that page.
TasQuestBox.Add(name, text, icon)
add a new entry
name is displayed in the list
text a big text when this is selected
icon is shown next to the title in the pageList, "" or nil show no icon.
TasQuestBox.Remove(obj)
remove an entry, obj can be a table, number or quest
TasQuestBox.ForceUpdate()
uses this when you are done adding data
requires
TasFrameAction
TasWindow
TasButtonList16
TasButtonList.fdf
optional Total Initialization
]]
TasQuestBox = {
AutoRun = true --(true) will create Itself at 0s, (false) you need to TasQuestBox.Init()
,Title = "TasQuestBox"
,HookQuest = true -- (true) auto add all made quests into this
,NoQuest = true -- (true) do not set text for real quests
,ReplaceQuestButton = true -- hide default questbutton and place a custom one to open this
,PosOpen = function(frame) -- where to place the open button
local questbutton = BlzGetFrameByName("UpperButtonBarQuestsButton", 0)
if TasQuestBox.ReplaceQuestButton then
BlzFrameSetAllPoints(frame, questbutton)
BlzFrameSetVisible(questbutton, false)
else
BlzFrameSetSize(frame, BlzFrameGetWidth(questbutton), BlzFrameGetHeight(questbutton))
BlzFrameSetPoint(frame, FRAMEPOINT_TOPLEFT, questbutton, FRAMEPOINT_BOTTOMLEFT, 0, 0)
end
--BlzFrameSetAbsPoint(frame, FRAMEPOINT_TOPLEFT, 0.1, 0.55)
end
,Show = false -- show with creation
,TocPath = "war3mapImported/TasQuestBox2.toc"
,ParentFunc = function() -- who is the parent of this ui
return BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)
end
,Pos = function(frame) -- where to place the ui with the list and text
--BlzFrameSetPoint(frame, FRAMEPOINT_TOPRIGHT, BlzGetFrameByName("ResourceBarSupplyText", 0), FRAMEPOINT_TOPRIGHT, 0, 0)
BlzFrameSetAbsPoint(frame, FRAMEPOINT_TOPLEFT, 0.1, 0.55)
end
,Sound = "Sound/Interface/QuestActivateWhat1.wav" -- is played when the open button is clicked make it nil to have no sound
,SizeX = 0.5 -- total size
,SizeY = 0.25
,ButtonCount = 8
,TextAreaFdf = "EscMenuTextAreaTemplate" -- frame blueprint used for the textarea it works even with "" or invalid
,BoxFdf = "EscMenuControlBackdropTemplate" -- frame blueprint for the window box, "" or nil make no box
TasQuestBox.Add(name, text, icon). Each call will add one more page, you can use this function inside the Lua root or later on. --[[ TasQuestBoxV1.3 Light by Tasyen
A UI to display Text to players, can use quests and search in the content. suited more for slower pace.
It shows possible pages in a list clicking anything in the list will show the text for that page.
TasQuestBox.Add(name, text, icon)
this.Add a new entry
name is displayed in the list
text a big text when this is selected
icon is shown next to the this.Title in the pageList, "" or nil show no icon.
TasQuestBox.Remove(obj)
remove an entry, obj can be a table, number or quest
TasQuestBox.ForceUpdate()
uses this when you are done adding data
requires
war3mapImported/TasQuestBox.toc
war3mapImported/TasQuestBox.fdf
optional Total Initialization
--]]
do
local this = {}
this.TocPath = "war3mapImported/TasQuestBox.toc"
this.AutoRun = false --(true) will create Itself at 0s, (false) you need to TasQuestBox.Init()
this.HookQuest = true -- (true) auto add all made quests into this
this.NoQuest = true -- (true) do not set text for real quests
this.ReplaceQuestButton = true -- hide default questbutton and place a custom one to open this
this.SoundFile = "Sound/Interface/QuestActivateWhat1.wav" -- is played when the open button is clicked make it nil to have no sound
this.Title = "TasQuestBox"
this.ButtonCount = 8
function this.ParentFunc() -- who is the parent of this ui
return BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)
end
function this.PosBox(frame)-- where to place this
BlzFrameSetAbsPoint(frame, FRAMEPOINT_TOPLEFT, 0.1, 0.55)
end
function this.PosOpen(frame) -- where to place the openbutton
local questbutton = BlzGetFrameByName("UpperButtonBarQuestsButton", 0)
if this.ReplaceQuestButton then
BlzFrameSetAllPoints(frame, questbutton)
BlzFrameSetVisible(questbutton, false)
else
BlzFrameSetSize(frame, BlzFrameGetWidth(questbutton), BlzFrameGetHeight(questbutton))
BlzFrameSetPoint(frame, FRAMEPOINT_TOPLEFT, questbutton, FRAMEPOINT_BOTTOMLEFT, 0, 0)
end
end
TasQuestBox_Add(string name, string text, string icon)./**
TasQuestBox V1.3 by Tasyen
A UI to display Text to players, can use quests and search in the content. suited more for slower pace.
It shows possible pages in a list clicking anything in the list will show the text for that page.
TasQuestBox_Add(string name, string text, string icon)
add a new entry
name is displayed in the list
text a big text when this is selected
icon is shown next to the title in the pageList, "" or nil show no icon.
TasQuestBox_Remove(integer index)
start with index 1
TasQuestBox_ForceUpdate()
*/
globals
// Where is the TOCFile in your map?
public string TocPath = "war3mapImported/TasQuestBox.toc"
public boolean AutoRun = true //(true) will create Itself at 0s, (false) you need to TasQuestBox_Init()
public boolean ReplaceQuestButton = true // hide default questbutton and place a custom one to open this
public string SoundFile = "Sound/Interface/QuestActivateWhat1.wav" // is played when the open button is clicked make it nil to have no sound
public sound Sound = null
public string Title = "TasQuestBox"
public integer ButtonCount = 8 //amout of buttons in one Row
...
...
//Happens once at creation, where to pos the whole ui
public function PosBox takes framehandle frame returns nothing
call BlzFrameSetAbsPoint(frame, FRAMEPOINT_TOPLEFT, 0.1, 0.55)
endfunction
//Happens once at creation, decides where Open Button is posed
public function PosOpen takes framehandle frame returns nothing
local framehandle questbutton = BlzGetFrameByName("UpperButtonBarQuestsButton", 0)
if ReplaceQuestButton then
call BlzFrameSetAllPoints(frame, questbutton)
call BlzFrameSetVisible(questbutton, false)
else
call BlzFrameSetSize(frame, BlzFrameGetWidth(questbutton), BlzFrameGetHeight(questbutton))
call BlzFrameSetPoint(frame, FRAMEPOINT_TOPLEFT, questbutton, FRAMEPOINT_BOTTOMLEFT, 0, 0)
endif
endfunction
// ParentFunc who you want as parent, this runs at InitBlizzard, if you need more control you need to modify the part that calls local function Init()
public function ParentFunc takes nothing returns framehandle
return BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)
endfunction