Jump to content
Sign in to follow this  
Darce

RSCShortcutButton image aspect ratio?

Recommended Posts

I am trying to use a .paa file for a control button, using the RscShortcutButton class but the file does not display as I thought it would.

issue_zpse3npnin1.jpg

I've tried changing the style but that doesn't seem to do anything. How do I force it to stretch the image to fit?

Oh yeah, I can't get the darned text to left justify either.

define for button;

class DRN_RscShortcutButton {

idc = -1;

type = 16;

style = 2;

default = 0;

bordersize = 0;

shadow = 1;

w = 0.183825;

h = 0.183225;

color[] = {.75,.75,.75,1};

colorFocused[] = {1,1,1,1};

color2[] = {.75,.75,.75,1};

colorDisabled[] = {.75,.75,.75,1};

colorBackground[] = {.75,.75,.75,1};

colorBackgroundFocused[] = {1,1,1,1};

colorBackground2[] = {.75,.75,.75,1};

animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";

animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";

animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa";

animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa";

animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa";

animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa";

textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)";

periodFocus = 1.2;

periodOver = 0.8;

class HitZone

{

left = 0.0;

top = 0.0;

right = 0.0;

bottom = 0.0;

};

class ShortcutPos

{

left = 0;

top = 0.0;

w = 1;

h = 1;

};

Edited by Darce

Share this post


Link to post
Share on other sites

add this line into the control

style=0x800;

this will force it to keep its aspect ratio

Edited by Bull_A

Share this post


Link to post
Share on other sites
add this line into the control

style=0x800;

this will force it to keep its aspect ratio

Thanks for your reply - but nope, it had no effect.

class DRN_pwr: DRN_RscShortcutButton
{
idc = 1700;
style=0x800;
x = 0.354501 * safezoneW + safezoneX;
y = 0.654 * safezoneH + safezoneY;
w = 0.040098 * safezoneW;
h = 0.044 * safezoneH;
animTextureDefault = "pwr.paa";
animTextureNormal = "pwr.paa";
animTextureDisabled = "pwr.paa";
animTextureOver = "pwr.paa";
animTextureFocused = "pwr.paa";
animTexturePressed = "pwr.paa";
tooltip = "Close dialog"; //--- ToDo: Localize;
};

Appreciate the thought though.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×