blend
This commit is contained in:
parent
791d49aad9
commit
b938e220d4
21
src/main.zig
21
src/main.zig
@ -144,12 +144,9 @@ fn rectangle(x : u16,y : u16,width : u16,height : u16) rl.Rectangle
|
||||
|
||||
pub fn main() anyerror!void {
|
||||
|
||||
const rect2 = rectangle(10,10,300,100);
|
||||
const rect3 = rectangle(10,150,600,10);
|
||||
const rect4 = rectangle(10,170,600,10);
|
||||
const rect5 = rectangle(10,190,600,10);
|
||||
var msg_res : i32=-1;
|
||||
var state : i32=-1;
|
||||
|
||||
var seed:u64 = undefined;
|
||||
try std.posix.getrandom(std.mem.asBytes(&seed));
|
||||
@ -194,22 +191,6 @@ pub fn main() anyerror!void {
|
||||
.a = 255,
|
||||
});
|
||||
|
||||
if(state != 0){
|
||||
msg_res = rg.guiMessageBox(rect2, "Title", "question?", "Nice;Cool");
|
||||
if(msg_res > -1){
|
||||
state = msg_res;
|
||||
}
|
||||
rl.clearBackground(rl.Color.white);
|
||||
switch(state){
|
||||
1 => {
|
||||
rl.drawText("1", 190, 200, 20, rl.Color.red);
|
||||
},
|
||||
2 => {
|
||||
rl.drawText("2", 190, 200, 20, rl.Color.red);
|
||||
},
|
||||
else =>{},
|
||||
}
|
||||
}
|
||||
_ = rg.guiSlider(rect3,"0","500",&value,ItoF(0),ItoF(500));
|
||||
_ = rg.guiSlider(rect4,"-3","3",&value2,ItoF(-3),ItoF(3));
|
||||
_ = rg.guiSlider(rect5,"-3","3",&value3,ItoF(-3),ItoF(3));
|
||||
@ -219,7 +200,9 @@ pub fn main() anyerror!void {
|
||||
emitter.emit(@as(u32,@intFromFloat(value)),value2,value3);
|
||||
}
|
||||
|
||||
rl.beginBlendMode(rl.BlendMode.blend_additive);
|
||||
emitter.update(texture);
|
||||
rl.endBlendMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user