VoiceOver (Classic)

VoiceOver (Classic)

923k Downloads

How do I access configuration GUI, if any?

tamayopa opened this issue ยท 3 comments

commented

Some documentation would be greatly appreciated. Is there a way to edit any settings of the addon, or to move the 3D model frame? For me, it appears in an awkward spot on the screen near the bottom right. If there isn't a config menu available in-game, it would be great if you could tell us how to change some settings by editing the addon files themselves. Thanks!!

commented

We have someone working on ui configuration now. Currently the UI is already draggable, its just not clear that you can and it resets on ui reload.

Click the bottom right area and hold down ( the element is there but invisible until a sound plays ) you can drag it, then release.

commented

SoundQueueUI.lua contains all the UI code. Here is a summary of what it does by chatGPT:

  1. SoundQueueUI is an object that represents the user interface for a sound queue, which is a list of sounds waiting to be played.
  2. The UI consists of a frame (a rectangular area) that shows a list of sounds in the queue, each with a button to remove it from the queue. The first sound in the queue also shows a 3D model of the NPC (non-player character) associated with that sound.
  3. The code defines a function called "new" to create a new SoundQueueUI object and set up its basic structure.
  4. The "initDisplay" function creates the frame and its components, including a scroll frame to let users scroll through the list of sounds if there are many, and a container frame to hold the buttons for each sound.
  5. The "initNPCHead" function sets up the 3D model for the NPC head, making it show a talking animation every 2 seconds when it is visible.
  6. The "createButton" function defines how to create a button for a sound in the queue, and "configureButton" sets its properties, such as the text (sound title) and icon (speaker icon). The "configureFirstButton" function has extra settings for the first button, which includes the NPC head.
  7. The "updateSoundQueueDisplay" function updates the UI to match the current sound queue. It shows a button for each sound in the queue, hides unused buttons, and updates the NPC head if needed.

This file also includes a draggable feature for the sound queue frame, which allows users to click and drag the frame to move it around on the screen. Here's an explanation of the draggable feature:

The code sets the frame to be movable and enabled for mouse interaction using these lines:

self.soundQueueFrame:SetMovable(true) -- Allow the frame to be moved
self.soundQueueFrame:EnableMouse(true) -- Allow the frame to be clicked on

A local variable named "soundQueueUI" is created to track whether the frame is being dragged:

An event handler function is registered for the "OnMouseDown" event. This function is called when the left mouse button is pressed on the frame. If the frame is not already being dragged, it starts the dragging process:

self.soundQueueFrame:SetScript("OnMouseDown", function(self, button)
    if button == "LeftButton" and not soundQueueUI.isDragging then
        self:StartMoving()
        soundQueueUI.isDragging = true
    end
end)

Another event handler function is registered for the "OnMouseUp" event. This function is called when the left mouse button is released while the cursor is on the frame. If the frame is being dragged, it stops the dragging process:

self.soundQueueFrame:SetScript("OnMouseUp", function(self, button)
    if button == "LeftButton" and soundQueueUI.isDragging then
        self:StopMovingOrSizing()
        soundQueueUI.isDragging = false
    end
end)
commented

Added in settings button