Git Product home page Git Product logo

marklight's People

Contributors

emkaydk avatar jholland918 avatar patrik-u 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

marklight's Issues

TextMeshPro support

Hi,

I just started to try out marklight and so far it seems great!
I tried to use the "TextMeshProLabel" Identifier, but with the new version of TextMeshPro by UnityTechnologies this seems to fail... any idea how to resolve that?
Would be happy to contribute support for the new version, if you could point me in the right direction...

Can't access nested items source for lists

Hi,

I have noticed that it seems impossible to bind the items property to a nested field.
In short, this does not work:

<List Items="{Context.Runes}"></List>

I tried identifiying the issue but wasn't able to do so :(
Is there a way to accomplish this ?

Easier IntelliSense integration

It's possible to avoid global Visual Studio configuration changes suggested in the documentation.

To add IntelliSense support, simply use additional attributes in the XML root:

<MainMenu xmlns="MarkLight" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="MarkLight ..\..\MarkLight\Views\Schemas\MarkLight.xsd" >
    <!-- view definition -->
</MainMenu>

Where ..\..\MarkLight\Views\Schemas\MarkLight.xsd is relative location to xsd file. This should be added automatically when adding a new View with Unity Editor.

optimization when a List has lots of items

Hi,
when a list has lots of items, lots of game objects will created and scrolling will not as smooth as expected.
what we do before is to reuse game object (item template) when a item become invisible.

  1. when initialization, only visible game objects count plus one will be created. (N + 1)
  2. during scroll up, when the top most game object become invisible, it will be moved to bottom, and bind to the corresponding data source.
  3. when scroll down, the bottom game object will be moved to top and do binding stuff.

how do you think about this kind of optimization?

[How To] dynamically adjust the content size of a scrollable panel

I am working with MarkLight and TextMeshPro. I was wondering how would I automatically adjust the size of the TextMeshProLabel (within a Panel) depending on the content, so that it always only scrolls within the boundaries of the actual text? In vanilla Unity I would add a content-size-fitter and a layout group, but that doesn't seem to work with marklight...

Consider moving the Folder to Assets/Plugins

All Scripts inside Assets/Plugins/ will be only compiled if the code changes inside. So if you change your game code, the Unity-Editor doesn't have to recompile MarkLight again

Dynamically loaded view at runtime generates error during Animate (fix included)

I have loaded some code which dynamically loads uxml at runtime like this:

    //dynamically load UI
    ViewPresenter.UpdateInstance();
    var viewPresenter = ViewPresenter.Instance;
    viewPresenter.MainView = "GameMenuExample";
    viewPresenter.DefaultTheme = "Flat";
    ViewData.GenerateViews();

When attempting to use the view switcher to switch views, an animation plays and generates the following error:

[MarkLight] Unable to animate field "Rotation" on view "Region (LevelSelect)". Stopping animation. Interpolator QuaternionValueInterpolator threw exception: Specified cast is not valid.

The fix is in Animate.cs

public void UpdateViewFieldAnimator()
{
//Debug.Log(String.Format("Updating View Field Animator: {0}: {1}, {2}", Field, From, To));
if (From != null && From is String)
{
FromStringValue = (String)From;
//This fixes a problem with views dynamically loaded from uxml
From = null;
}

        if (To != null && To is String)
        {
            ToStringValue = (String)To;
            //This fixes a problem with views dynamically loaded from uxml 
            To = null;
        }

Unity 5.6 support

HI, I'm using this with Unity 5.6 and a few things don't seem to be working on Region elements.

  1. BackgroundColor doesn't seem to do anything
  2. Width does.... a minor thing, but not much. Setting two regions 25%/75% with a group in each (and a button in each group) causes them to mostly overlap.

image

You can tell that there's a second button further to the right (I added more text to get it to be distinct, it'll show up even with shorter text). Funny enough, that's in the region that's defined on the Region with Alignment="Left" and Width="25%"

Not sure what else doesn't work, this is just what I've noticed.

How to notify data change inside a list item.

Hi,

as DynamicDataGridExample shown,

    <Row IsTemplate="True">
      <Column Text="{#Item.Player.FirstName} {#Item.Player.LastName}" />
      <Column Text="{=#Item.Score}" />
    </Row>

Column bind to #Item.Score, how can i changed the score of some player programmatically?
like:

foreach (var player in players) // players is a ObservableList
{
    player.Score++;  // How to notify change to view?
}

change Score to _int has no effect.

two ways to achieve the goal:

  1. Notify a ObservableList change event and refresh whole list
  2. Change Highscore class to a dependency field may help i guess.

thanks.

How to style a button to have alpha or scale value when user press

Hi,
I just found it is awesome GUI lib for unity! I try to make custom theme for button with single image for both state: normal and pressed, and i want when user pressed, image change alpha value (or scale to 1.1):

<Button Id="home" BackgroundImage="Sprites/640_18.png" Width="102" Height="102"/>

How can i get it? Thank so much!

P/S It is very easy to define Pressed-BackgroundImage with new alpha value or scale value but i think we should support alpha or scale directly on BackgroundImage for better size and performance!

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.