Skip to content

Commit d810415

Browse files
committed
Merge pull request #149 from pebble/feature/update-ui-editor-for-sdk3
Update UI Editor for SDK3
2 parents aa3827c + 2e7a17a commit d810415

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ide/static/ide/js/editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ CloudPebble.Editor = (function() {
851851
});
852852
create_remote_file({
853853
name: name + ".c",
854-
content: "#include \"" + name + ".h\"\n#include <pebble.h>\n\n" +
854+
content: "#include <pebble.h>\n#include \"" + name + ".h\"\n\n" +
855855
"// BEGIN AUTO-GENERATED UI CODE; DO NOT MODIFY\n" +
856856
"static void destroy_ui(void) {}\n" +
857857
"static void initialise_ui(void) {}\n" +

ide/static/ide/js/ib/canvas.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// Window properties
3030
var mProperties = {
3131
bg: new IB.Properties.Colour(pgettext("background colour", "Background"), IB.ColourWhite),
32-
fullscreen: new IB.Properties.Bool(gettext("Fullscreen"), CloudPebble.ProjectInfo.app_is_watchface)
32+
fullscreen: new IB.Properties.Bool(gettext("Fullscreen"), CloudPebble.ProjectInfo.app_is_watchface || CloudPebble.ProjectInfo.sdk_version == '3')
3333
};
3434
mProperties.bg.on('change', handleBackgroundChange, this);
3535
mProperties.fullscreen.on('change', handleFullscreenChange, this);
@@ -349,7 +349,9 @@
349349
if(mProperties.bg.getValue() != IB.ColourWhite) {
350350
initialiser.push("window_set_background_color(s_window, " + mProperties.bg.getValue() + ");");
351351
}
352-
initialiser.push("window_set_fullscreen(s_window, " + mProperties.fullscreen.getValue() + ");");
352+
initialiser.push("#ifndef PBL_SDK_3");
353+
initialiser.push(" window_set_fullscreen(s_window, " + mProperties.fullscreen.getValue() + ");");
354+
initialiser.push("#endif");
353355
return initialiser;
354356
};
355357

0 commit comments

Comments
 (0)