Skip to content

Commit

Permalink
Add title function to Env (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmavery authored Jan 19, 2019
1 parent 3bb9545 commit 4bebea8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/redsquare.re
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let squareSize = 300;

let setup = (env) => {
size(~width=600, ~height=600, env);
title("Red Square", env);
fill(Reprocessing.Constants.red, env);
(0, 0)
};
Expand Down
3 changes: 3 additions & 0 deletions src/Reprocessing_Env.re
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ let size = (~width, ~height, env: glEnv) => {
Reprocessing_Internal.resetSize(env, width, height)
};

let title = (title, env: glEnv) =>
Reasongl.Gl.Window.setWindowTitle(~window=env.window, ~title);

let resizeable = (resizeable, env: glEnv) => env.size.resizeable = resizeable;

let frameRate = (env: glEnv) => env.frame.rate;
Expand Down
2 changes: 2 additions & 0 deletions src/Reprocessing_Env.rei
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ let keyReleased:

let size: (~width: int, ~height: int, Reprocessing_Types.Types.glEnvT) => unit;

let title: (string, Reprocessing_Types.Types.glEnvT) => unit;

let resizeable: (bool, Reprocessing_Types.Types.glEnvT) => unit;

let frameRate: Reprocessing_Types.Types.glEnvT => int;
Expand Down

0 comments on commit 4bebea8

Please sign in to comment.