This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Test code to rework the file browser component. | |
NOTE: | |
- Some truct & fcts have '_LL' or '_ll' appended to differentiate them from existing ones. | |
They contain some changes to make the subwindow match the menubar style | |
- Multiple small changes to make the file browser more stylish | |
Issues in v.ui code IMO: | |
- The decoration is see subwindow.h in draw_device() is hard coded (ie gx.black) and can't be set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Interface `ui.GGApplication` | |
fn (mut app AppState) on_draw() { | |
window_size := app.gg.window_size() | |
mut cc := app.win.get_or_panic[ui.CanvasLayout](ui.component_id('canvaslayout', 'layout')) | |
sgl.viewport(cc.x, cc.y, cc.width, cc.height, true) | |
mut ctx := app.gg | |
// Draw a triangle | |
ctx.draw_triangle_filled(450, 142, 530, 280, 370, 280, gx.red) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of generics in V. | |
// Its taken from the quasi-complete code in the documentation | |
// https://github.com/vlang/v/blob/master/doc/docs.md#generics | |
// credit: [email protected] | |
module main | |
interface IData {} | |
struct User { | |
id int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ui | |
import gx | |
import ui.component as uic | |
const ( | |
win_width = 800 | |
win_height = 400 | |
win_title = 'VOGEd' | |
win_resizable = true | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* C# Thread Helper | |
* Copyright (c) 2021 Steven 'lazalong' Gay | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************** Module Header ******************************\ | |
* Module Name: NetDynamics_CS.cs | |
* Project: NetDynamics_CS | |
* Copyright (c) 2020 Steven 'lazalong' Gay | |
* | |
* C# version of https://github.com/nxrighthere/NetDynamics | |
* | |
* Data-oriented networking playground for the reliable UDP transports | |
* | |
* This source is subject to the Microsoft Public License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Basic C Memory allocator with leak reporting | |
* | |
* Copyright (c) 2020 Steven 'lazalong' Gay | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------ test.v --------------------- | |
fn main() { | |
test() | |
} | |
fn test() { | |
print_backtrace() // Note 10 frames returned by CaptureStackBackTrace in a C program | |
} | |
// ------------------- os_windows.v line 40 ----------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Simple Test Case to Send messages with ENet-Sharp & ENetStack | |
// ------------------------------------------------------------- | |
// steven 'lazalong' 2019 | |
// | |
// If all goes smoothly you should see the followign log line: | |
// [Server] LogindData= OpCode= 4 passHash= 70 username= username | |
// UnityEngine.Debug:Log(Object) | |
// You will need the dll from the reference below. | |
// Reference: |