Thread Tools Display Modes
06/02/21, 07:34 AM   #1
pithka
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 5
Filtering Achievements Page

I'm working on an achievement tracker and I'd like to add a feature that opens the journal to show ONLY a single achievement.

My current implementation is not quite what I want. I am using ShowAchievement() (shown below) to open the journal to the right place, but the scroll position is somewhat random so the achievement might be anywhere in the full pane and can still be hard to find.
Code:
control:SetHandler("OnMouseUp", function (control, mButton)
      SCENE_MANAGER:ShowBaseScene()
      ACHIEVEMENTS:ShowAchievement(aid)
    end)
What I would prefer to do is to update the achievement search bar with the name of the achievement so that it's the only result shown. I've been having trouble figuring out how to do this. Any thoughts?

Thanks,
@Pithka
  Reply With Quote
06/19/21, 12:29 PM   #2
pithka
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 5
--ping--

just wondering if anyone has worked through this before.
  Reply With Quote
06/19/21, 02:46 PM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
You need to find out which scene is used as the achievements are shown.
Use a tool like merTorchbug or zgoo and inspect SCENE_MANAGER -> currentScene as you are at the achievements.
Find out how to call that scene to show the attached fragemnts and controls.
e.g. this shows the set collections:

Code:
 MAIN_MENU_KEYBOARD:ToggleSceneGroup("collectionsSceneGroup", "itemSetsBook")
Maybe there is something simialr for the achievements.
I think it is defined as "achievements" here:
https://github.com/esoui/esoui/blob/...ments.lua#L972
Could work to show it via SCENE_MANAGER:Show("achievements")

Edit:
Here you see what I mind with the game menu:
https://github.com/esoui/esoui/blob/...ents.lua#L1345
This should be your code that you want to use. Checks if the achievement scene is not shown and then queues and shows it.

And for the searchbox you need to find the control for it via moving the mouse above it and use /tbugm or /zgoo mouse.
You can then searhc it within the achievmetns code.

But I think this already looks promising:
https://github.com/esoui/esoui/blob/...ments.lua#L984

Within the init of the Achievements there is ACHIEVEMENTS_MANAGER:SetSearchString(self.contentSearchEditBox:GetText())
selfshluld be ACHIEVEMENTS so ACHIEVEMENTS .contentSearchEditBox shuld be the search edit box where you need to set the text vis :SetText()
And this would then call the attached "changed" handler function, or you manually need to call ACHIEVEMENTS_MANAGER:SetSearchString(self.contentSearchEditBox:GetText()) as well.

Last edited by Baertram : 06/19/21 at 02:51 PM.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Filtering Achievements Page

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