Author Topic: resizing and repositioning a crosshair  (Read 1088 times)

i'm remaking my old crosshair changing mod since the download link died, but i'm trying to add support for different sized crosshairs
what i have right now is
Quote
function Crosshair5_Switch()
{
   Crosshair.setBitmap("Add-ons/Client_CrosshairChooser/crossHair5");
   Crosshair.setExtent = "64 64";
   Crosshair.setPosition = "292 202";
}
(the numbers are adjusted for a 64x64 crosshair on an 800x600 screen)
for whatever reason, the extent and position aren't properly adjusted, so i just end up with a funny looking squished version of the crosshair
also, is there a way i can have the position set relative to the screen size, since almost no one plays in 800x600 (eg.
Quote
Crosshair.setPosition = "display.Width / 2 + 16, display.Height / 2 + 16";
or something to that effect)

Crosshair::setExtent is a function, just like Crosshair::setBitmap, so you would do something like this:
Code: [Select]
Crosshair.setExtent("64 64");

Did you manually type in those colors or what

Crosshair::setExtent is a function, just like Crosshair::setBitmap, so you would do something like this:
Code: [Select]
Crosshair.setExtent("64 64");
still no dice .-.
Quote
Add-Ons/Client_CrosshairChooser/client.cs (49): Unknown command setExtent.
  Object Crosshair(4357) Crosshair -> GuiCrossHairHud -> GuiBitmapCtrl -> GuiControl -> SimGroup -> SimSet -> SimObject
Add-Ons/Client_CrosshairChooser/client.cs (50): Unknown command setPosition.
  Object Crosshair(4357) Crosshair -> GuiCrossHairHud -> GuiBitmapCtrl -> GuiControl -> SimGroup -> SimSet -> SimObject

Did you manually type in those colors or what
maybe

Oops, sorry. Just try this then:
Code: [Select]
Crosshair.extent = "64 64";

Crosshair.resize(292, 202, 64, 64);

I would also suggest including the following:

Code: [Select]
%gui.horizSizing = "left";
%gui.vertSizing = "top";