Beispiel #1
0
void create(object plr)
{
  if(!clonep(this_object()))
    return;
  
  if(!plr)
    destruct(this_object());  
  shadow_object(plr);
  if(!SO)
    destruct(this_object());
  long = SO->query_long();
  short = SO->query_short();
  race = SO->query_race();
  size = SO->query_stat("size");
  name = SO->query_name();
  gender = SO->query_gender();
  species = SO->query_species();
  id = SO->query_id();
}
Beispiel #2
0
global
void d3_pushbutton(int d, RECT *r, OBJC_COLOURS *col, int state, int thick, int mode)
{
	G_u selected = state&SELECTED;
	int t, j, outline;

	thick = -thick;		/* make thick same direction as d (positive value --> LARGER!) */

	if (thick > 0)		/* outside thickness */
		d += thick;
	d += 2;
	
	if (mode&1)			/* fill ? */
	{
		if (col == nil)
			f_color(screen.dial_colours.bg_col);
		/* otherwise set by set_colours() */
		gbar(d, r);						/* inside bar */
	}

	j = d;
	t = abs(thick);
	outline = j;

#if NAES3D
	if (default_options.naes and !(mode&2))
	{	
		l_color(screen.dial_colours.fg_col);
		
		while (t > 0)
		{
			gbox(j, r);					/* outside box */
			t--, j--;
		}
	
		br_hook(j, r, selected ? screen.dial_colours.lit_col : screen.dial_colours.shadow_col);
		tl_hook(j, r, selected ? screen.dial_colours.shadow_col : screen.dial_colours.lit_col);
	}
	else
#endif
	{
		do
		{
			br_hook(j, r, selected ? screen.dial_colours.lit_col : screen.dial_colours.shadow_col);
			tl_hook(j, r, selected ? screen.dial_colours.shadow_col : screen.dial_colours.lit_col);
			t--, j--;
		} while (t >= 0);
	
	    if (    thick
	        and !(mode&2)		/* full outline ? */
	       )
		{
			l_color(screen.dial_colours.fg_col);
			gbox(outline, r);					/* outside box */
		}
	}

	shadow_object(outline, state, r, screen.dial_colours.border_col, thick);

	l_color(screen.dial_colours.border_col);
}