+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 28

Thread: Custom crosshairs compiled

  1. #11
    Senior Member crucci is on a distinguished road
    Join Date
    Aug 2010
    Posts
    2,875
    Just finished making a new crosshair. I like it very much. The idea is to just divide the screen in four sections, hopefully making it easier for your brain to determine exactly the horizontal and vertical distances, and thus what kind of hand movement is needed to move the crosshair from A to B. The crosshair has both black and white lines so it's discernible in any lighting (thanks Essobie). I also included tick marks at quarter width and height. In the middle you can have a normal crosshair or a custom one.

    I'm not sure it will work properly with any other resolution than 1680x1050, but you can try it. The reason is that the lines are supposed to be exactly 2px wide, 1px being black, 1px white.

    Fullscreen crosshair

    full size image. (The crosshair in the middle is just a regular cg_drawcrosshair 2, with the custom horizontal and vertical lines underneath it).

    Code:
    // Crosshair
    
    menuDef {
    rect 319.3 239 1 1
    fullScreen MENU_FALSE
    visible MENU_TRUE
    
    	itemDef {
    		name "horizontal_hair_white"
    		visible 1
    		rect -320 0 650 0.45
    		border WINDOW_BORDER_HORZ
    		bordersize 0.45
    		bordercolor 1 1 1 0.075	}
    	itemDef {
    		name "horizontal_hair_black"
    		visible 1
    		rect -320 0.45 650 0.45
    		border WINDOW_BORDER_HORZ
    		bordersize 0.45
    		bordercolor 0 0 0 0.15	}
    	itemDef {
    		name "vertical_hair_white"
    		visible 1
    		rect 0 -240 0.38 490
    		border WINDOW_BORDER_VERT
    		bordersize 0.38
    		bordercolor 1 1 1 0.075	}
    	itemDef {
    		name "vertical_hair_black"
    		visible 1
    		rect 0.38 -240 0.38 490
    		border WINDOW_BORDER_VERT
    		bordersize 0.38
    		bordercolor 0 0 0 0.15	}
    	itemDef {
    		name "tick_left_white"
    		visible 1
    		rect -160 -10 0.38 20
    		border WINDOW_BORDER_VERT
    		bordersize 0.38
    		bordercolor 1 1 1 0.075	}
    	itemDef {
    		name "tick_left_black"
    		visible 1
    		rect -160.38 -10 0.38 20
    		border WINDOW_BORDER_VERT
    		bordersize 0.38
    		bordercolor 0 0 0 0.15	}
    	itemDef {
    		name "tick_right_white"
    		visible 1
    		rect 160 -10 0.38 20
    		border WINDOW_BORDER_VERT
    		bordersize 0.38
    		bordercolor 1 1 1 0.075	}
    	itemDef {
    		name "tick_right_black"
    		visible 1
    		rect 160.38 -10 0.38 20
    		border WINDOW_BORDER_VERT
    		bordersize 0.38
    		bordercolor 0 0 0 0.15	}
    	itemDef {
    		name "tick_top_white"
    		visible 1
    		rect -10 -120 20 0.45
    		border WINDOW_BORDER_HORZ
    		bordersize 0.45
    		bordercolor 1 1 1 0.075	}
    	itemDef {
    		name "tick_top_black"
    		visible 1
    		rect -10 -120.45 20 0.45
    		border WINDOW_BORDER_HORZ
    		bordersize 0.45
    		bordercolor 0 0 0 0.15	}
    	itemDef {
    		name "tick_bottom_white"
    		visible 1
    		rect -10 120 20 0.45
    		border WINDOW_BORDER_HORZ
    		bordersize 0.45
    		bordercolor 1 1 1 0.075	}
    	itemDef {
    		name "tick_bottom_black"
    		visible 1
    		rect -10 120.45 20 0.45
    		border WINDOW_BORDER_HORZ
    		bordersize 0.45
    		bordercolor 0 0 0 0.15	}
    }
    Last edited by crucci; 09-08-2010 at 06:17 PM.

  2. #12
    Senior Member Schutzengel is on a distinguished road Schutzengel's Avatar
    Join Date
    Aug 2010
    Location
    Plano, Texas
    Posts
    533
    I'm going to try that one out. What are the point of the tick marks though?

  3. #13
    Senior Member crucci is on a distinguished road
    Join Date
    Aug 2010
    Posts
    2,875
    Not really sure.

  4. #14
    Senior Member jones is on a distinguished road
    Join Date
    Aug 2010
    Posts
    127
    Recently put this together, its built for 16x10 wide-screen. This is the closest thing I could get to a solid circle dot:

    http://img340.imageshack.us/img340/5420/hhhqr.jpg

    Code:
    // by jones
    
    #include "ui/menudef.h"
    
    // crosshair
    
    menuDef {
    name "xhair"
    visible 1
    rect 319 238 640 480
    
    // border1
    
    	itemDef {
    	visible 1
    	rect 0.25 0 1.5 0.5
    	style WINDOW_STYLE_FILLED
    	backcolor 0 0 0 0.15
    	}
    
    	itemDef {
    	visible 1
    	rect 0 0.5 2 0.5
    	style WINDOW_STYLE_FILLED
    	backcolor 0 0 0 0.15
    	}
    
    	itemDef {
    	visible 1
    	rect -0.5 1 3 2
    	style WINDOW_STYLE_FILLED
    	backcolor 0 0 0 0.15
    	}
    
    	itemDef {
    	visible 1
    	rect 0 2.75 2 0.5
    	style WINDOW_STYLE_FILLED
    	backcolor 0 0 0 0.15
    	}
    
    	itemDef {
    	visible 1
    	rect 0.25 3.25 1.5 0.5
    	style WINDOW_STYLE_FILLED
    	backcolor 0 0 0 0.15
    	}
    
    // border2
    
    	itemDef {
    	visible 1
    	rect 0.25 0.5 1.5 0.5
    	style WINDOW_STYLE_FILLED
    	backcolor 0 0 0 1
    	}
    
    	itemDef {
    	visible 1
    	rect 0 1 2 2
    	style WINDOW_STYLE_FILLED
    	backcolor 0 0 0 1
    	}
    
    	itemDef {
    	visible 1
    	rect 0.25 3 1.5 0.5
    	style WINDOW_STYLE_FILLED
    	backcolor 0 0 0 1
    	}
    
    // inner
    
    	itemDef {
    	visible 1
    	rect 0.5 1 1 0.5
    	style WINDOW_STYLE_FILLED
    	backcolor 1 1 0 1
    	}
    
    	itemDef {
    	visible 1
    	rect 0.25 1.5 1.5 1
    	style WINDOW_STYLE_FILLED
    	backcolor 1 1 0 1
    	}
    
    	itemDef {
    	visible 1
    	rect 0.5 2.5 1 0.5
    	style WINDOW_STYLE_FILLED
    	backcolor 1 1 0 1
    	}
    }
    Last edited by jones; 11-06-2010 at 10:43 PM.

  5. #15
    *Skz
    Guest
    jones how do u take black out of your crosshair the borders?

  6. #16
    Senior Member crucci is on a distinguished road
    Join Date
    Aug 2010
    Posts
    2,875
    Quote Originally Posted by Skz View Post
    jones how do u take black out of your crosshair the borders?
    I assume you'd have to change the backcolor values in the section // border 2 into something else (the numbers are in order R G B A, values from 0 to 1)

  7. #17
    Senior Member jones is on a distinguished road
    Join Date
    Aug 2010
    Posts
    127
    Quote Originally Posted by Skz View Post
    jones how do u take black out of your crosshair the borders?
    uhh, use the normal dot crosshair?

  8. #18
    *Skz
    Guest
    lol i like the plus sign

  9. #19
    Member Puczman is on a distinguished road
    Join Date
    Aug 2010
    Posts
    63
    Because namad's Visual HUD is working, this thread will be very useful

    http://img827.imageshack.us/img827/7028/shot0005d.jpg

    Thanks crucci for great crosshair, this is how it looks in my HUD.

  10. #20
    *nox__
    Guest
    Quote Originally Posted by Skz View Post
    lol i like the plus sign
    Simple but great.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts