TinyCrocodile's Forum Posts

  • I want to display my web project differently on mobile devices from pc. On a pc browser, I want to display a layout that is set in landscape mode, and on mobile, in a portrait mode.

    I already figured out how to lock the project in either landscape mode or portrait mode, depending on the device.

    My problem is though, that in the portrait mode, the project is still displayed in landscape mode, with black bars on top and bottom.

    Is there maybe a way to change the viewport on runtime to match the portrait mode?

    Changing the size settings in the layout did not seem to work.

  • Hey folks, I am currently building a project with a popup that contains scrollable text and just wanted to mention: be super aware how you set the parent-child relationships in your elements.

    As long as I have a static window with scrollable text, all is fine, but as soon as it starts moving into the screen, together with a bunch of other elements (e.g. the scrollbar, or a background texture, or a picture...), things get very weird.

    E.g.: I had a scrollviewport on a popup window. I moved the scrollviewport up and down, and I made it the parent to the background. This lead to the whole background being the limiting area for the scrolling, not only the viewport.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That works, thank you very much!

  • I can't share my original project, but I made an example in which I put the same css code in as before. I am sure I am missing some step(s), but I don't know which. Probably some extra code in the css sheet.

    Ashley The project is here, could you have a look, please?:

    my.hidrive.com/lnk/3cSTCmcd

    Edit: after reading the comments again and seeing this video: youtube.com/watch I get the impression that I can't style form buttons that way but have to program my own buttons in the html object, is that correct?!

  • Typing .button did not change anything, sadly - do I have to enter other code as well?

    When I google for css examples, I only get examples for webpages: w3schools.com/html/html_css.asp

    And I am not quite sure which parts I have to transfer to the construct style sheet. If someone could share a working example, that would be great.

  • I tried styling some form buttons with css which worked quite nice. Then I found out that I can create a style sheet. The manual says on style sheets: "CSS files have a Purpose property in the Properties Bar. The default is Stylesheet which means Construct will use it as an additional stylesheet for your project. The purpose can also be set to (none) in which case its styles will not automatically be applied".

    That to me sounds like whatever I have in the style sheet should automatically be applied on game start, right? I put this simple code into the style sheet:

     button {
     background-color: #7b38d8;
     border-radius: 10px;
     border: 4px double #cccccc;
     color: #eeeeee;
     }
    

    Which is not applied on game start. Did I miss something?

  • So I found kind of a workaround by making a selfmade button from a sprite and hiding the form button in a colored area, making it 0,1 x 0,1 pixel in size the same color as the area on the sprite. It looks like transparent buttons are not a thing. Luckily, the size does not matter for the screenreader to find it.

  • Thank you for your replies. I made the buttons invisible, but that made them also not clickable.

    Unfortunately, I can neither position the buttons off screen, nor make my own solution, since I need the elements to be useable with the screenreader. As far as I know, I can only do that with the form buttons.

    Would it be possible to make them transparent while still useable with css?

  • I noticed that UI buttons seem to force themselves always to the top of the screen, no matter what the z elevation of their layer is. Problem is, I need to hide the buttons somehow. From the artist, I got some hand drawn sprites that are supposed to be the "pretty" side of the button, but I do need the UI button to, because this element can be found by the screenreader.

    Is there any way to hide the buttons behind pretty artworks?

    I tried setting the opacity, but it did nothing.

    When I move the buttons outside of the view, the screenreader won't find them anymore.

  • Thank you for your reply!

    I think having "hidden" text outside of the view makes sense, since I already thought about including those, e.g. for image descriptions or an alternative point display (having a sentence instead of an icon with a number next to it).

  • Hey folks, I was testing my web application with a screenreader user today.

    We found out that the screenreader does not find buttons that are not on screen (e.g. because I moved a pop up outside of the screen), but it DOES find and read the text object that is on the same pop up. It still finds and reads the text label even when I make the layer or text object invisible.

    I can set the text object to "do not read aloud", so I already know how to solve it, but I am wondering why buttons and labels are handled differently, in order to understand how to use them better.

    Maybe someone knows what to make of it? Is this difference in behavior happening "on accident" or with intent?

  • I am trying to wrap my head wround how to deal with lists. Here is what I want to achieve:

    - I want to have a list with multiple entries

    - from those entries, I want to select one randomly

    - after that, I want to delete the entry, so that it can't be selected the next time

    what objects and commands do I use for it? I tried to play around with lists and arrays, but I could not figure out how to achieve said points. Can someone point me into the right direction please?

  • What I use as a workaround is click "take guided tour" and then cancel the guided tour. This brings me to the program start page.

  • It's me again, with another question regarding accessibility. I'd like to know if its possible to give pictures an alt-text (like on a website) out of the box, or maybe with an addon.

    Similar question: are there any accessibility features out of the box for videos, e.g. subtitles or audio descriptions?

  • Oh that sounds great, I'll check it out, thanks!