ID:2065333
Apr 5 2016, 7:37 pm
|
|
How do you I customize the grid of where my skill list appears so I can fit more skills. Right now there is a single column of skills. I would like several rows or the ability to customize the grid in-game.
|
I am still getting one column. What am I doing wrong? I would prefer auto-fitting skills if possible.
var/grid_item = 0 |
First off, you should have only one if(client) and put all your code under that; you don't need to keep checking it because client will not become null after a winset(). (A winget(), or anything else that requires an interactive response, is different.)
If you're only getting one column from that code, it's because your cells are too wide to fit two columns in the grid. If you want to force multiple columns, then is-list is out of the question and you'll need to output to a specific row and column. |
Why am I not getting two columns. If it is because my cells are too wide how would I make them smaller?
var/list/mylist = new/list |
You're only outputting to one column. If you want the skills in two columns, obviously some of them have to be in column 1, and some in column 2, and you only need mylist.len/2 (rounded up) for the number of rows.
|
UpdateBagTehniques() Here is the example of how I did it for tech display. winset(src, "Items", "cells=2x[techniques.len]") This is what you need cell =2 x techniques.len. So all we are doing is adding column x techniques.len or whatever you will use in your case Also what you did was good but instead of displaying 2 column you displaied only one like Lummox said. |
Does anyone know how I can decrease the size of my cells so that the things I am outputting will be auto fitted automatically into rows?
|
I don`t quite get what do you want to achive. Be more specific about it :P I allready show you the example and Lummox JR did a great job explaining it to you
|
All I want to do is be able to output all the grid items to one column and have them automatically get arranged into rows using "is-list" or any other method.
Lummox stated that the reason my previous snippet was only getting one column is because my cells were too wide, and I would not be able to autofit. How do I decrease the size of my cells or make it so that the items are autofitted into the grid. |
I dont know if it will helps you but one method im using to set the size of it is to add this into grid style : IMG.icon{width:64;height:64}.
http://prntscr.com/aplabl |
The other option is to choose exactly how many columns you want, and write your output so that it puts each skill in the correct row and column.