+++ /dev/null
-{
- "dark_background": [ 0.1, 0.1, 0.1 ],
- "background": [ 0.15, 0.15, 0.15 ],
- "foreground": [ 0.9, 0.9, 0.9 ],
-
- "keyword": [ 0.7, 0.7, 1.0 ],
- "value": [ 0.8, 1.0, 0.8 ],
- "jumppoint": [ 1, 0.5, 0.5 ],
-
- "primary": [ 0.051, 0.278, 0.631 ],
- "primary_light": [ 0.329, 0.451, 0.827 ],
- "primary_dark": [ 0, 0.129, 0.443 ],
- "primary_text": [ 1, 1, 1 ],
-
- "secondary": [ 0, 0.376, 0.392 ],
- "secondary_light": [ 0.259, 0.557, 0.573 ],
- "secondary_dark": [ 0, 0.212, 0.227 ],
- "secondary_text": [ 1, 1, 1 ]
-}
--- /dev/null
+{
+ "dark_background": [ 0.1, 0.1, 0.1 ],
+ "background": [ 0.15, 0.15, 0.15 ],
+ "foreground": [ 0.9, 0.9, 0.9 ],
+
+ "keyword": [ 0.7, 0.7, 1.0 ],
+ "value": [ 0.8, 1.0, 0.8 ],
+ "jumppoint": [ 1, 0.5, 0.5 ],
+
+ "primary": [ 0.051, 0.278, 0.631 ],
+ "primary_light": [ 0.329, 0.451, 0.827 ],
+ "primary_dark": [ 0, 0.129, 0.443 ],
+ "primary_text": [ 1, 1, 1 ],
+
+ "secondary": [ 0, 0.376, 0.392 ],
+ "secondary_light": [ 0.259, 0.557, 0.573 ],
+ "secondary_dark": [ 0, 0.212, 0.227 ],
+ "secondary_text": [ 1, 1, 1 ]
+}
--- /dev/null
+{
+ "dark_background": [ 0.8, 0.8, 0.8 ],
+ "background": [ 0.9, 0.9, 0.9 ],
+ "foreground": [ 0, 0, 0, ],
+
+ "keyword": [ 0.7, 0.7, 1.0 ],
+ "value": [ 0.8, 1.0, 0.8 ],
+ "jumppoint": [ 1, 0.5, 0.5 ],
+
+ "primary": [ 0.051, 0.278, 0.631 ],
+ "primary_light": [ 0.329, 0.451, 0.827 ],
+ "primary_dark": [ 0, 0.129, 0.443 ],
+ "primary_text": [ 0, 0, 0 ],
+
+ "secondary": [ 0, 0.376, 0.392 ],
+ "secondary_light": [ 0.259, 0.557, 0.573 ],
+ "secondary_dark": [ 0, 0.212, 0.227 ],
+ "secondary_text": [ 0, 0, 0 ]
+}
keys : Key_Handler;
+search_buffer: string.String_Buffer;
+
background_tile_texture : gfx.Texture;
main :: (args: [] cstr) {
@DynamicLoading // Currently, this file is just baked into the binary. When a mechanism
// is added to easily ask JS to make a fetch request for a file, that can be used here.
- colors_json := #file_contents "res/colors.json";
+ colors_json := #file_contents "res/colors_dark.json";
arena := alloc.arena.make(context.allocator, 4096);
defer alloc.arena.free(^arena);
}
update :: (dt: f32) {
- speed :: 200.0f;
+ speed :: 400.0f;
scale_speed :: 0.02f;
transform := gfx.global_renderer->get_transform();
window_rectangle := ui.Rectangle.{ 0, 0, ~~window_width, ~~window_height };
+ gfx.push_scissor(ui.mouse_state.x, ui.mouse_state.y, 400, 400);
+
draw_background_lines(~~window_width, ~~window_height, line_color=config.Colors.background);
random.set_seed(32185);
y := cast(f32) random.between(0, 4000);
w := cast(f32) random.between(100, 400);
h := cast(f32) random.between(100, 400);
+ gfx.rect(.{ x+2, y+2 }, .{ w, h }, color=config.Colors.primary_dark);
gfx.rect(.{ x, y }, .{ w, h }, color=config.Colors.primary);
}
+ gfx.pop_scissor();
+
gfx.push_matrix();
gfx.identity();
draw_menu_bar(window_rectangle);
ui.clear_buttons();
}
-search_buffer: string.String_Buffer;
-
#private_file
draw_menu_bar :: (window_rectangle: ui.Rectangle) {
menu_bar, _ := ui.Flow.split_horizontal(window_rectangle, top_height=32);
--- /dev/null
+
+// #private_file events :: package js_events