UI Toolkit

Reply
Accepted Solution

I can't see my buttons.

I thought it might be related to this: http://community.eu.playstation.com/t5/PS-Suite-UI-Composer/Button-s-BackgroundFilterColor/td-p/1489... but even after changing a button's color, it doesn't show up, but two Labels and a PopupList do.
Please use plain text.

Re: I can't see my buttons.

Hi Roland2TowerCame (nice name!),

Do you have any code snippets that we can look at to help you determine why it's not displaying?

Some simple suggestions:-
- Is the Button X,Y position inside the screen?
- Are you setting the .visible property to false?
- Are your other widgets covering it?

Thanks
PlayStation®Mobile Dev Team
Please use plain text.

Re: I can't see my buttons.

Check the order in which the button is being added in the generated .composer.cs file

 

I've posted about an issue I've encountered which could be the cause :

 

Bug?

PSS port of Blitz Bombers
http://blitzbombers.blogspot.com

Please use plain text.

Re: I can't see my buttons.

Thanks!  None of the simple suggestions apply.  Non-button widgets show up fine (at least labels and popuplists do).

 

namespace VCalc
{
    public class AppMain
    {
        private static GraphicsContext graphics;
        
        public static void Main (string[] args)
        {
            Initialize ();

            while (true) {
                SystemEvents.CheckEvents ();
                Update ();
                Render ();
            }
        }

        public static void Initialize ()
        {
            // Set up the graphics system
            graphics = new GraphicsContext (960, 544, PixelFormat.None, PixelFormat.None, MultiSampleMode.None);
            UISystem.Initialize(graphics);
            Scene calcScene = new mainview();
            UISystem.SetScene(calcScene, null);
        }

        public static void Update ()
        {
            // Query gamepad for current state
            var gamePadData = GamePad.GetData (0);
        }

        public static void Render ()
        {
            // Clear the screen
            graphics.SetClearColor (.50f, .50f, .50f, 1.0f);
            graphics.Clear ();
            
            // Render the UI
            UISystem.Render();

            // Present the screen
            graphics.SwapBuffers ();
        }
    }
}

 

From the generated code:

 

// Scene
            sceneBackgroundPanel.BackgroundColor = new UIColor(168f / 255f, 206f / 255f, 238f / 255f, 255f / 255f);


            this.RootWidget.AddChildLast(sceneBackgroundPanel);
            this.RootWidget.AddChildLast(Button_0);
            this.RootWidget.AddChildLast(Button_1);
            this.RootWidget.AddChildLast(Button_2);
            this.RootWidget.AddChildLast(Button_3);
            this.RootWidget.AddChildLast(Button_4);
            this.RootWidget.AddChildLast(Button_5);
            this.RootWidget.AddChildLast(Button_6);
            this.RootWidget.AddChildLast(Button_7);

           ...

Please use plain text.

Re: I can't see my buttons.

I failed to call this
// Update UI Toolkit
UISystem.Update(touchDataList);
didn't realize it was necessary.
Please use plain text.

Re: I can't see my buttons.

Button overrides OnUpdate but Label and PopupList do not
it seems this functionality is what helps with having different images for Normal, Pressed, and Disabled.
Please use plain text.

Re: I can't see my buttons.

Thanks man! Had the same problem, also helped with my slider widget ^^

Please use plain text.
This widget could not be displayed.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。






Recent News