Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions application.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@

<haxelib name="haxeui-core" />
<haxelib name="haxeui-openfl" />

<define name="haxeui_allow_drag_any_component"/>
</project>
2 changes: 1 addition & 1 deletion src/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import custom.Preloader;

class Main {
public static function main() {
#if js
#if haxeui_html5
new haxe.ui.editors.code.monaco.MonacoLoader().register(null);
#end
//var dark = Browser.window.matchMedia('(prefers-color-scheme: dark)').matches;
Expand Down
6 changes: 5 additions & 1 deletion src/custom/IFrame.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package custom;

#if haxeui_html5

import haxe.ui.backend.html5.HtmlUtils;
import haxe.ui.containers.Box;
import js.Browser;
Expand Down Expand Up @@ -46,4 +48,6 @@ class IFrame extends Box {

return b;
}
}
}

#end
1 change: 1 addition & 0 deletions src/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<components>
<component package="custom" />
<exclude pattern="src/custom/IFrame.hx" unless="haxeui_html5" />
</components>

<scriptlets>
Expand Down
6 changes: 5 additions & 1 deletion src/views/CustomComponentView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class CustomComponentView extends View {
}
}

#if haxeui_html5

@:xml('
<dialog title="Custom Component In Dialog" width="600" height="600" styleName="no-padding">
<iframe url="http://haxeui.org" width="100%" height="100%" />
Expand All @@ -19,4 +21,6 @@ class CustomComponentDialog extends Dialog {
modal = false;
buttons = DialogButton.CLOSE;
}
}
}

#end
2 changes: 2 additions & 0 deletions src/views/MainView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ class MainView extends HBox {
ViewManager.instance.registerView({ group: "Miscellaneous", subGroup:"Animation", title: "Animated Highlight", smallIcon: "icons/svg/animation.svg", largeIcon: "icons/svg/animation.svg", viewClass: AnimatedHighlightView, relevantFiles: ["views/animated-highlight.xml"] });
ViewManager.instance.registerView({ group: "Miscellaneous", subGroup:"Animation", title: "Animated Dots", smallIcon: "icons/svg/animation.svg", largeIcon: "icons/svg/animation.svg", viewClass: AnimatedDotsView, relevantFiles: ["views/animated-dots.xml", "src/views/AnimatedDotsView.hx"] });
ViewManager.instance.registerView({ group: "Miscellaneous", title: "Validators", smallIcon: "icons/svg/validators.svg", largeIcon: "icons/svg/validators.svg", viewClass: ValidatorsView, relevantFiles: ["views/validators.xml", "src/views/ValidatorsView.hx"] });
#if haxeui_html5
ViewManager.instance.registerView({ group: "Miscellaneous", title: "Custom Component", smallIcon: "icons/svg/scrollviews.svg", largeIcon: "icons/svg/scrollviews.svg", viewClass: CustomComponentView, relevantFiles: ["views/custom-component.xml", "src/views/CustomComponentView.hx", "src/custom/IFrame.hx"] });
#end
ViewManager.instance.registerView({ group: "Miscellaneous", title: "App Icon", smallIcon: "icons/svg/app-icon.svg", largeIcon: "icons/svg/app-icon.svg", viewClass: AppIconView, relevantFiles: ["views/app-icon.xml", "src/views/AppIconView.hx"] });
ViewManager.instance.registerView({ group: "Miscellaneous", title: "Notifications", smallIcon: "icons/svg/notifications.svg", largeIcon: "icons/svg/notifications.svg", viewClass: NotificationsView, relevantFiles: ["views/notifications.xml", "src/views/NotificationsView.hx"] });
ViewManager.instance.registerView({ group: "Miscellaneous", subGroup: "Notifications", title: "Actions", smallIcon: "icons/svg/notifications.svg", largeIcon: "icons/svg/notifications.svg", viewClass: NotificationActionEventsView, relevantFiles: ["views/notification-action-events.xml", "src/views/NotificationActionEventsView.hx"] });
Expand Down
2 changes: 1 addition & 1 deletion src/views/ViewManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class ViewManager {
viewContainer.percentHeight = 100;

if (ext == "hx" || ext == "xml" || ext == "css" || ext == "properties") {
#if js
#if haxeui_html5
var editor = new haxe.ui.editors.code.CodeEditor();
editor.percentWidth = 100;
editor.percentHeight = 100;
Expand Down