CUI Pagination

Discussion in 'Rust Development' started by Sonny-Boi, Mar 9, 2018.

  1. Hey. Anyone know the best way to setup hardcoded CUI Pagination?
     
  2. I'm not really sure you're even capable of doing this if you have to ask, but keep a page index for each player, then the items per page. Then get the next items based off an offset.
     
  3. OK, so what im trying to do is have 2 pages of avaliable options to pick off. Nothing is stored in lists, i just want people to be able to flick between the 2 pages
     
  4. Are they hard coded options or generated options via like a list or something? If they are hard coded just create two seperate pages manually. Otherwise you'd have to create something to generate where the location would be, calculate if it needs a next page and what not. Im sure you can find examples in plugins like event manager(maybe?), kits(if it has a gui), smart homes(my plugin, works sort of), etc.
     
  5. They should probably be stored in lists, that way you can use a for loop to generate them automatically, even if you don't generate the page ranges.