Giter Site home page Giter Site logo

ui_engines's Introduction

UI_Engines

Engine specific libraries for Empty Keys UI

Prerequisites

Visual Studio 2017 15.9.2+, MonoGame 3.7 and Xenko 3.X+ installed

EmptyKeys.UserInterface.Core

Core library with abstract classes and simple types

EmptyKeys.UserInterface.MonoGame

MonoGame specific library http://www.monogame.net/

EmptyKeys.UserInterface.Xenko

Xenko specific library http://Xenko.com

ui_engines's People

Contributors

emptykeys avatar keenfilip avatar timesscar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ui_engines's Issues

Input method problems

Hello I have encountered a problem. I can't use my input method to type in the input box. can you help me?

Unfocussing still gives sounds

I'm currently working on a 2d multiplayer game with chat functionality. I just used this stackoverflow post to create an IsFocussed extension:
https://stackoverflow.com/a/7972361/1149816

However I'm now trying to implement something that if you click out of the chat box that no commands are being sent to the UI anymore. I keep hearing all kinds of pops and sound effects and also the UI is still responding to arrow presses. This also happens when I use the InputManager.Current.ClearFocus() method. For some reason the next update loop the GamePlayUI is set as the focussed element again.

Is there any way to completely clear the focus of the EmptyKeys library?

I've created a video of this problem:
https://youtu.be/J001tU1ZucI

Incase you're wondering, the code that executes when you press enter or the Send button:

        private void OnChatEnterClick(object obj)
        {
            if (gameplayUIViewModel.ChatBoxFocussed == false)
            {
                gameplayUIViewModel.ChatBoxFocussed = true;
            }
            else if (string.IsNullOrEmpty(gameplayUIViewModel.ChatTextBoxText))
            {
                InputManager.Current.ClearFocus();
            }
            else
            {
                SendChat(gameplayUIViewModel.ChatTextBoxText);
                gameplayUIViewModel.ChatTextBoxText = "";
            }
        }

Where is the FNA engine?

This repo only contains the MonoGame and Xenko libraries. FNA, Cocos2D, etc are missing.

(As a side note, the reason I'd like to get a hold of the FNA library is to recompile it as AnyCPU -- it's compiled x86 only despite FNA being x64 safe.)

MissingMethodException in nuget package EmptyKeysUI_Xenko

Hello!

Fresh install of EmptyKeys on latest Xenko 1.9.3-beta throws a MissingMethodException when trying to draw anything, because XenkoRenderer cannot call a SpriteBatch.Draw overload.

I assumed it was an assembly binding error and peeked at EmptyKeys.UserInterface.Xenko.dll in Reflector. It wants to bind SiliconStudio.Xenko.Graphics.dll 1.9.0.0 from older Xenko 1.9.0. However, in runtime it binds with SiliconStudio.Xenko.Graphics.dll 1.9.3.0 from Xenko 1.9.3.

Looks like building UI_Engines from source is impossible without the closed part of EmptyKeys, so what is the recommended course of action?

##Steps to reproduce:

  1. Create empty Xenko project.
  2. Add EmptyKeysUI_Xenko references to both Game and Windows project.
  3. Add missing shaders for SDF fonts to a Game project.
  4. Initialize EmptyKeysUI and wire up a SceneDelegateRenderer for drawing.
  5. Draw a basic UIRoot with anything, e.g. a single TextBlock inside the SceneDelegateRenderer.

##Exception details:

System.MissingMethodException occurred
  HResult=-2146233069
  Message=Method not found: 'Void SiliconStudio.Xenko.Graphics.SpriteBatch.Draw(SiliconStudio.Xenko.Graphics.Texture, SiliconStudio.Core.Mathematics.RectangleF, SiliconStudio.Core.Mathematics.Color4)'.
  Source=EmptyKeys.UserInterface.Xenko
  StackTrace:
       at EmptyKeys.UserInterface.Renderers.XenkoRenderer.Draw(TextureBase texture, PointF position, Size renderSize, ColorW color, Boolean centerOrigin)
       at EmptyKeys.UserInterface.Media.SolidColorBrush.Draw(TextureBase texture, Renderer renderer, Double elapsedGameTime, PointF position, Size renderSize, Single opacity)

Can support bitmapfont?

I want to be able to support bitmapfont. Spritefont is very unfriendly to Asia. We have thousands of characters and it takes a lot of time to compile.

can't seem to disable scrollbars on DataGrid component

I'm trying to hide the scrollbars on a DataGrid component, but I can't seem to get it to work.

<DataGrid
    ScrollViewer.HorizontalScrollBarVisibility="Hidden"
    ItemsSource="{Binding DataGridData}"
