texture scrolling
This commit is contained in:
parent
8bbf710a5c
commit
180b51993c
1
bugs.md
1
bugs.md
|
@ -5,5 +5,6 @@
|
|||
* Implement pausing - stop updates on needed objects
|
||||
* Add GUI layering
|
||||
* Add generic signal sending from C code based on strings
|
||||
- Specifically, want to monitor for screen change
|
||||
|
||||
- Look up collision functions dynamically instead of with registry
|
||||
|
|
BIN
hexagon_pattern_gray.png
Normal file
BIN
hexagon_pattern_gray.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 211 B |
25
startmenu.js
25
startmenu.js
|
@ -1,7 +1,6 @@
|
|||
var startgame = function()
|
||||
{
|
||||
run("breakout.js");
|
||||
options.tt.stop();
|
||||
Player.players[0].uncontrol(startcontroller);
|
||||
unregister_gui(startmenu);
|
||||
};
|
||||
|
@ -29,7 +28,7 @@ var options = GUI.column({
|
|||
hovered: {},
|
||||
});
|
||||
|
||||
options.tt = Tween.start(options, 'hovered', [colorshifter, colorshiftend], {time: 0.35, loop: "restart", whole: false, ease: Ease.quint.out});
|
||||
Tween.embed(options, 'hovered', [colorshifter, colorshiftend], {time: 0.35, loop: "yoyo", whole: false, ease: Ease.sine.out});
|
||||
|
||||
var rainbowchain = [
|
||||
[255,0,0,255],
|
||||
|
@ -40,29 +39,35 @@ var rainbowchain = [
|
|||
[255,0,255,255],
|
||||
];
|
||||
|
||||
//Tween.start(options.hovered, 'color', rainbowchain, {time: 4, loop: "circle", whole: true});
|
||||
|
||||
var idx = 0;
|
||||
var item = options.items[idx];
|
||||
item.selected = true;
|
||||
|
||||
var menuopts = {
|
||||
superpos: [0,0],
|
||||
color: [],
|
||||
};
|
||||
|
||||
Tween.start(menuopts, 'superpos', [Window.dimensions.scale([0.4,0.9]), Window.dimensions.scale([0.6,0.9])], {
|
||||
var stt = Tween.embed(menuopts, 'superpos', [Window.dimensions.scale([0.4,0.9]), Window.dimensions.scale([0.6,0.9])], {
|
||||
time: 1,
|
||||
loop: "circle",
|
||||
whole: false,
|
||||
ease: Ease.cubic.inout
|
||||
});
|
||||
|
||||
function startmenu() {
|
||||
GUI.text_fn("SUPER BREAKOUT", {font_size:6, anchor: [0.5,0.5]}).draw(menuopts.superpos);
|
||||
|
||||
options.draw(Window.dimensions.scale([0.5,0.5]).add([-25,0]));
|
||||
Tween.embed(menuopts, 'color', rainbowchain, {time: 1, loop: "circle", whole: false});
|
||||
|
||||
GUI.image_fn({path:"arrow.png", anchor: [1,0.5]}).draw([item.bb.l, (item.bb.b + item.bb.t)/2].add([-3,1]));
|
||||
var background_gui = GUI.image_fn({path:"hexagon_pattern_gray.png", color: Color.blue, width: Window.width, height: Window.height, image_repeat: true});
|
||||
Tween.embed(background_gui, 'image_repeat_offset', [[0,0], [1,1]], {time: 1, loop: "repeat"});
|
||||
|
||||
function startmenu() {
|
||||
background_gui.draw([0,0]);
|
||||
stt.update_vals([Window.dimensions.scale([0.4,0.9]), Window.dimensions.scale([0.6,0.9])]);
|
||||
GUI.text_fn("SUPER BREAKOUT", {font_size:6, anchor: [0.5,0.5], color: menuopts.color}).draw(menuopts.superpos);
|
||||
|
||||
options.draw(Window.dimensions.scale([0.5,0.5]));
|
||||
|
||||
// GUI.image_fn({path:"arrow.png", anchor: [1,0.5]}).draw([item.bb.l, (item.bb.b + item.bb.t)/2].add([-3,1]));
|
||||
}
|
||||
|
||||
register_gui(startmenu);
|
||||
|
|
Loading…
Reference in a new issue