Skip to content

Commit

Permalink
[Rust] Check in X-platform GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
codyd51 committed Feb 5, 2024
1 parent 2438ed0 commit 20eec6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions rust_programs/xplatform_gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ run_in_axle = []
axle_rt = {path = "../axle_rt" }
axle_rt_derive = {path = "../axle_rt_derive" }
cstr_core = "0.2.4"
# libgui = {path = "../libgui", features=["run_with_std"]}
libgui = {path = "../libgui"}
libgui = {path = "../libgui", features=["run_with_std"]}
# libgui = {path = "../libgui"}
libgui_derive = {path = "../libgui_derive"}
agx_definitions = {path = "../agx_definitions"}
10 changes: 6 additions & 4 deletions rust_programs/xplatform_gui/src/main_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use agx_definitions::{
StrokeThickness,
};
use libgui::bordered::Bordered;
use libgui::scroll_view::ScrollView;
use libgui::text_input_view::TextInputView;
use libgui::text_view::ScrollView;
use libgui::ui_elements::UIElement;
use libgui::KeyCode;
use libgui::{view::View, AwmWindow};
Expand Down Expand Up @@ -57,9 +57,11 @@ pub fn main() -> Result<(), Box<dyn error::Error>> {
)
};

let source_code_view = TextInputView::new(Size::new(16, 16), move |_v, superview_size| {
source_code_view_sizer(superview_size)
});
let source_code_view = TextInputView::new(
Some("/Users/philliptennen/Documents/develop/axle.nosync/axle-sysroot/fonts/sf_pro.ttf"),
Size::new(16, 16),
move |_v, superview_size| source_code_view_sizer(superview_size),
);
Rc::clone(&window).add_component(Rc::clone(&source_code_view) as Rc<dyn UIElement>);

let top_view = Rc::new(View::new(Color::green(), move |_v, superview_size| {
Expand Down

0 comments on commit 20eec6b

Please sign in to comment.