Jump to content

Calendar Creator v1.6


Recommended Posts

A few lines in CodeLab and we have a Calendar Creator with a "Red" Days (weekend).

 

Spoiler

CheckboxControl Amount10 = true; // [0,1] Red Days
#endregion
.
.
.
ColorBgra textColor = Amount5 ? ((Amount10 && (currentDate.DayOfWeek == DayOfWeek.Saturday || currentDate.DayOfWeek == DayOfWeek.Sunday)) ? ColorBgra.Red.NewAlpha(128) : ColorBgra.Black.NewAlpha(96)) : ColorBgra.Transparent;
.
.
.
			{
                		textColor = ColorBgra.Black;
				if (Amount10 && ((currentDate.DayOfWeek == DayOfWeek.Sunday || (currentDate.DayOfWeek == DayOfWeek.Saturday && Amount9)))) {textColor = ColorBgra.Red;}
			}

 

 

Of course, it's not an optimum code and somebody could correct it.

 

calendar_rd_1.png calendar_rd_3.png

calendar_rd_2.png calendar_rd_4.png

  • Like 2
  • Upvote 2
Link to comment
Share on other sites

11 hours ago, ReMake said:

A few lines in CodeLab and we have a Calendar Creator with a "Red" Days (weekend).

...

Of course, it's not an optimum code and somebody could correct it.

 

I have corrected the code and included red weekend option in v1.5.

 

Enjoy. :beer: 

  • Like 2

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to comment
Share on other sites

28 minutes ago, Eli said:

There is also some room for more options on a second column.

 

IndirectUI doesn't allow for a second column of checkboxes.

 

It may sound like a good idea, but would run into issues with localization.  ie: in some languages, the labels might be a lot longer in length, and would get clipped.

EDIT: Nevermind, IndirectUI doesn't clip text; it wraps it.

Edited by toe_head2001
Link to comment
Share on other sites

37 minutes ago, toe_head2001 said:

IndirectUI doesn't allow for a second column of checkboxes.

 

Feature request: a combobox with checkboxes!

 

Link to comment
Share on other sites

12 hours ago, Eli said:

I just noticed that the world as we know it has an expiration date. :D 

The dropdown list is populated from the actual year…

It means next year the last choice in the list will be + 1 (2033).

edit:Perhaps a slider -100  <--- year ---> +100 would be better for a bigger range and will offer the possibility to key in the year...

(Birth month of grandpa…)

  • Like 2
  • Upvote 1
Link to comment
Share on other sites

6 hours ago, MadJik said:

Perhaps a slider -100  <--- year ---> +100 would be better for a bigger range and will offer the possibility to key in the year...

(Birth month of grandpa…)

I would finally know what day I was born. :) 

Link to comment
Share on other sites

Link to comment
Share on other sites

  • 1 month later...
1 minute ago, flaner said:

I want to change the overall color.
by default it is black.
... and it will not be visible in a dark image

 

Render the calendar to it's own layer.

 

Then, Adjustments > Invert Colors

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...