|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
Hi guys, I am using an MTS theme engine for my thems, now all is well part from some of the images being to large as I am using a 1600 x 1200 resolution. I want to be able to accomodate for a resolution of 1024 x 768. I have managed to get the background images sorted, It just the toolbar images and the menubar image that are not working out... ImageToolbar Fill Vtec Topbar.jpg
ImageSwitchbar Fill Vtec Sidebar.jpg
ImageMirc Fill Vtec Status.jpg
ImageStatus Fill Vtec Status.jpg
Imagechan Fill Vtec Status.jpg
Imagequery Fill Vtec Status.jpg
Imagebuttons Buttons.PNG Is there any way that I could chage it so that if the resolution of 1024 x 768 is being used then it could load another image, I am using a moo.dll to state my stats: .Screen Resolution:/screenstat so for example sreen resolution is 1280 x 1024 then it will use image 1 and screen res of 1600 x 1200 will use image 2 and so on... Any help would be really great Cheers
sub-zero.homeip.net:6667
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
alias getimage {
var %res = $+($window(-1).w,x,$window(-1).h)
if (%res == 1600x1200) return <path to image for 1600x1200 resolution>
elseif (%res == 1280x1024) return <path to image for 1280x1024 resolution>
; Etc...
}
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
No where abouts should I use that code? in the mts theme itself
BASECOLORS 10,10,13,12
RGBCOLORS 255,255,255 0,0,0 0,0,128 0,144,0 255,0,0 128,0,0 160,0,160 255,128,0 91,173,246 46,150,243 117,186,249 91,173,246 7,123,228 160,208,252 128,128,128 208,208,208
COLORS 1,10,10,11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,1,0,1,0,15
ImageToolbar fill Vtec Topbar-16by12.jpg
ImageSwitchbar fill Vtec Sidebar-16by12.jpg
ImageMirc Center Vtec Logo.jpg
ImageStatus Center Vtec Logo.jpg
Imagechan Center Vtec Logo.jpg
Imagequery Center Vtec Logo.jpg
Imagebuttons Buttons.PNG
CLINEOP 4
CLINEHOP 13
CLINEVOICE 3
CLINEREGULAR 13
CLINEOWNER 13
CLINEENEMY 11
CLINEFRIEND 10
CLINEME 15
CLINECHAROWNER .
CLINECHAROP @
CLINECHARHOP %
CLINECHARVOICE +
CLINECHARREGULAR
FONTDEFAULT Tahoma,12
FONTCHAN Tahoma,12
FONTQUERY Tahoma,12
PREFIX <c4>·09 ·
PARENTEXT <c4>: [<c3> <text> <c4>]
TIMESTAMP on
TIMESTAMPFORMAT <c4>[11 HH:nn:ss <c4>]
sub-zero.homeip.net:6667
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
You have to use the !Script operation in the theme file. I can't remember exactly how to use this as it's been a while since I've used MTS. Check the latest MTS draft.
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
Where would be the place to find that?
sub-zero.homeip.net:6667
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
The original draft (a text document) is here but there's a help file documenting mts here.
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
sub-zero.homeip.net:6667
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
I can't seem to make sence of this tut Please someone help
sub-zero.homeip.net:6667
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
Ok instead of these parts: ImageToolbar fill Vtec Topbar-16by12.jpg
ImageSwitchbar fill Vtec Sidebar-16by12.jpg
ImageMirc Center Vtec Logo.jpg
ImageStatus Center Vtec Logo.jpg
Imagechan Center Vtec Logo.jpg
Imagequery Center Vtec Logo.jpg
Imagebuttons Buttons.PNG You have to use something like this: ImageToolbar !Script theme.imagetoolbar
ImageSwitchbar !Script theme.imageswitchbar Then in your [mts] section you need to type this: Script <file.mrc> <file.mrc> should be a script file in the same directory as the theme.mts file and it should contain the aliases you specified above in the ImageToolbar and ImageSwitchbar sections. These aliases are responsible for choosing and displaying the images.
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
So...
ImageToolbar !Script theme.imagetoolbar
ImageSwitchbar !Script theme.imageswitchbar
ImageMirc Center Vtec Logo.jpg
ImageStatus Center Vtec Logo.jpg
Imagechan Center Vtec Logo.jpg
Imagequery Center Vtec Logo.jpg
Imagebuttons Buttons.PNG in the .mts file. alias side {
var %res = $+($window(-1).w,x,$window(-1).h)
if (%res == 1600x1200) return Vtec Sidebar.jpg
else (%res == 1280x1024) return Vtec Sidebar12by10.jpg
elseif (%res == 1024x768) return Vtec Sidebar10by7.jpg
}
alias top {
var %res = $+($window(-1).w,x,$window(-1).h)
if (%res == 1600x1200) return Vtec Topbar.jpg
else (%res == 1280x1024) return Vtec Topbar12by10.jpg
elseif (%res == 1024x768) return Vtec Topbar10by7.jpg
} In the remotes?
sub-zero.homeip.net:6667
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
ImageToolbar !Script side
ImageSwitchbar !Script top Also, the code in the mrc file should set the image on the toolbar and switchbar (using /background), not return the path to it.
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
This is from my .mrc file...
alias blue.whoisstart {
%:echo $+ %::c4 [11 /whois $+ %::c3 %::nick $+ %::c4 $+ ] ————————————————————————————
%:echo $+ %::c4 : ›11 Address $+ %::c4 $+ : $+ %::c3 %::address
%:echo $+ %::c4 : ›11 Name $+ %::c4 $+ : $+ %::c3 %::realname
}
alias blue.whowasstart {
%:echo $+ %::c4 [11 /whowas $+ %::c3 %::nick $+ %::c4 $+ ] ————————————————————————————
%:echo $+ %::c4 : ›11 Address $+ %::c4 $+ : $+ %::c3 %::address
%:echo $+ %::c4 : ›11 Name $+ %::c4 $+ : $+ %::c3 %::realname
}
alias blue.side {
var %res = $+($window(-1).w,x,$window(-1).h)
if (%res == 1600x1200) return Vtec Sidebar.jpg
else (%res == 1280x1024) return Vtec Sidebar12by10.jpg
elseif (%res == 1024x768) return Vtec Sidebar10by7.jpg
}
alias blue.top {
var %res = $+($window(-1).w,x,$window(-1).h)
if (%res == 1600x1200) return Vtec Topbar.jpg
else (%res == 1280x1024) return Vtec Topbar12by10.jpg
elseif (%res == 1024x768) return Vtec Topbar10by7.jpg
} This is from the .mts file... [mts]
Name VTEC §cript®
Author Oxedizer
Email oxedizer@gmail.com
Website www.dameet.co.uk
Description VTEC §cript® Multiple Coloured Themes
Version 1.0
MTSVersion 1.1
VERSION 3.5
SCRIPT vtecGOLD.mrc
BASECOLORS 10,10,13,12
RGBCOLORS 255,255,255 0,0,0 0,0,128 0,144,0 255,0,0 128,0,0 160,0,160 255,128,0 91,173,246 46,150,243 117,186,249 91,173,246 7,123,228 160,208,252 128,128,128 208,208,208
COLORS 1,10,10,11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,1,0,1,0,15
ImageToolbar !Script blue.top
ImageSwitchbar !Script blue.side
ImageMirc Center Vtec Logo.jpg
ImageStatus Center Vtec Logo.jpg
Imagechan Center Vtec Logo.jpg
Imagequery Center Vtec Logo.jpg
Imagebuttons Buttons.PNG it is not loading the images... what that about Return ? All the .jpg's and .mts and .mrc files are in the same folder called /Themes/
Last edited by Skeletor; 20/02/06 12:57 AM.
sub-zero.homeip.net:6667
|
|
|
|
Joined: Dec 2002
Posts: 29
Ameglian cow
|
Ameglian cow
Joined: Dec 2002
Posts: 29 |
alias get.res { return $+($window(-1).w,x,$window(-1).h) }
alias blue.side.f {
var %res = $get.res
if (%res == 1600x1200) { return Vtec Sidebar.jpg }
elseif (%res == 1280x1024) { return Vtec Sidebar12by10.jpg }
else { return Vtec Sidebar10by7.jpg }
}
alias blue.top.f {
var %res = $get.res
if (%res == 1600x1200) { return Vtec Topbar.jpg }
elseif (%res == 1280x1024) { return Vtec Topbar12by10.jpg }
else { return Vtec Topbar10by7.jpg }
}
alias blue.top { background [color:red]-l[/color] $blue.top.f }
alias blue.side { background [color:red]-h[/color] $blue.side.f }
change these as follows: [for the sidebar if you want it filled, stretched, etc. add the letter to -h. example: -hf to make it filled] -cfnrtp = center, fill, normal, stretch, tile, photo [for the 'top' depending if it's buttons, change -l to -u] -l = toolbar -u = toolbar buttons
This will only choose between 1600x1200,1280x1024, and 1024x768. If you want it to go lower you will need to add 'elseif' statements based on the examples, and change the final 'else' statement to reflect the lowest resolution image. hope this helps, HobophobE
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
Okay I have C/P all the code above, into my .mrc file Now do i still leave the .mts as follows? ImageToolbar !Script blue.top
ImageSwitchbar !Script blue.side If so, its not loading up I don't understand his "!Script" Sorry for being a pain, its my first time with Themes
Last edited by Skeletor; 20/02/06 03:06 AM.
sub-zero.homeip.net:6667
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
Anyone know what or how the "!script" function is?
sub-zero.homeip.net:6667
|
|
|
|
Joined: Dec 2002
Posts: 29
Ameglian cow
|
Ameglian cow
Joined: Dec 2002
Posts: 29 |
I've not used this theme setup, but based on the code you showed,
ImageToolbar !Script blue.top
ImageSwitchbar !Script blue.side
I'm guessing that the !Script notes that you want the aliases above to use the other aliases. If you look at the code of one of the above aliases (ImageToolbar, ImageSwitchbar), for the !Script word, you can probably determine what it is wanting to do. If not, feel free to post the code of one of the aliases so that we can try to figure it out. HobophobE
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
My entire .mts file.... [code] [mts] Name VTEC §cript® Author Oxedizer Email oxedizer@gmail.com Website www.dameet.co.ukDescription VTEC §cript® For Resolutions of 1600x1200 Version 2.0 MTSVersion 1.1 VERSION 3.5 SCRIPT vtec LIGHT Themes.mrc [snipped]
sub-zero.homeip.net:6667
|
|
|
|
Joined: Dec 2002
Posts: 29
Ameglian cow
|
Ameglian cow
Joined: Dec 2002
Posts: 29 |
When the theme engine is going through the .mts file and sees this: instead of the regular: property filename/setting (example: ImageToolbar file.jpg
ImageToolbar !script blue.top ) It will execute the alias instead of what it normally does with the filename/setting So in this case, it normally gets file.jpg, and sends that to the /kte_setbg alias (from kte_applybg, from kte_doload) which actually does the /background command. Instead, the blue.top alias gets triggered, which would, in your case, manually do the /background command with the appropriate .jpg file. Or it should. Is it working now?
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
I have put this in my .mts file... ImageToolbar !Script blue.top
ImageSwitchbar !Script blue.side Thats instead of the... ImageToolbar <image.jpg>
ImageSwitchbar <image.jpg> I have also added this into my .mrc file alias get.res { return $+($window(-1).w,x,$window(-1).h) }
alias blue.side.f {
var %res = $get.res
if (%res == 1600x1200) { return Vtec Sidebar.jpg }
elseif (%res == 1280x1024) { return Vtec Sidebar12by10.jpg }
else { return Vtec Sidebar10by7.jpg }
}
alias blue.top.f {
var %res = $get.res
if (%res == 1600x1200) { return Vtec Topbar.jpg }
elseif (%res == 1280x1024) { return Vtec Topbar12by10.jpg }
else { return Vtec Topbar10by7.jpg }
}
alias blue.top { background -l $blue.top.f }
alias blue.side { background -h $blue.side.f } It wont load any images, regardless of any resolution that I use. What Else do I need to add to either the .mrc or .mts files to get it to load?
sub-zero.homeip.net:6667
|
|
|
|
Joined: Dec 2002
Posts: 29
Ameglian cow
|
Ameglian cow
Joined: Dec 2002
Posts: 29 |
I believe the problem is simply with the lines that say 'return [Vtec file].jpg not returning the path to the files. Since the files are in the same directory as the script, we can use $scriptdir. Below should be the right code.
alias blue.top { background -l $qt($+($scriptdir,$blue.top.f)) }
alias blue.side { background -h $qt($+($scriptdir,$blue.side.f)) }
As far as I can tell everything was fine, except that we weren't specifying the path to the files, so mIRC didn't know where to find them.
|
|
|
|
|