PDA

View Full Version : Custom Decal Size



Sarezar
March 6th, 2020, 14:22
Hi - Is the decal size hardcoded? Is there a way to change it?

LordEntrails
March 6th, 2020, 14:24
Hi - Is the decal size hardcoded? Is there a way to change it?
Decal size is the size of the image used as the decal. I'm pretty sure it does not scale with the window size. You can create your own decal if you would like, their is a tutorial on www.fg-con.com and I believe on the forums here as well.

Sarezar
March 6th, 2020, 14:43
Decal size is the size of the image used as the decal. I'm pretty sure it does not scale with the window size. You can create your own decal if you would like, their is a tutorial on www.fg-con.com and I believe on the forums here as well.

Hi Lord Entrails :)

Maybe I should have phrased it differently, but I meant the maximum size. At the moment, it seems to allocate a centred area of 1820x840. If the image is larger, it just gets cropped above those dimensions.
Am I able to create my own custom decal with any dimensions I want?

EDIT: It looks like the allocated area dimensions vary depending on the client's resolution. So, I guess my question is, is this a hardcoded percentage and can it be altered? Hope this makes sense. I've started reading the tutorials to see if anything is mentioned about this.

LordEntrails
March 6th, 2020, 14:55
MOD: Moved to new thread since it really wasn't related to previous post.

I don't know, does the tutorial discuss? You might have to modify the background limits somewhere.

Be aware, that the decal size will be the same for ALL players who connect to your game, so if you set the decal to be 2048x1152 and one of your players is running 1280 then the decal will not fit on their screen. You can't just optimize the decal for your screen, you have to account for all users/clients who connect to your game.

Sarezar
March 6th, 2020, 15:06
I don't know, does the tutorial discuss? You might have to modify the background limits somewhere.

Still looking



Be aware, that the decal size will be the same for ALL players who connect to your game, so if you set the decal to be 2048x1152 and one of your players is running 1280 then the decal will not fit on their screen. You can't just optimize the decal for your screen, you have to account for all users/clients who connect to your game.

It looks like it resizes it. I've set the image size to 1820x840 on my 2560x1080 monitor, and on a 1680x1050 client's monitor, the image is resized to 1470x680 without any cropping.

It also seem to work fine when I scale the UI, either from FG or from Windows.

Just need to see if I can increase this allocated area now :)

Thanks

Moon Wizard
March 6th, 2020, 18:00
You can change the size by modifying the panel asset layout information that holds the decal via an extension; though you will soon run into the situation where the decal begins sliding under/over other panels as you make it bigger. The panel is called "desktopdecalpanel" and is set to a 100 pixels in from each edge as built.

Regards,
JPG

Sarezar
March 7th, 2020, 08:14
You can change the size by modifying the panel asset layout information that holds the decal via an extension; though you will soon run into the situation where the decal begins sliding under/over other panels as you make it bigger. The panel is called "desktopdecalpanel" and is set to a 100 pixels in from each edge as built.

Regards,
JPG

Hey Moon Wizard

Thank you for pointing me to the file and panel name. I tried setting it to 1,1,-1,-1 and it hasn't changed at all. (Weirdly, setting it to 0,0,0,0 stops all decals from showing.)

Because I am a beginner in this, I need to mention a few things:
- I edited the xml file in CoreRPG cause I don't know how to do this via an extension. I know the files are replaced with each update and this isn't the ideal way of doing this but do the values need to be overridden by an extension to work? I would assume not, but thought I'd mention it just in case.
- I am using GMW Decal Maker to make the decal extension; I will post a question to the creator of this app in case it does something with these values.
- I have loaded the decal extension without any other extensions or themes loaded, so it doesn't look it's another extension that stops it from working correctly.

PS. Would I also need to edit the values of the other panels perhaps for it to work? If this is the case, I don't think I will, but at this point I'm just really eager to understand how this all works :)

Moon Wizard
March 7th, 2020, 20:10
Changing the desktopdecalpanel to 1,1,-1,-1 is exactly the way you would do it. (0,0,0,0 actually means empty. Non-negative values are treated as fixed height/width.)

However, you may not understand exactly what it is doing. The control that holds the decal does not stretch the decal at all; it only shrinks to fit. So, if the decal is smaller than the region, it will show at it's native size.

The decal is not a background tool. If you want to create an entire background replacement, that also requires an extension that replaces the frame (framedef name="desktop") with a defined graphic and 9-slice information, so that the graphic can be correctly used to fill the background. We originally looked at making custom "backgrounds" for each product; but the 9-slice requirement and overhead was a challenge, so a decal is used instead.

Regards,
JPG

Sarezar
March 8th, 2020, 23:08
Changing the desktopdecalpanel to 1,1,-1,-1 is exactly the way you would do it. (0,0,0,0 actually means empty. Non-negative values are treated as fixed height/width.)

However, you may not understand exactly what it is doing. The control that holds the decal does not stretch the decal at all; it only shrinks to fit. So, if the decal is smaller than the region, it will show at it's native size.

