CarnVanBeck / vtt-resource-tracker

2 stars 1 forks source link

Always show text labels? #14

Closed PalasX closed 2 years ago

PalasX commented 2 years ago

LOVE the ability to show additional resources from char sheet, or show custom ones. It's the only module of its kind, and a must-have for me.

Can you add an option to ALWAYS show the text label/name of a resource, instead of only when hovering over it? Name could be placed below the box where numerical resource is tracked, or to the left of it with auto-width resource display bar?

PalasX commented 2 years ago

I slapped this together modifying the existing CSS and javascript. It uses the resource-with-icon css for ALL resources, and the input box size is dynamic based on the length of the resource text. not the prettiest hack job, but i can post it if you want? image

CarnVanBeck commented 2 years ago

Hi @PalasX, I actually like it :) I tried it myself and struggled with the css for the display.

You can create a fork of this repository, add your modifications there and then create a pull request into this one

PalasX commented 2 years ago

Right now the css and a little of the JS is hard coded for right side display. I dont know how to add setting to the foundry module setting window yet, but id like to add a "displacement" pixel count and a "width" setting before it gets a PR. Ill publish a repo of what i have this weekend though and tinker with it more before a PR. Any help with settings would be appreciated :)

On Sat, Apr 30, 2022, 5:22 AM CarnVanBeck @.***> wrote:

Hi @PalasX https://github.com/PalasX, I actually like it :) I tried it myself and struggled with the css for the display.

You can create a fork of this repository, add your modifications there and then create a pull request into this one

— Reply to this email directly, view it on GitHub https://github.com/CarnVanBeck/vtt-resource-tracker/issues/14#issuecomment-1113956310, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI3PBFW7NF3CI3VS2ESXX6TVHT3W7ANCNFSM5RZM3AHQ . You are receiving this because you were mentioned.Message ID: @.***>

CarnVanBeck commented 2 years ago

I've got the setup and config running and I've pushed it, can you try to edit the current version?

PalasX commented 2 years ago

I see we're going about this from two different directions i think? I'm using a span to show name, and not a disabled input. I'm also just setting ALL properties to use the resource-tracker-row-withIcon and resource-tracker-row-Icon css classes, instead of doing it conditionally.

i'll get mine uploaded here in a few minutes, but im running into an issue with the settings option you created: image only custom resources have the option for "always show name" toggle?

i also had to again add the hardcoded width of the resource-tracker-column setting it to 300px. can this be a global setting option as well? image

Lemme just get mine uploaded so you can see what im diong, i feel like im doing a very bad job explaining it :) In this version, i've commented out ALL the conditional showname stuff, since the option was only showing for custom resources, and not giving the option to the standard resources as well. didnt delete them, just commented out, so they can be quickly re-enabled if it becomes a global. will need to be moved around a bit, you'll see what i mean.

PR is up.