haxeui / haxeui-heaps Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Once application launches click the "Click Me!" button top left. If you put this on html target it works. if you HL target you get the below error. Sometimes it works the first click but never on second click
The validation queue returned too many times during validation. This may be an infinite loop. Try to avoid doing anything that calls invalidate() during validation.
Called from haxe.ui.core.ComponentValidation.invalidateComponent (haxe/ui/core/ComponentValidation.hx line 96)
Called from haxe.ui.core.TextInput.invalidateComponent (haxe/ui/core/TextInput.hx line 290)
Called from haxe.ui.core.TextInput.set_width (haxe/ui/core/TextInput.hx line 144)
Called from haxe.ui.components._TextArea.TextAreaLayout.resizeChildren (haxe/ui/components/TextArea.hx line 110)
Called from haxe.ui.layouts.Layout.refresh (haxe/ui/layouts/Layout.hx line 35)
Called from haxe.ui.core.Component.validateComponentLayout (haxe/ui/core/Component.hx line 1327)
Called from haxe.ui.core.ComponentValidation.validateComponentInternal (haxe/ui/core/ComponentValidation.hx line 258)
Called from haxe.ui.components.TextArea.validateComponentInternal (haxe/ui/components/TextArea.hx line 54)
Called from haxe.ui.core.ComponentValidation.validateComponent (haxe/ui/core/ComponentValidation.hx line 176)
Called from haxe.ui.validation.ValidationManager.process (haxe/ui/validation/ValidationManager.hx line 125)
Called from haxe.ui.util.$Timer.~delay.1 (haxe/ui/util/Timer.hx line 10)
Called from haxe.ui.backend.$TimerImpl.update (haxe/ui/backend/TimerImpl.hx line 12)
Called from haxe.ui.backend.$BackendImpl.update (haxe/ui/backend/BackendImpl.hx line 7)
Called from haxe.ui.backend.AppImpl.onHeapsUpdate (haxe/ui/backend/AppImpl.hx line 40)
Called from haxe.ui.backend._AppImpl.HeapsApp.update (haxe/ui/backend/AppImpl.hx line 16)
Called from hxd.App.mainLoop (hxd/App.hx line 187)
Called from hxd.$System.mainLoop (hxd/System.hl.hx line 70)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 135)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 132)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 143)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from haxe.$MainLoop.tick (C:\SDKs\Haxe\haxe\std/haxe/MainLoop.hx line 174)
Called from haxe.$EntryPoint.processEvents (C:\SDKs\Haxe\haxe\std/haxe/EntryPoint.hx line 99)
Called from haxe.$EntryPoint.run (C:\SDKs\Haxe\haxe\std/haxe/EntryPoint.hx line 125)
Click the top left "Click Me!" And get error
42.5> src/HLAdapter.hx:587: Failed to read @0x0:4
42.5> src/HLAdapter.hx:607: Failed to read @0x0:4
Can't cast i32 to enum<haxe.ui.styles.Value>
Called from haxe.ui.styles.animation.util.Actuator._initialize (haxe/ui/styles/animation/util/Actuator.hx line 158)
haxe/ui/styles/animation/util/Actuator.hx:158
Called from haxe.ui.styles.animation.util.Actuator.run (haxe/ui/styles/animation/util/Actuator.hx line 81)
haxe/ui/styles/animation/util/Actuator.hx:81
Called from haxe.ui.styles.animation.util.$Actuator.tween (haxe/ui/styles/animation/util/Actuator.hx line 24)
haxe/ui/styles/animation/util/Actuator.hx:24
Called from Main.reducExpandWidth (Main.hx line 120)
...
lineBreak: Bool
doesn't seem to be a part of Heaps' api any longer, which causes problems trying to build anything with HaxeUI.
The project should just build so it can be run. It's a generated "Hello World" project from the tutorial/example.
Basically anything referring to "lineBreak" in HaxeUI+Heaps needs to be removed or corrected.
Toolkit.init();
early also doesn't seem to change anything.I tried commenting out all those lines referencing lineBreak, which allowed it to build but the app's behaviour seems to suffer, as in the buttons do nothing when clicked, no button-down state when clicking and no messages related to the button show up in the app or terminal to reflect the example code. Also the Vbox doesn't seem to do anything either. Even with that, going a step further and trying to build an executable binary simply gives an error and fails.
Only solution I can think of with my limited knowledge is updating the HaxeUI-Heaps backend to be compatible with the current Heaps-stable (non-git repo package) API and possibly rechecking the C -> exec-binary compilation issues if necessary.
haxelib run haxeui-core create heaps
to create the project. haxe heaps-hl.hxml
I'm currently trying to learn game dev as well as tool and general app development. And since Haxe+Heaps+hashlink are so versatile in what platforms they can target and languages Haxe can interop with, I figured it'd be the ideal way to learn and practice of both, since Heaps' default UI system is really "extra" (IMsO) with the whole CSS aspect of it since most other UI solutions don't really need that, or rather, I'm simply not a fan of CSS since I never had any reason or will to go into webdev related things. Hence why something like HaxeUI+Heaps is somewhat crucial/preferred since it would technically solves the "write once run everywhere" issue if I ever become more proficient in the language and besides general app development it gives me the ability to mess with 2D and 3D graphics and audio from the get-go without having to pull in and hack solutions together from other backends/libraries or trying to figure out how building that kind of stuff almost from scratch with Kha
. Other languages like python would force potential clients to install the interpreter or be an over bloated executable while not making it easy to port the same code to the web and constantly suffers from breaking changes due to updates to the language, same mostly goes for JVM languages and their build tools that seem to fail on the regular. Lost track of how many FOSS java projects I've tried that simply refused to build.
Apologies for my lack of knowledge/experience with this stuff. I legit made a github account just to see if posting this issue would help things along.
Index color png causes crash in Dark theme. Looks to be caused by
sizer_gripper_horizontal.png, sizer_gripper_vertical.png, down_arrow_square.png, down_arrow_square.png uses index color (unsupported)
probably more of an issue on heaps than HaxeUI.
Unsupported png format 1()
Called from hxd.res.Image.getInfo (hxd/res/Image.hx line 114)
Called from haxe.ui.backend.AssetsImpl.imageFromBytes (haxe/ui/backend/AssetsImpl.hx line 56)
Called from haxe.ui.backend.AssetsImpl.getImageFromHaxeResource (haxe/ui/backend/AssetsImpl.hx line 42)
Called from haxe.ui.ToolkitAssets.~getImage.2 (haxe/ui/ToolkitAssets.hx line 92)
Called from haxe.ui.backend.AssetsImpl.getImageInternal (haxe/ui/backend/AssetsImpl.hx line 36)
Called from haxe.ui.ToolkitAssets.getImage (haxe/ui/ToolkitAssets.hx line 86)
Called from haxe.ui.util.ImageLoader.load (haxe/ui/util/ImageLoader.hx line 23)
Called from haxe.ui.components._Image.ResourceBehaviour.validateData (haxe/ui/components/Image.hx line 176)
Called from haxe.ui.behaviours.DataBehaviour.validate (haxe/ui/behaviours/DataBehaviour.hx line 21)
Called from haxe.ui.behaviours.Behaviours.validateData (haxe/ui/behaviours/Behaviours.hx line 90)
Called from haxe.ui.core.ComponentValidation.validateComponentData (haxe/ui/core/ComponentValidation.hx line 273)
Called from haxe.ui.core.ComponentValidation.validateComponentInternal (haxe/ui/core/ComponentValidation.hx line 232)
Called from haxe.ui.core.ComponentValidation.validateComponent (haxe/ui/core/ComponentValidation.hx line 171)
Called from haxe.ui.validation.ValidationManager.process (haxe/ui/validation/ValidationManager.hx line 128)
Called from haxe.ui.util.$Timer.~delay.1 (haxe/ui/util/Timer.hx line 10)
Called from haxe.ui.backend.$TimerImpl.update (haxe/ui/backend/TimerImpl.hx line 13)
Called from haxe.ui.backend.$BackendImpl.update (haxe/ui/backend/BackendImpl.hx line 7)
Called from haxe.ui.backend.AppImpl.onHeapsUpdate (haxe/ui/backend/AppImpl.hx line 47)
Called from haxe.ui.backend._AppImpl.HeapsApp.update (haxe/ui/backend/AppImpl.hx line 18)
Called from hxd.App.mainLoop (hxd/App.hx line 187)
Called from hxd.App.~setup.2 (hxd/App.hx line 144)
Called from hxd.App.loadAssets (hxd/App.hx line 170)
Called from hxd.App.setup (hxd/App.hx line 140)
Called from h3d.Engine.onCreate (h3d/Engine.hx line 247)
Called from h3d.impl.GlDriver.~init.0 (h3d/impl/GlDriver.hx line 1645)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 144)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from sys.thread.EventLoop.progress (C:\SDKs\Haxe\haxe\std/sys/thread/EventLoop.hx line 114)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 152)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 142)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 144)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from sys.thread.EventLoop.loop (C:\SDKs\Haxe\haxe\std/sys/thread/EventLoop.hx line 150)
Called from sys.thread._Thread.$Thread_Impl_.processEvents (C:\SDKs\Haxe\haxe\std/hl/_std/sys/thread/Thread.hx line 62)
Attached rgb converted found here haxe\ui_module\styles\default
Attached rgb converted found here haxe\ui_module\styles\dark
Using this sample
https://github.com/haxeui/component-examples/tree/master/textinput
http://188.166.108.195/heaps/ - build
Cannot type text
Took latest git of heaps, haxeui-code and haxeui-heaps
Build script:
-cp src
-main Main
-lib haxeui-core
-lib haxeui-heaps
-lib heaps
-js build/html5/Main.js
With kenney theme, make a message box:
Toolkit.messageBox('Test Message Box');
Then hover on the "OK" button:
../haxeui-heaps/haxe/ui/backend/AssetsImpl.hx:35: All tiles must be of the same texture
All tiles must be of the same texture
stack
Called from haxe.$NativeStackTrace.callStack (/Users/kevin/haxe/versions/4.1.1/std/hl/_std/haxe/NativeStackTrace.hx line 25)
Called from haxe._CallStack.$CallStack_Impl_.callStack (/Users/kevin/haxe/versions/4.1.1/std/haxe/CallStack.hx line 52)
Called from haxe._CallStack.$CallStack_Impl_.exceptionStack (/Users/kevin/haxe/versions/4.1.1/std/haxe/CallStack.hx line 64)
Called from hxd.$System.reportError (hxd/System.hl.hx line 156)
Called from hxd.$System.~runMainLoop.0 (hxd/System.hl.hx line 127)
Called from h2d.Graphics.beginTileFill (h2d/Graphics.hx line 403)
Called from haxe.ui.backend.heaps.$StyleHelper.paintTile (haxe/ui/backend/heaps/StyleHelper.hx line 179)
Called from haxe.ui.backend.heaps.$StyleHelper.~apply.0 (haxe/ui/backend/heaps/StyleHelper.hx line 101)
Called from haxe.ui.ToolkitAssets.~getImage.0 (/Users/kevin/haxe/versions/4.1.1/std/hl/_std/Date.hx line 0)
Called from haxe.ui.util.CallbackMap.invokeAndRemove (haxe/ui/util/CallbackMap.hx line 66)
Called from haxe.ui.ToolkitAssets._onImageLoaded (haxe/ui/ToolkitAssets.hx line 113)
Called from haxe.ui.backend.AssetsImpl.~getImageFromHaxeResource.0 (haxe/ui/backend/AssetsImpl.hx line 43)
Called from haxe.ui.backend.AssetsImpl.imageFromBytes (haxe/ui/backend/AssetsImpl.hx line 62)
Called from haxe.ui.backend.AssetsImpl.getImageFromHaxeResource (haxe/ui/backend/AssetsImpl.hx line 42)
Called from haxe.ui.ToolkitAssets.~getImage.1 (haxe/ui/ToolkitAssets.hx line 92)
Called from haxe.ui.backend.AssetsImpl.getImageInternal (haxe/ui/backend/AssetsImpl.hx line 36)
Called from haxe.ui.ToolkitAssets.getImage (haxe/ui/ToolkitAssets.hx line 86)
Called from haxe.ui.backend.heaps.$StyleHelper.apply (haxe/ui/backend/heaps/StyleHelper.hx line 65)
Called from haxe.ui.backend.ComponentImpl.handleSize (haxe/ui/backend/ComponentImpl.hx line 48)
Called from haxe.ui.core.Component.updateComponentDisplay (haxe/ui/core/Component.hx line 1472)
Called from haxe.ui.validation.ValidationManager.process (haxe/ui/validation/ValidationManager.hx line 130)
Called from haxe.ui.util.$Timer.~delay.1 (haxe/ui/util/Timer.hx line 10)
Called from haxe.ui.backend.$TimerImpl.update (haxe/ui/backend/TimerImpl.hx line 12)
Called from haxe.ui.backend.$BackendImpl.update (haxe/ui/backend/BackendImpl.hx line 7)
Called from haxe.$MainLoop.tick (/Users/kevin/haxe/versions/4.1.1/std/haxe/MainLoop.hx line 174)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 134)
Project works in raylib and html5. It throws the below error in Heaps
Simplified.zip
Null access
Called from h2d.TextInput.set_text (h2d/TextInput.hx line 334)
Called from haxe.ui.backend.TextDisplayImpl.validateData (haxe/ui/backend/TextDisplayImpl.hx line 17)
Called from haxe.ui.core.TextInput.validateComponentInternal (haxe/ui/core/TextInput.hx line 354)
Called from haxe.ui.core.TextInput.validateComponent (haxe/ui/core/TextInput.hx line 336)
Called from haxe.ui.core.ComponentValidation.validateComponentInternal (haxe/ui/core/ComponentValidation.hx line 258)
Called from haxe.ui.components.TextArea.validateComponentInternal (haxe/ui/components/TextArea.hx line 55)
Called from haxe.ui.core.ComponentValidation.validateComponent (haxe/ui/core/ComponentValidation.hx line 177)
Called from haxe.ui.validation.ValidationManager.process (haxe/ui/validation/ValidationManager.hx line 128)
Called from haxe.ui.util.$Timer.~delay.1 (haxe/ui/util/Timer.hx line 10)
Called from haxe.ui.backend.$TimerImpl.update (haxe/ui/backend/TimerImpl.hx line 13)
Called from haxe.ui.backend.$BackendImpl.update (haxe/ui/backend/BackendImpl.hx line 7)
Called from haxe.ui.backend.AppImpl.onHeapsUpdate (haxe/ui/backend/AppImpl.hx line 47)
Called from haxe.ui.backend._AppImpl.HeapsApp.update (haxe/ui/backend/AppImpl.hx line 18)
Called from hxd.App.mainLoop (hxd/App.hx line 187)
Called from hxd.App.~setup.2 (hxd/App.hx line 144)
Called from hxd.App.loadAssets (hxd/App.hx line 170)
Called from hxd.App.setup (hxd/App.hx line 140)
Called from h3d.Engine.onCreate (h3d/Engine.hx line 256)
Called from h3d.impl.DirectXDriver.~init.1 (h3d/impl/DirectXDriver.hx line 262)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 144)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from sys.thread.EventLoop.progress (C:\SDKs\Haxe\haxe\std/sys/thread/EventLoop.hx line 114)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 152)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 142)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 144)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from sys.thread.EventLoop.loop (C:\SDKs\Haxe\haxe\std/sys/thread/EventLoop.hx line 150)
Called from sys.thread._Thread.$Thread_Impl_.processEvents (C:\SDKs\Haxe\haxe\std/hl/_std/sys/thread/Thread.hx line 62)Null access
Called from h2d.TextInput.set_text (h2d/TextInput.hx line 334)
Called from haxe.ui.backend.TextDisplayImpl.validateData (haxe/ui/backend/TextDisplayImpl.hx line 17)
Called from haxe.ui.core.TextInput.validateComponentInternal (haxe/ui/core/TextInput.hx line 354)
Called from haxe.ui.core.TextInput.validateComponent (haxe/ui/core/TextInput.hx line 336)
Called from haxe.ui.core.ComponentValidation.validateComponentInternal (haxe/ui/core/ComponentValidation.hx line 258)
Called from haxe.ui.components.TextArea.validateComponentInternal (haxe/ui/components/TextArea.hx line 55)
Called from haxe.ui.core.ComponentValidation.validateComponent (haxe/ui/core/ComponentValidation.hx line 177)
Called from haxe.ui.validation.ValidationManager.process (haxe/ui/validation/ValidationManager.hx line 128)
Called from haxe.ui.util.$Timer.~delay.1 (haxe/ui/util/Timer.hx line 10)
Called from haxe.ui.backend.$TimerImpl.update (haxe/ui/backend/TimerImpl.hx line 13)
Called from haxe.ui.backend.$BackendImpl.update (haxe/ui/backend/BackendImpl.hx line 7)
Called from haxe.ui.backend._AppImpl.HeapsApp.update (haxe/ui/backend/AppImpl.hx line 18)
Called from hxd.App.mainLoop (hxd/App.hx line 187)
Called from hxd.App.~setup.2 (hxd/App.hx line 144)
Called from hxd.App.loadAssets (hxd/App.hx line 170)
Called from hxd.App.setup (hxd/App.hx line 140)
Called from h3d.Engine.onCreate (h3d/Engine.hx line 256)
Called from h3d.impl.DirectXDriver.~init.1 (h3d/impl/DirectXDriver.hx line 262)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 144)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from sys.thread.EventLoop.progress (C:\SDKs\Haxe\haxe\std/sys/thread/EventLoop.hx line 114)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 152)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 142)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 144)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from sys.thread.EventLoop.loop (C:\SDKs\Haxe\haxe\std/sys/thread/EventLoop.hx line 150)
Called from sys.thread._Thread.$Thread_Impl_.processEvents (C:\SDKs\Haxe\haxe\std/hl/_std/sys/thread/Thread.hx line 62)
Using this sample
https://github.com/haxeui/component-examples/tree/master/buttons
http://188.166.108.195/testui/ - build
Clicking “Add button” doesn’t do anything, except console log:
haxe/ui/core/Component.hx:1394: Problem executing scriptlet: EUnknownVariable(add)
Took latest git of heaps, haxeui-code and haxeui-heaps
Build script:
-cp src
-main Main
-lib haxeui-core
-lib haxeui-heaps
-lib heaps
-js build/html5/Main.js
Adding this line to xml view doesnt work in Heaps target only. The "Select Date" button depresses but no calendar appears. Ill add sample project later. Just capturing it for now.
Sample:
http://188.166.108.195/heaps/s2/
root haxeui component has scale 2.0
When the application resizes their is no effect
launch the Main.hl and resize the application. No change. I have no direction for that
Also the default is black screen other targets are white
Also notice in the Hl the "Random" button near bottom after resize isnt readable. That may be user error or becaus it originally rendered offscreen.
running compiled project gives this error in Heaps only. pretty sure this is all git versions.
HeapsTest.zip
Invalid field access
Called from haxe.ui.components.ListDropDownHandler.set_selectedItem (haxe/ui/components/DropDown.hx line 337)
Called from haxe.ui.components._DropDown.SelectedItemBehaviour.validateData (haxe/ui/components/DropDown.hx line 121)
Called from haxe.ui.behaviours.DataBehaviour.validate (haxe/ui/behaviours/DataBehaviour.hx line 21)
Called from haxe.ui.behaviours.Behaviours.validateData (haxe/ui/behaviours/Behaviours.hx line 89)
Called from haxe.ui.core.ComponentValidation.validateComponentData (haxe/ui/core/ComponentValidation.hx line 297)
Called from haxe.ui.core.ComponentValidation.validateComponentInternal (haxe/ui/core/ComponentValidation.hx line 256)
Called from haxe.ui.core.ComponentValidation.validateComponent (haxe/ui/core/ComponentValidation.hx line 177)
Called from haxe.ui.validation.ValidationManager.process (haxe/ui/validation/ValidationManager.hx line 140)
Called from haxe.ui.util.$Timer.~delay.1 (haxe/ui/util/Timer.hx line 10)
Called from haxe.ui.backend.$TimerImpl.update (haxe/ui/backend/TimerImpl.hx line 13)
Called from haxe.ui.backend.$BackendImpl.update (haxe/ui/backend/BackendImpl.hx line 7)
Called from haxe.ui.backend.AppImpl.onHeapsUpdate (haxe/ui/backend/AppImpl.hx line 47)
Called from haxe.ui.backend._AppImpl.HeapsApp.update (haxe/ui/backend/AppImpl.hx line 18)
Called from hxd.App.mainLoop (hxd/App.hx line 193)
Called from hxd.App.~setup.2 (hxd/App.hx line 150)
Called from hxd.App.loadAssets (hxd/App.hx line 176)
Called from hxd.App.setup (hxd/App.hx line 146)
Called from h3d.Engine.onCreate (h3d/Engine.hx line 256)
Called from h3d.impl.GlDriver.~init.0 (h3d/impl/GlDriver.hx line 1616)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 144)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from sys.thread.EventLoop.progress (C:\SDKs\Haxe\haxe\std/sys/thread/EventLoop.hx line 114)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 152)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 142)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 144)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from sys.thread.EventLoop.loop (C:\SDKs\Haxe\haxe\std/sys/thread/EventLoop.hx line 150)
Called from sys.thread._Thread.$Thread_Impl_.processEvents (C:\SDKs\Haxe\haxe\std/hl/_std/sys/thread/Thread.hx line 62)
As the title says, background-image-repeat is not implemented on Heaps. I coded a way to make it happen and will do a PR but I also open this issue to talk about it in case I did something wrong :D
As a bonus, I also added a way to make a texture repeat when using 9-slicing. To avoid strange artefacts, though, like having a visible cut between a side and the inner texture being only partially drawn, I scaled down the repeated parts to make sure only a round number of them is used.
PR incoming !
By default, HaxeUI loads all fonts defined in XML as SDF. For a bitmap font, including the default Heaps font, this will render blocky shapes instead of the actual characters. There should be support for both types.
This is not noticeable using labels unless you actually set the font in a style, as TextDisplayImpl skips over font things and falls through to Heaps if the font name isn't defined.
This is a reminder for me to whip up a sample with both types in it.
Using this sample
https://github.com/haxeui/component-examples/tree/master/buttons
http://188.166.108.195/testui/ - build
Scaling content issues can be easily reproduced on desktop. Just resize the window.
Took latest git of heaps, haxeui-code and haxeui-heaps
Build script:
-cp src
-main Main
-lib haxeui-core
-lib haxeui-heaps
-lib heaps
-js build/html5/Main.js
It looks like textfield gets focus but doesnt accept any input
test.zip
I'm in git everything. Just after haxeui 1.4 release
Put a Textarea in xml. Compile to heaps and try to enter text
In this video I am smashing on the keys....suddenly some text appears right at the end???
after playing with it more it appears key entry occurs when mouse is not over the textarea but another texfield or the main app? weird
HaxeUITest.zip
Click on the empty input to right of "Arca Name2 and more:"
Can't cast haxe.ui.events.FocusEvent to haxe.ui.events.MouseEvent
Called from haxe.ui.core.ItemRenderer.~set_allowHover.3 (C:\SDKs\Haxe\haxe\std/hl/_std/Date.hx line 0)
Called from haxe.ui.util.EventMap.invoke (haxe/ui/util/EventMap.hx line 76)
Called from haxe.ui.core.ComponentEvents.dispatch (haxe/ui/core/ComponentEvents.hx line 97)
Called from haxe.ui.core.InteractiveComponent.set_focus (haxe/ui/core/InteractiveComponent.hx line 49)
Called from haxe.ui.components._TextArea.Events.onMouseDown (haxe/ui/components/TextArea.hx line 356)
Called from haxe.ui.core.ItemRenderer.~set_allowHover.3 (C:\SDKs\Haxe\haxe\std/hl/_std/Date.hx line 0)
Called from haxe.ui.util.EventMap.invoke (haxe/ui/util/EventMap.hx line 76)
Called from haxe.ui.core.ComponentEvents.dispatch (haxe/ui/core/ComponentEvents.hx line 97)
Called from haxe.ui.core.ComponentEvents._onMappedEvent (haxe/ui/core/ComponentEvents.hx line 114)
Called from haxe.ui.backend.ComponentImpl.__onMouseEvent (haxe/ui/backend/ComponentImpl.hx line 228)
Called from haxe.ui.backend.ComponentImpl.~mapEvent.0 (haxe/ui/backend/ComponentImpl.hx line 199)```
There are 2 places in tableview that use findComponent.
Changing ItemRenderer to Component fixes the issue. Not sure if it is the best fix?
Can't cast haxe.ui.components.Label to haxe.ui.core.ItemRenderer
Called from haxe.ui.containers._TableView.Builder.fillExistingRenderer (haxe/ui/containers/TableView.hx line 446)
Called from haxe.ui.containers._TableView.Builder.onReady (haxe/ui/containers/TableView.hx line 343)
Called from haxe.ui.core.Component.~ready.2 (haxe/ui/core/Component.hx line 1301)
Called from haxe.ui.util.$Timer.~delay.1 (haxe/ui/util/Timer.hx line 10)
Called from haxe.ui.backend.$TimerImpl.update (haxe/ui/backend/TimerImpl.hx line 13)
Called from haxe.ui.backend.$BackendImpl.update (haxe/ui/backend/BackendImpl.hx line 7)
Called from haxe.ui.backend.AppImpl.onHeapsUpdate (haxe/ui/backend/AppImpl.hx line 47)
Called from haxe.ui.backend._AppImpl.HeapsApp.update (haxe/ui/backend/AppImpl.hx line 18)
Called from hxd.App.mainLoop (hxd/App.hx line 187)
Called from hxd.App.~setup.2 (hxd/App.hx line 144)
Called from hxd.App.loadAssets (hxd/App.hx line 170)
Called from hxd.App.setup (hxd/App.hx line 140)
Called from h3d.Engine.onCreate (h3d/Engine.hx line 256)
Called from h3d.impl.DirectXDriver.~init.1 (h3d/impl/DirectXDriver.hx line 262)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 144)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from sys.thread.EventLoop.progress (C:\SDKs\Haxe\haxe\std/sys/thread/EventLoop.hx line 114)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 152)
Called from hxd.$System.runMainLoop (hxd/System.hl.hx line 142)
Called from haxe.$Timer.~delay.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 144)
Called from haxe.$Timer.~__constructor__.0 (C:\SDKs\Haxe\haxe\std/haxe/Timer.hx line 76)
Called from sys.thread.EventLoop.loop (C:\SDKs\Haxe\haxe\std/sys/thread/EventLoop.hx line 150)
Called from sys.thread._Thread.$Thread_Impl_.processEvents (C:\SDKs\Haxe\haxe\std/hl/_std/sys/thread/Thread.hx line 62)
package;
import haxe.ui.events.MouseEvent;
import haxe.ui.*;
import haxe.ui.core.*;
import haxe.ui.components.*;
import haxe.ui.containers.*;
class Main extends hxd.App {
static function main() {
new Main();
}
override function init() {
hxd.Res.initEmbed();
Toolkit.init({app: this});
var root = new VBox();
Screen.instance.addComponent(root);
var window = hxd.Window.getInstance();
root.width = window.width;
root.height = window.height;
root.customStyle.backgroundColor = 0x37344C;
var box = new Box();
root.addComponent(box);
box.customStyle.width = 100;
box.customStyle.height = 100;
box.customStyle.backgroundColor = 0xff0000;
box.registerEvent(MouseEvent.MOUSE_OVER, _ -> trace('mouse over'));
box.registerEvent(MouseEvent.MOUSE_MOVE, _ -> trace('mouse move'));
box.registerEvent(MouseEvent.MOUSE_OUT, _ -> trace('mouse out'));
}
}
When moving mouse on the box and then out of it, will trace the following:
src/Main.hx:32: mouse over
src/Main.hx:32: mouse over
src/Main.hx:32: mouse over
src/Main.hx:34: mouse out
But expected to be:
src/Main.hx:32: mouse over
src/Main.hx:32: mouse move
src/Main.hx:32: mouse move
src/Main.hx:34: mouse out
are there any samples?
how to use haxeui with heaps?
Image is from clicking home button.
Simplified.zip
package;
import haxe.ui.*;
import haxe.ui.core.*;
import haxe.ui.containers.*;
class Main extends hxd.App {
static function main() {
new Main();
}
override function init() {
Toolkit.init({app: this});
var vbox = new VBox();
vbox.customStyle.width = 200;
vbox.customStyle.height = 200;
vbox.customStyle.backgroundColor = 0xff0000;
Screen.instance.addComponent(vbox);
haxe.Timer.delay(function() vbox.customStyle.width = 100, 1000); // doesn't work
haxe.Timer.delay(function() vbox.width = 100, 1000); // works
}
}
git/haxe/ui/HaxeUIApp.hx:4: characters 8-31 : Type not found : haxe.ui.backend.AppImpl
package;
import haxe.ui.*;
import haxe.ui.core.*;
import haxe.ui.components.*;
import haxe.ui.containers.*;
class Main extends hxd.App {
static function main() {
new Main();
}
override function init() {
hxd.Res.initEmbed();
Toolkit.init({app: this});
var root = new VBox();
Screen.instance.addComponent(root);
var window = hxd.Window.getInstance();
root.width = window.width;
root.height = window.height;
root.customStyle.backgroundColor = 0x37344C;
// demonstrate margin
var box = new HBox();
root.addComponent(box);
box.customStyle.backgroundColor = 0x00ff00;
box.customStyle.percentWidth = 100;
for(i in 0...6) {
var item = new Label();
box.addComponent(item);
item.text = 'Label $i';
item.customStyle.marginLeft = item.customStyle.marginRight = 30;
item.customStyle.backgroundColor = Std.random(0xffffff);
}
// demonstrate padding
var box = new HBox();
root.addComponent(box);
box.customStyle.backgroundColor = 0xffff00;
box.customStyle.percentWidth = 100;
for(i in 0...6) {
var item = new Label();
box.addComponent(item);
item.text = 'Label $i';
item.customStyle.paddingLeft = item.customStyle.paddingRight = 30;
item.customStyle.backgroundColor = Std.random(0xffffff);
}
}
}
Note that in the first row, only the first item has its marginLeft respected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.