The decal is not a background tool. If you want to create an entire background replacement, that also requires an extension that replaces the frame (framedef name="desktop") with a defined graphic and 9-slice information, so that the graphic can be correctly used to fill the background. We originally looked at making custom "backgrounds" for each product; but the 9-slice requirement and overhead was a challenge, so a decal is used instead.

Regards,
JPG

I think I got a bit confused because my initial question was whether I can make this panel stretch outwards; make it bigger, basically.

I can't understand the criteria it uses to allocate space for this panel. If you see the examples I've attached below, the behaviour is different based on the decal's original resolution, as well as the monitor's resolution. Maybe something to do with one monitor being super-widescreen? It still doesn't explain why the panel changes size when the decal changes size in the Host example below, though.

The first number is the decal resolution; the second number if the monitor's resolution as shown for the Host and for the Client.

31988
31989
31990
31991

EDIT: Oh and, as per my original question, I assume I cannot make it fill the areas above/below where the background is currently showing? I understand that what each client sees will be different, and that the decal isn't really a background. Just to clarify whether the actual panel can be made bigger, or if it's hardcoded.

LordEntrails
March 8th, 2020, 23:31
The decal panel (window) can be made bigger (edit: right now it has a 100 pixel buffer), but if you want it to be the entire background, then you should just use the background panel and turn off the decal. But, then you will need to consider using the 9 slice method since that is what the background uses as written. And your image really isn't designed for 9 slices.

I'm not sure how you plan to have the window scale (fit?) depending upon differing resolutions. Not sure what the current graphic logic is with windows and if you would need to write a new function to get it to behave how you want (once you decide what that should be).

Sarezar
March 9th, 2020, 01:43
The decal panel (window) can be made bigger (edit: right now it has a 100 pixel buffer),
I'm not sure how it can be made bigger though. I have already reduced the pixel buffer to 1 pixel. And as you can see from the screenshots, the space around the image is not 100 pixels.


I'm not sure how you plan to have the window scale (fit?) depending upon differing resolutions. Not sure what the current graphic logic is with windows and if you would need to write a new function to get it to behave how you want (once you decide what that should be).
I am currently very happy with how it works and looks as it is. I'm just trying to understand the logic/code behind this panel's placement and "stretching" mechanics so that I can optimise it as much as I can.
If this is the best I can get, then I'm happy. Just want to make sure this is indeed the best I can get :)

damned
March 9th, 2020, 02:38
The decal is never stretched. It can shrink but it wont stretch.

Moon Wizard
March 9th, 2020, 03:57
Also, when it shrinks, it is shrunk proportionally so that the longest size is fit inside the shape of the control.
Regards,
JPG

Sarezar
March 9th, 2020, 11:43
The decal is never stretched. It can shrink but it wont stretch.


Also, when it shrinks, it is shrunk proportionally so that the longest size is fit inside the shape of the control.
Regards,
JPG

Then I don't think it is currently working as intended. I tried more combinations. As you can see from the examples below, it does stretch but either does it up/down, or left/right. It also doesn't always shrink proportionally. Either there is something else affecting this, or as I said it's not working as intended.

This is when I set my super-widescreen monitor to a normal widescreen resolution of 1920x1080:
- You can see the decal is stretching from the very top to the very bottom, going over the shortcuts panel. However, it leaves a bit of space from the left and right edges.
31999
- When I use a decal with same height but bigger length, it stretches across, starting from the left edge and then it is cropped on the right. However this time it leaves space from top and bottom.
32000

Back to the native super-widescreen resolution of 2560x1080:
- Again, the 1920x1080 decal stretches from top to bottom, covering the shortcuts panel, but not left and right.
32001
- Using the wider decal, we can see it can no longer start from the left-edge. Even though it has more space, it seems to start from a certain pixel (what defines this? do super-widescreen resolutions confuse it?) and then extend to the right for 2048 pixels (is this because it's a power of 2 or is it a coincidence?)
32002

Maybe I'm not understanding something very obvious - or very complicated - but its behaviour doesn't seem to follow everything you have mentioned so far.

damned
March 9th, 2020, 12:06
please post your extension

Sarezar
March 9th, 2020, 13:31
please post your extension

Here you go :) As I mentioned, I am using GMW Decal Maker.

damned
March 9th, 2020, 13:35
Without looking into very deeply - Im pretty sure the maximum image size used in desktop elements in 2048px...
You also dont have any changes to the desktop decal boundaries in the extension

Generally decals were intended to be used as some flavour in the middle of the desktop screen.
Most official decals are about 900x600px

Sarezar
March 10th, 2020, 14:41
Without looking into very deeply - Im pretty sure the maximum image size used in desktop elements in 2048px...
Good to know :) As long as I know what the parameters are, I can work with them. I still don't understand the way it does the 'proportional placement' (I don't know how else to call it) but I can live without knowing :D


You also dont have any changes to the desktop decal boundaries in the extension
It was mentioned in one of my earlier posts but I have updated the CoreRPG files to do that (I'm aware this isn't ideal, but it was for testing purposes)


Generally decals were intended to be used as some flavour in the middle of the desktop screen.
Most official decals are about 900x600px
Totally get it. I was just playing with the options I had at my disposal :)

Thank you very much for taking the time to address my queries.