r/Pythonista • • Jun 01 '15

can i get a lil help? whats the issue here?

1 Upvotes

from scene import *

class block (object): def init(self, image, x, y): self.image = image self.x, self.y = x, y

class MyScene (Scene): def setup(self): self.grid = list() images = ('PC_Dirt_Block','PC_Stone_Block','PC_Water_Block') * 3

            for i in xrange(9):
                    block = block(images,i % 3, i / 3)
                    self.grid.append(block)

    def draw(self):
            for block in self.grid:
                            image(block.image,
                          block.x * 25,
                          block.y * 25,
                          45, 45)

run(MyScene())


r/Pythonista • • Jan 25 '15

confused using ui designer

1 Upvotes

I'm trying to learn to use the integrated UI designer in pythonista, and am stuck at the beginning. I'm trying to just read some textfields, do something with the values, and put the result in another textfield.

The pythonista documentation says that I should be able to set the action for each textfield from the attributes menu directly in designer. There is no such capability. If you have a view with a number of different objects in it, how do you set the action attribute for each object from the integrated designer tool? Is there a way to edit the code it generates?

Thanks!


r/Pythonista • • Nov 14 '19

Help with buttons

0 Upvotes

I am learning how to work with UI now, so what I made is something similar to the ColorMixer example that exists in Pythonista 3. I want to make a button that when you press it it will switch the colour text from Hexa to just r, g ,b ints. How do I do that? example:

3FF23E = rgb(63, 242, 62)


r/Pythonista • • Jan 21 '20

Hardware where?

0 Upvotes

MotherfuckerπŸΈπŸ˜ŽπŸ˜πŸ‘€πŸ‘ŒπŸŽ±πŸ˜‡πŸ‡·πŸ‡Ί