summaryrefslogtreecommitdiff
path: root/indra/llui/lltimectrl.h
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-05-30 22:34:56 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-05-30 22:34:56 +0300
commit657e434fd59139436e8b97e5ecd01ca686e82269 (patch)
treebebf0c4c8adff3587cec47f6403757f841f5c872 /indra/llui/lltimectrl.h
parent6f1cdd4926444567d21b1d6e0735a445b981e56b (diff)
STORM-1253 WIP New day cycle editor.
Done: * Creating new local day cycles. * Editing existing local day cycles. * Deleting day cycles. To do: * Editing region day cycle, dealing with skies in region scope. * Handle teleport while editing a day cycle. * Update UI when a day cycle or sky preset gets deleted. * Make the time ctrl increase/decrease consistently.
Diffstat (limited to 'indra/llui/lltimectrl.h')
-rw-r--r--indra/llui/lltimectrl.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/llui/lltimectrl.h b/indra/llui/lltimectrl.h
index 81d4477da4..aebc5b6eab 100644
--- a/indra/llui/lltimectrl.h
+++ b/indra/llui/lltimectrl.h
@@ -37,6 +37,7 @@ class LLLineEditor;
class LLTimeCtrl
: public LLUICtrl
{
+ LOG_CLASS(LLTimeCtrl);
public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
@@ -51,13 +52,17 @@ public:
Params();
};
+
+ F32 getTime24() const; // 0.0 - 24.0
+ U32 getHours24() const; // 0 - 23
+ U32 getMinutes() const; // 0 - 59
+
+ void setTime24(F32 time); // 0.0 - 23.98(3)
+
protected:
LLTimeCtrl(const Params&);
friend class LLUICtrlFactory;
- U32 getHours() const { return mHours; }
- U32 getMinutes() const { return mMinutes; }
-
private:
enum EDayPeriod
@@ -101,7 +106,7 @@ private:
void switchDayPeriod();
- void buildTimeString();
+ void updateText();
EEditingPart getEditingPart();
@@ -114,11 +119,9 @@ private:
class LLButton* mUpBtn;
class LLButton* mDownBtn;
- U32 mHours;
- U32 mMinutes;
- EDayPeriod mCurrentDayPeriod;
-
- std::string mTimeString;
+ U32 mHours; // 1 - 12
+ U32 mMinutes; // 0 - 59
+ EDayPeriod mCurrentDayPeriod; // AM/PM
BOOL mAllowEdit;
};