• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Backdrop containing buttons with a scroll bar

Status
Not open for further replies.
Hello, I don't know where to post Custom UI related questions on this website, let me know if it's "inappropriate" HERE.

I've been recently trying to make some custom UI and the amount of documentation written by Tasyen is pretty heavy, I hope I can save some time by asking a question here.

Question: Is it possible to make a backdrop containing buttons with a scrollbar on the side without making a custom FDF file?

I am sure it's possible to do with a custom FDF but I am not fluent yet with FDF creation, I've been relying on libraries to make my custom UI.

My issue highlighted in red :
22-04-30-03-42-39.jpg



I just want to add a scrollbar and understand how "scrolling" works, just like it's done on the quest log :

22-04-30-03-36-53.jpg
 

Attachments

  • 22-04-30-03-39-22.jpg
    22-04-30-03-39-22.jpg
    159.1 KB · Views: 9
So after 1 week of trial, I concluded that implementing a scrollbar wasn't worth it, I originally wanted my button to be hidden once they leave the backdrop frame, but I haven't found a way to do that.

I went for another option which is making a frame for each page and clicking on a button to swap them.
22-05-08-11-22-43.gif
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Maybe you can scour his code to see how it's done.
 
In QuestLog it is done by having a fixed amount of buttons/frames onto which data is printed, the scrollbar/slider is an offset to skip lower indexes of the data. Such approach limits you to a format for the data or what is displayed and it means that you have to interpret the click onto the button with the players current offset.


Yours looks to me more like you did something different, have one unique frame for each data: It creates more frames, but hardly needs any logic to map between data & button. When scrolling you would need to repos&reshow all content that leaves/enters the frame when you scroll, which needs frame size checks for mixed frames.


The page approach is easier and less taxing just hide/show the page-Frames and done.
 
Status
Not open for further replies.
Top