>

The generator generates the code

this.e_4.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;

and everything compiles without any sort of warning, but the scrollbars are still visible. Using 'Auto' instead of 'Hidden' also doesn't seem to work, and I'd love to use 'Auto'.

Am I doing something wrong, or is there a bug?

button and slider value

Hi,

i have looked into the examples, but, i am not very familar with partialclasses and so on (ansi-c for microcontroller background).
so my question is, how do i read the state of the button and the value of a slider in the very simple way (like in windows form projects or as simple variable)?

Greetings
Daniel

Linear Gradient implementation

I still don't like how I implemented GenerateLinearGradient method in Texture class. It feels just to complicated. I'm sure there is better implementation somewhere in this universe.

Left padding in TextBlock is ignored.

It seems that there is some space reserved for the left padding, but the text is aligned to left anyway.

<Border>
<TextBlock Text="3" Background="Red" Foreground="White" FontWeight="Bold" Padding="10"/>
</Border>

SFML.Net support?

Hello

Do you think you can add support for SFML C# binding?

That would be awesome!

Thanks

I think we can enhance the textBox

Game.TextChanged can be captured on monogame's desktopgl to get the characters entered by the user, not just the normal 26 characters. I tested it can receive multiple bytes.

image

Image not loaded into button content

A little introduction to the issue:
I want to make a cross-platform game on top of MonoGame in which there are a lot of clickable sprites that have static/animated textures and they may have a generic shape which means their hit test area will be an arbitrary polygon. Empty Keys seems to be something that can handle such a thing, so as a first step I tried to customize a button - every sprite could be a button, right? - by setting an image as its background. But it didn't work.
I used the Empty_MonoGame_Example solution that I found among the examples, and did the same thing that I found in the BasicUI_MonoGame to include an image. In the XAML Designer I see what I would want to see as the end result, but in the running application there is nothing.
This is the XAML:
<ek:UIRoot xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ek="clr-namespace:EmptyKeys.UserInterface.Designer;assembly=EmptyKeys.UserInterface.Designer" xmlns:c="clr-namespace:EmptyKeys.UserInterface.Designer.Charts;assembly=EmptyKeys.UserInterface.Designer" mc:Ignorable="d" d:DesignHeight="640" d:DesignWidth="800"> <Grid> <Button> <Button.Content> <Image> <Image.Source> <BitmapImage UriSource="Images/smiley.png" /> </Image.Source> </Image> </Button.Content> </Button> </Grid> </ek:UIRoot>

Could you please help with this? I attached the source code zip as well. Also: is it possible to adjust the hit test area to an arbitrary polygon? (Such as the silhouette of the sprite.)
Empty_Example.zip
missing_button

MonoGameEffect.UpdateEffectParameters doesn't handle null effect

There are two places before this call where the effect can become null. But the method itself assumes that it never is, potentially causing a crash. A simple null check before doing anything else would prevent that.

(The reason I hit this was because I had to switch to the MonoGame OpenGL dll instead of Window8 in the UI samples project. Using the Windows8 assembly was causing other null reference crashes.)

can't get popups to work at all

I wasn't sure if this belonged in the UI_Engines or UI_Generator, but this seemed more likely.

I can't seem to get Popups to show up at all.

<Popup
    IsOpen="{Binding CheatPopupOpen}"
    StaysOpen="True"
>
    <TextBlock>FooBarBaz</TextBlock>
</Popup>

The above popup generates code that compiles. I have it reading a property CheatPopupOpen that is set to true. Nothing shows up, no matter how many times I toggle that property. I've tried moving things around and settings sizes and setting Placement as well, but no luck.

I wanted to try it with one of the basic examples found on the web, but they all use the unsupported ElementName.

Another (possibly related) problem is that if I try to set IsOpen to true directly (IsOpen="True"), the code that is generated sets it to false, not true:

this.e_6.IsOpen = false;

It's set to false if I set it to false as well.

Nuget package includes wrong version of assembly

I noticed today after rebuilding my build server that the EmptykeysUI_Monogame nuget package includes version 3.0.0.0 of the EmptyKeys.UserInterface.Monogame assembly, but adds a reference to 3.1.0.0. This behavior only seems to happen when installing the package fresh and not updating it.

image

Mouse Clicks affect out-of-focus MonoGame windows

This is easily reproducible with the MonoGame example project. Position the window so you know where the button is on-screen, then bring another window to the front and click on it where the button is now obscured by the new window. The audio effect plays and the progress bar increments. This doesn't happen in at least the CocosSharp example project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.