Search found 7 matches

by socradeath
Thu Feb 28, 2019 10:21 am
Forum: Ren'Py Cookbook
Topic: Date wih weekdays and leap year
Replies: 3
Views: 2651

Re: Date wih weekdays

I started with monday, but it would be better that start with sunday in many case.

To start with sunday,
weekdays = ["sun","mon",....]

...and...

__weekday = ((__y+__y/4-__y/100+__y/400+(13*__m+8)/5+self.day) % 7)
by socradeath
Thu Feb 28, 2019 10:12 am
Forum: Ren'Py Cookbook
Topic: Date wih weekdays and leap year
Replies: 3
Views: 2651

Date wih weekdays and leap year

init python: weekdays = ("mon","tue","wed","thu","fri","sat","sun") class Date: def __init__(self): self.year = 2019 self.month = 2 self.day = 28 self.weekday = weekdays[3] def end_day(self): self.day += 1 self.weekday = weekdays[weekdays.index(self.weekday)-6] if self.month in (1,3,5,7,8,10,12): i...
by socradeath
Sat Feb 09, 2019 9:42 am
Forum: Ren'Py Questions and Announcements
Topic: why this code auto-scrolled up to top when I click button in the area
Replies: 5
Views: 431

Re: why this code auto-scrolled up to top when I click button in the area

Alex wrote:
Sat Feb 09, 2019 7:51 am
It looks like, because of renpy.get_screen (https://www.renpy.org/doc/html/screen_p ... get_screen) that is used in Show action (see 00action_control.rpy in renpy/common folder)
oh, i see.
then I should be careful. - do not use name of other screens as tag name.
Thank you.
by socradeath
Sat Feb 09, 2019 3:31 am
Forum: Ren'Py Questions and Announcements
Topic: why this code auto-scrolled up to top when I click button in the area
Replies: 5
Views: 431

Re: why this code auto-scrolled up to top when I click button in the area

OK, I solved this problem.
"tag charinfo" makes this error. I change the tag name another one, and problem solved. but still I can't understand why tag makes problem.
is there any correlation between tag name and screen name?
Shoud am I careful for naming tag?
by socradeath
Sat Feb 09, 2019 3:07 am
Forum: Ren'Py Questions and Announcements
Topic: why this code auto-scrolled up to top when I click button in the area
Replies: 5
Views: 431

Re: why this code auto-scrolled up to top when I click button in the area

and now I found one clue. when I change the line "action Show("profile",ch=i)" to "action NullAction()", problem disappeared. but, profile screen has no problem... because I change the line "action Show("profile",ch=i)" to "action Show("fake_profile",ch=i)", problem still appeared. screen fake_profi...
by socradeath
Sat Feb 09, 2019 2:52 am
Forum: Ren'Py Questions and Announcements
Topic: why this code auto-scrolled up to top when I click button in the area
Replies: 5
Views: 431

Re: why this code auto-scrolled up to top when I click button in the area

ps. now i found one weird thing about the problem. first time i click one of the buttons, scroll bar keep it's position, but second time and after second time i click the buttons, scroll bar is set to the top position.
by socradeath
Sat Feb 09, 2019 2:25 am
Forum: Ren'Py Questions and Announcements
Topic: why this code auto-scrolled up to top when I click button in the area
Replies: 5
Views: 431

why this code auto-scrolled up to top when I click button in the area

Hello, This is my first renpy programming. I want scroll bar to keep position when click the button in the area, but when I click the button, the scroll bar is rolled up to the top position I couldn't find what's the wrong in this code screen charinfo(filter_list): tag info frame: xalign 0.78 yalign...