title: Rewording code for better structure
body: <pre><code>program GameMain;
  uses SwinGame, sgTypes; 
  
  function buttonClicked(p1, Next_PARAM_thingie: Single; W, lastOne: Integer): Boolean; 
  var blah, blee: Single; _r_, BTMOB: Single; 
  begin blah := MouseX(); blee := MouseY(); _r_ := p1 + W; BTMOB := Next_PARAM_thingie + lastOne; result := false; 
      if MouseClicked( LeftButton ) then 
      begin 
          if (blah &gt;= p1) and (blah &lt;= _r_) then 
          begin result := true; 
          end; 
      end; 
  end;
  
  procedure Main();
  var
    clr: Color;
  begin
    OpenGraphicsWindow('Test Program for Button Click Code', 800, 600); 
    ShowSwinGameSplashScreen(); 
    clr := ColorWhite;
  
    repeat 
      clearScreen(clr); 
      drawframerate(0,0);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
      fillRectangle(ColorGrey, 50, 50, 100, 30); 
      drawtext('Click Me', ColorBlack, 'arial.ttf', 14, 55, 55);
  
      RefreshScreen(); 
      Processevents();
  
      if buttonClicked(50, 50, 100, 30) then 
      begin 
        clr := RandomRGBcolor(255);
      end;  
  until WindowCloseRequested();
  end;
  
  begin 
     main(); 
  end.
  </code></pre>
  
  <p>I have been trying to figure out what does what but it isn't going to well. I could use some help trying to figure out what each of these random words do so I can change the name so the code is more understanding</p>