mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-25 08:18:43 -06:00
Compare commits
7 commits
225cecf1fa
...
672007ac7b
Author | SHA1 | Date | |
---|---|---|---|
griffi-gh | 672007ac7b | ||
griffi-gh | 9ba3b42991 | ||
griffi-gh | a1307b1abc | ||
griffi-gh | feac14c79c | ||
griffi-gh | f7f0ca4547 | ||
griffi-gh | cb22f4db59 | ||
griffi-gh | 72a12b5ad9 |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -32,7 +32,9 @@ jobs:
|
|||
- name: Build
|
||||
run: cargo build
|
||||
--release
|
||||
--package kubi
|
||||
--bin kubi
|
||||
--package kubi-server
|
||||
--bin kubi-server
|
||||
- name: Create artifact
|
||||
shell: bash
|
||||
|
|
14
README.md
14
README.md
|
@ -87,6 +87,8 @@ cargo apk run -p kubi --lib --no-default-features
|
|||
|
||||
<h2>touch controls</h2>
|
||||
|
||||
warn: multitouch got broken after switching to `android-activity`, I'm still looking for a fix.
|
||||
|
||||
<img src=".readme/touch_controls.png" alt="touch control scheme" width="300">
|
||||
|
||||
- Left side: **Movement**
|
||||
|
@ -118,4 +120,16 @@ seed = 0xfeb_face_dead_cafe # worldgen seed to use
|
|||
name = "Kubi Server" # server name
|
||||
```
|
||||
|
||||
<h2>"In-house" libraries</h2>
|
||||
|
||||
- [`kubi-ui`](kubi-ui): semi-imm.mode backend-agnostic ui system\
|
||||
mostly ready to use, it has already replaced the Kubi legacy ui
|
||||
- [`kubi-pool`](kubi-pool): very early work-in-progress work-stealing threadpool system\
|
||||
aiming to replace `rayon` threadpool that's currently used inside the kubi client (for more control over task priority)
|
||||
- [`kubi-logging`](kubi-logging) fancy-ass custom formatter for `env-logger`
|
||||
|
||||
deprecated:
|
||||
|
||||
~~`kubi-udp`~~ was a huge pita to work with and eventually got replaced by `uflow` (https://github.com/lowquark/uflow) in #5
|
||||
|
||||
<h6 align="right"><i>~ uwu</i></h6>
|
||||
|
|
|
@ -4,7 +4,7 @@ use crate::rendering::{Renderer, RenderTarget, WindowSize};
|
|||
|
||||
#[derive(Unique)]
|
||||
pub struct UiState {
|
||||
pub ui: KubiUi,
|
||||
pub kui: KubiUi,
|
||||
pub renderer: GliumUiRenderer,
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ pub fn kubi_ui_init(
|
|||
) {
|
||||
let renderer = storages.borrow::<NonSendSync<UniqueView<Renderer>>>().unwrap();
|
||||
storages.add_unique_non_send_sync(UiState {
|
||||
ui: KubiUi::new(),
|
||||
kui: KubiUi::new(),
|
||||
renderer: GliumUiRenderer::new(&renderer.display)
|
||||
});
|
||||
}
|
||||
|
@ -21,16 +21,16 @@ pub fn kubi_ui_init(
|
|||
pub fn kubi_ui_begin(
|
||||
mut ui: NonSendSync<UniqueViewMut<UiState>>
|
||||
) {
|
||||
ui.ui.begin();
|
||||
ui.kui.begin();
|
||||
}
|
||||
|
||||
pub fn kubi_ui_end(
|
||||
mut ui: NonSendSync<UniqueViewMut<UiState>>
|
||||
) {
|
||||
let ui: &mut UiState = &mut ui;
|
||||
let UiState { ui, renderer } = ui;
|
||||
ui.end();
|
||||
let (upload_needed, plan) = ui.draw_plan();
|
||||
let UiState { kui, renderer } = ui;
|
||||
kui.end();
|
||||
let (upload_needed, plan) = kui.draw_plan();
|
||||
if upload_needed {
|
||||
renderer.update(plan);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ fn render_progressbar(
|
|||
let total = world.chunks.len();
|
||||
loaded as f32 / total as f32
|
||||
};
|
||||
ui.ui.add(
|
||||
ui.kui.add(
|
||||
ProgressBar { value, ..Default::default() },
|
||||
size.0.as_vec2()
|
||||
);
|
||||
|
|
|
@ -30,7 +30,7 @@ impl Default for GameSettings {
|
|||
render_distance: match true {
|
||||
cfg!(debug_assertions) => 5,
|
||||
cfg!(target_os = "android") => 6,
|
||||
#[allow(unreachable_patterns)] _ => 8,
|
||||
#[allow(unreachable_patterns)] _ => 7,
|
||||
},
|
||||
mouse_sensitivity: 1.,
|
||||
debug_draw_current_chunk_border: false, //cfg!(not(target_os = "android")) && cfg!(debug_assertions),
|
||||
|
|
Loading…
Reference in a new issue